Skip to content

Commit 1df0921

Browse files
Updated Nucleo F103RB variant with files from Matthias
1 parent bb53502 commit 1df0921

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

  • STM32F1/variants/nucleo_f103rb/board

STM32F1/variants/nucleo_f103rb/board/board.h

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
/**
2828
* @file wirish/boards/maple/include/board/board.h
2929
* @author Marti Bolivar <mbolivar@leaflabs.com>
30-
* @brief Maple board header.
31-
*/
30+
* @brief Maple board header. */
31+
// edited and rewritten for STM32DUINO by Matthias Diro 07.05.2015
3232

3333
#ifndef _BOARD_MAPLE_H_
3434
#define _BOARD_MAPLE_H_
35-
35+
#define _BOARD_NUCLEOF103RB_ 1 // hack for HardwareSerial.cpp for a new order of serials
3636
#define CYCLES_PER_MICROSECOND 72
3737
#define SYSTICK_RELOAD_VAL 71999 /* takes a cycle to reload */
3838

@@ -43,9 +43,24 @@
4343
// Pin number for the built-in LED.
4444
//BOARD _ LED _ PIN 13
4545

46-
/* Number of USARTs/UARTs whose pins are broken out to headers. */
46+
// Arduino compatible A0-A5 defines:
47+
#define A0 16
48+
#define A1 17
49+
#define A2 18
50+
#define A3 19
51+
#define A4 20
52+
#define A5 21
53+
// Wire.h Soft I2C standard pins for custom boards:
54+
#define BOARD_I2CSOFT_SCL_PIN PC0
55+
#define BOARD_I2CSOFT_SDA_PIN PC1
56+
4757
#define BOARD_NR_USARTS 3
58+
//#define SERIAL_ORDER1 3 // HW Serial order for custom boards
59+
//#define SERIAL_ORDER2 2 // not implemented yet
60+
//#define SERIAL_ORDER3 1
4861

62+
/* Number of USARTs/UARTs whose pins are broken out to headers. */
63+
// hope this would be obsolet soon
4964
#define BOARD_USART1_TX_PIN PA9
5065
#define BOARD_USART1_RX_PIN PA10
5166

@@ -59,14 +74,14 @@
5974
#define BOARD_NR_SPI 2
6075

6176
/* SPI pin numbers. */
62-
#define BOARD_SPI1_NSS_PIN 10
63-
#define BOARD_SPI1_MOSI_PIN 11
64-
#define BOARD_SPI1_MISO_PIN 12
65-
#define BOARD_SPI1_SCK_PIN 13
66-
#define BOARD_SPI2_NSS_PIN 31
67-
#define BOARD_SPI2_MOSI_PIN 34
68-
#define BOARD_SPI2_MISO_PIN 33
69-
#define BOARD_SPI2_SCK_PIN 32
77+
#define BOARD_SPI1_NSS_PIN PA4
78+
#define BOARD_SPI1_MOSI_PIN PA7
79+
#define BOARD_SPI1_MISO_PIN PA6
80+
#define BOARD_SPI1_SCK_PIN PA5
81+
#define BOARD_SPI2_NSS_PIN PB12
82+
#define BOARD_SPI2_MOSI_PIN PB15
83+
#define BOARD_SPI2_MISO_PIN PB14
84+
#define BOARD_SPI2_SCK_PIN PB13
7085

7186
/* Total number of GPIO pins that are broken out to headers and
7287
* intended for use. This includes pins like the LED, button, and

0 commit comments

Comments
 (0)