Updated STM32F3 Discovery board files adding some MEMS related macros
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9118 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
f8c3221de9
commit
1e249573bc
|
@ -57,8 +57,11 @@
|
|||
#define GPIOA_PIN3 3U
|
||||
#define GPIOA_PIN4 4U
|
||||
#define GPIOA_SPI1_SCK 5U
|
||||
#define GPIOA_L3GD20_SCL 5U
|
||||
#define GPIOA_SPI1_MISO 6U
|
||||
#define GPIOA_L3GD20_SDO 6U
|
||||
#define GPIOA_SPI1_MOSI 7U
|
||||
#define GPIOA_L3GD20_SDI 7U
|
||||
#define GPIOA_PIN8 8U
|
||||
#define GPIOA_PIN9 9U
|
||||
#define GPIOA_PIN10 10U
|
||||
|
@ -75,7 +78,9 @@
|
|||
#define GPIOB_PIN4 4U
|
||||
#define GPIOB_PIN5 5U
|
||||
#define GPIOB_I2C1_SCL 6U
|
||||
#define GPIOB_LSM303DLHC_SCL 6U
|
||||
#define GPIOB_I2C1_SDA 7U
|
||||
#define GPIOB_LSM303DLHC_SDA 7U
|
||||
#define GPIOB_PIN8 8U
|
||||
#define GPIOB_PIN9 9U
|
||||
#define GPIOB_PIN10 10U
|
||||
|
@ -121,10 +126,11 @@
|
|||
|
||||
#define GPIOE_L3GD20_INT1 0U
|
||||
#define GPIOE_L3GD20_INT2 1U
|
||||
#define GPIOE_LSM303_DRDY 2U
|
||||
#define GPIOE_LSM303DLHC_DRDY 2U
|
||||
#define GPIOE_SPI1_CS 3U
|
||||
#define GPIOE_LSM303_INT1 4U
|
||||
#define GPIOE_LSM303_INT2 5U
|
||||
#define GPIOE_L3GD20_CS 3U
|
||||
#define GPIOE_LSM303DLHC_INT1 4U
|
||||
#define GPIOE_LSM303DLHC_INT2 5U
|
||||
#define GPIOE_PIN6 6U
|
||||
#define GPIOE_PIN7 7U
|
||||
#define GPIOE_LED4_BLUE 8U
|
||||
|
@ -192,8 +198,11 @@
|
|||
*/
|
||||
#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
|
||||
#define LINE_SPI1_SCK PAL_LINE(GPIOA, 5U)
|
||||
#define LINE_L3GD20_SCL PAL_LINE(GPIOA, 5U)
|
||||
#define LINE_SPI1_MISO PAL_LINE(GPIOA, 6U)
|
||||
#define LINE_L3GD20_SDO PAL_LINE(GPIOA, 6U)
|
||||
#define LINE_SPI1_MOSI PAL_LINE(GPIOA, 7U)
|
||||
#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
|
||||
#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
|
||||
#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
|
||||
#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
|
||||
|
@ -201,7 +210,9 @@
|
|||
|
||||
#define LINE_SWO PAL_LINE(GPIOB, 3U)
|
||||
#define LINE_I2C1_SCL PAL_LINE(GPIOB, 6U)
|
||||
#define LINE_LSM303DLHC_SCL PAL_LINE(GPIOB, 6U)
|
||||
#define LINE_I2C1_SDA PAL_LINE(GPIOB, 7U)
|
||||
#define LINE_LSM303DLHC_SDA PAL_LINE(GPIOB, 7U)
|
||||
|
||||
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
|
||||
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
|
||||
|
@ -209,10 +220,11 @@
|
|||
|
||||
#define LINE_L3GD20_INT1 PAL_LINE(GPIOE, 0U)
|
||||
#define LINE_L3GD20_INT2 PAL_LINE(GPIOE, 1U)
|
||||
#define LINE_LSM303_DRDY PAL_LINE(GPIOE, 2U)
|
||||
#define LINE_LSM303DLHC_DRDY PAL_LINE(GPIOE, 2U)
|
||||
#define LINE_SPI1_CS PAL_LINE(GPIOE, 3U)
|
||||
#define LINE_LSM303_INT1 PAL_LINE(GPIOE, 4U)
|
||||
#define LINE_LSM303_INT2 PAL_LINE(GPIOE, 5U)
|
||||
#define LINE_L3GD20_CS PAL_LINE(GPIOE, 3U)
|
||||
#define LINE_LSM303DLHC_INT1 PAL_LINE(GPIOE, 4U)
|
||||
#define LINE_LSM303DLHC_INT2 PAL_LINE(GPIOE, 5U)
|
||||
#define LINE_LED4_BLUE PAL_LINE(GPIOE, 8U)
|
||||
#define LINE_LED3_RED PAL_LINE(GPIOE, 9U)
|
||||
#define LINE_LED5_ORANGE PAL_LINE(GPIOE, 10U)
|
||||
|
@ -257,9 +269,9 @@
|
|||
* PA2 - PIN2 (input pullup).
|
||||
* PA3 - PIN3 (input pullup).
|
||||
* PA4 - PIN4 (input pullup).
|
||||
* PA5 - SPI1_SCK (alternate 5).
|
||||
* PA6 - SPI1_MISO (alternate 5).
|
||||
* PA7 - SPI1_MOSI (alternate 5).
|
||||
* PA5 - SPI1_SCK L3GD20_SCL (alternate 5).
|
||||
* PA6 - SPI1_MISO L3GD20_SDO (alternate 5).
|
||||
* PA7 - SPI1_MOSI L3GD20_SDI (alternate 5).
|
||||
* PA8 - PIN8 (input pullup).
|
||||
* PA9 - PIN9 (input pullup).
|
||||
* PA10 - PIN10 (input pullup).
|
||||
|
@ -375,8 +387,8 @@
|
|||
* PB3 - SWO (alternate 0).
|
||||
* PB4 - PIN4 (input pullup).
|
||||
* PB5 - PIN5 (input pullup).
|
||||
* PB6 - I2C1_SCL (alternate 4).
|
||||
* PB7 - I2C1_SDA (alternate 4).
|
||||
* PB6 - I2C1_SCL LSM303DLHC_SCL (alternate 4).
|
||||
* PB7 - I2C1_SDA LSM303DLHC_SDA (alternate 4).
|
||||
* PB8 - PIN8 (input pullup).
|
||||
* PB9 - PIN9 (input pullup).
|
||||
* PB10 - PIN10 (input pullup).
|
||||
|
@ -722,10 +734,10 @@
|
|||
*
|
||||
* PE0 - L3GD20_INT1 (input pullup).
|
||||
* PE1 - L3GD20_INT2 (input pullup).
|
||||
* PE2 - LSM303_DRDY (input pullup).
|
||||
* PE3 - SPI1_CS (output pushpull maximum).
|
||||
* PE4 - LSM303_INT1 (input pullup).
|
||||
* PE5 - LSM303_INT2 (input pullup).
|
||||
* PE2 - LSM303DLHC_DRDY (input pullup).
|
||||
* PE3 - SPI1_CS L3GD20_CS (output pushpull maximum).
|
||||
* PE4 - LSM303DLHC_INT1 (input pullup).
|
||||
* PE5 - LSM303DLHC_INT2 (input pullup).
|
||||
* PE6 - PIN6 (input pullup).
|
||||
* PE7 - PIN7 (input pullup).
|
||||
* PE8 - LED4_BLUE (output pushpull maximum).
|
||||
|
@ -739,10 +751,10 @@
|
|||
*/
|
||||
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_L3GD20_INT1) | \
|
||||
PIN_MODE_INPUT(GPIOE_L3GD20_INT2) | \
|
||||
PIN_MODE_INPUT(GPIOE_LSM303_DRDY) | \
|
||||
PIN_MODE_INPUT(GPIOE_LSM303DLHC_DRDY) |\
|
||||
PIN_MODE_OUTPUT(GPIOE_SPI1_CS) | \
|
||||
PIN_MODE_INPUT(GPIOE_LSM303_INT1) | \
|
||||
PIN_MODE_INPUT(GPIOE_LSM303_INT2) | \
|
||||
PIN_MODE_INPUT(GPIOE_LSM303DLHC_INT1) |\
|
||||
PIN_MODE_INPUT(GPIOE_LSM303DLHC_INT2) |\
|
||||
PIN_MODE_INPUT(GPIOE_PIN6) | \
|
||||
PIN_MODE_INPUT(GPIOE_PIN7) | \
|
||||
PIN_MODE_OUTPUT(GPIOE_LED4_BLUE) | \
|
||||
|
@ -755,10 +767,10 @@
|
|||
PIN_MODE_OUTPUT(GPIOE_LED6_GREEN))
|
||||
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT1) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT2) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303_DRDY) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_DRDY) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_SPI1_CS) | \
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303_INT1) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303_INT2) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT1) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT2) |\
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
|
||||
PIN_OTYPE_PUSHPULL(GPIOE_LED4_BLUE) | \
|
||||
|
@ -771,10 +783,10 @@
|
|||
PIN_OTYPE_PUSHPULL(GPIOE_LED6_GREEN))
|
||||
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_L3GD20_INT1) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_L3GD20_INT2) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303_DRDY) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303DLHC_DRDY) |\
|
||||
PIN_OSPEED_HIGH(GPIOE_SPI1_CS) | \
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303_INT1) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303_INT2) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303DLHC_INT1) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_LSM303DLHC_INT2) |\
|
||||
PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
|
||||
PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
|
||||
PIN_OSPEED_HIGH(GPIOE_LED4_BLUE) | \
|
||||
|
@ -787,10 +799,10 @@
|
|||
PIN_OSPEED_HIGH(GPIOE_LED6_GREEN))
|
||||
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT1) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT2) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303_DRDY) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_DRDY) |\
|
||||
PIN_PUPDR_FLOATING(GPIOE_SPI1_CS) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303_INT1) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303_INT2) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT1) |\
|
||||
PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT2) |\
|
||||
PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
|
||||
PIN_PUPDR_PULLUP(GPIOE_LED4_BLUE) | \
|
||||
|
@ -803,10 +815,10 @@
|
|||
PIN_PUPDR_FLOATING(GPIOE_LED6_GREEN))
|
||||
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_L3GD20_INT1) | \
|
||||
PIN_ODR_HIGH(GPIOE_L3GD20_INT2) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303_DRDY) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303DLHC_DRDY) | \
|
||||
PIN_ODR_HIGH(GPIOE_SPI1_CS) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303_INT1) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303_INT2) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT1) | \
|
||||
PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT2) | \
|
||||
PIN_ODR_HIGH(GPIOE_PIN6) | \
|
||||
PIN_ODR_HIGH(GPIOE_PIN7) | \
|
||||
PIN_ODR_LOW(GPIOE_LED4_BLUE) | \
|
||||
|
@ -819,10 +831,10 @@
|
|||
PIN_ODR_LOW(GPIOE_LED6_GREEN))
|
||||
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_L3GD20_INT1, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_L3GD20_INT2, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_LSM303_DRDY, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_LSM303DLHC_DRDY, 0) |\
|
||||
PIN_AFIO_AF(GPIOE_SPI1_CS, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_LSM303_INT1, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_LSM303_INT2, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_LSM303DLHC_INT1, 0) |\
|
||||
PIN_AFIO_AF(GPIOE_LSM303DLHC_INT2, 0) |\
|
||||
PIN_AFIO_AF(GPIOE_PIN6, 0) | \
|
||||
PIN_AFIO_AF(GPIOE_PIN7, 0))
|
||||
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_LED4_BLUE, 0) | \
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
Mode="Input"
|
||||
Alternate="0" />
|
||||
<pin5
|
||||
ID="SPI1_SCK"
|
||||
ID="SPI1_SCK L3GD20_SCL"
|
||||
Type="PushPull"
|
||||
Speed="Maximum"
|
||||
Resistor="Floating"
|
||||
|
@ -65,7 +65,7 @@
|
|||
Mode="Alternate"
|
||||
Alternate="5" ></pin5>
|
||||
<pin6
|
||||
ID="SPI1_MISO"
|
||||
ID="SPI1_MISO L3GD20_SDO"
|
||||
Type="PushPull"
|
||||
Speed="Maximum"
|
||||
Resistor="PullUp"
|
||||
|
@ -73,7 +73,7 @@
|
|||
Mode="Alternate"
|
||||
Alternate="5" />
|
||||
<pin7
|
||||
ID="SPI1_MOSI"
|
||||
ID="SPI1_MOSI L3GD20_SDI"
|
||||
Type="PushPull"
|
||||
Speed="Maximum"
|
||||
Resistor="Floating"
|
||||
|
@ -195,7 +195,7 @@
|
|||
Mode="Input"
|
||||
Alternate="0" ></pin5>
|
||||
<pin6
|
||||
ID="I2C1_SCL"
|
||||
ID="I2C1_SCL LSM303DLHC_SCL"
|
||||
Type="OpenDrain"
|
||||
Speed="Maximum"
|
||||
Resistor="Floating"
|
||||
|
@ -203,7 +203,7 @@
|
|||
Mode="Alternate"
|
||||
Alternate="4" />
|
||||
<pin7
|
||||
ID="I2C1_SDA"
|
||||
ID="I2C1_SDA LSM303DLHC_SDA"
|
||||
Type="OpenDrain"
|
||||
Speed="Maximum"
|
||||
Resistor="Floating"
|
||||
|
@ -553,7 +553,7 @@
|
|||
Mode="Input"
|
||||
Alternate="0" />
|
||||
<pin2
|
||||
ID="LSM303_DRDY"
|
||||
ID="LSM303DLHC_DRDY"
|
||||
Type="PushPull"
|
||||
Speed="Minimum"
|
||||
Resistor="PullUp"
|
||||
|
@ -561,7 +561,7 @@
|
|||
Mode="Input"
|
||||
Alternate="0" />
|
||||
<pin3
|
||||
ID="SPI1_CS"
|
||||
ID="SPI1_CS L3GD20_CS"
|
||||
Type="PushPull"
|
||||
Speed="Maximum"
|
||||
Resistor="Floating"
|
||||
|
@ -569,7 +569,7 @@
|
|||
Mode="Output"
|
||||
Alternate="0" ></pin3>
|
||||
<pin4
|
||||
ID="LSM303_INT1"
|
||||
ID="LSM303DLHC_INT1"
|
||||
Type="PushPull"
|
||||
Speed="Minimum"
|
||||
Resistor="PullUp"
|
||||
|
@ -577,7 +577,7 @@
|
|||
Mode="Input"
|
||||
Alternate="0" />
|
||||
<pin5
|
||||
ID="LSM303_INT2"
|
||||
ID="LSM303DLHC_INT2"
|
||||
Type="PushPull"
|
||||
Speed="Minimum"
|
||||
Resistor="PullUp"
|
||||
|
|
Loading…
Reference in New Issue