From 90dac8f895f783abd8750e2b3b38a2d7cb98ab3c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 3 Nov 2015 13:13:01 +0000 Subject: Mass update for board files (only those with .chcfg files). git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8431 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/boards/ST_NUCLEO_F030R8/board.h | 184 ++++++++++++++++++--------------- 1 file changed, 101 insertions(+), 83 deletions(-) (limited to 'os/hal/boards/ST_NUCLEO_F030R8') diff --git a/os/hal/boards/ST_NUCLEO_F030R8/board.h b/os/hal/boards/ST_NUCLEO_F030R8/board.h index e31aa8e51..21b481886 100644 --- a/os/hal/boards/ST_NUCLEO_F030R8/board.h +++ b/os/hal/boards/ST_NUCLEO_F030R8/board.h @@ -137,6 +137,23 @@ #define GPIOF_PIN14 14U #define GPIOF_PIN15 15U +/* + * IO lines assignments. + */ +#define LINE_USART_TX PAL_LINE(GPIOA, 2U) +#define LINE_USART_RX PAL_LINE(GPIOA, 3U) +#define LINE_LED_GREEN PAL_LINE(GPIOA, 5U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SWO PAL_LINE(GPIOB, 3U) + +#define LINE_BUTTON PAL_LINE(GPIOC, 13U) + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + /* * I/O ports initial setup, this configuration is established soon after reset * in the initialization code. @@ -150,9 +167,10 @@ #define PIN_ODR_HIGH(n) (1U << (n)) #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_2M(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_10M(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_40M(n) (3U << ((n) * 2U)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) @@ -210,22 +228,22 @@ PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_40M(GPIOA_PIN0) | \ - PIN_OSPEED_40M(GPIOA_PIN1) | \ - PIN_OSPEED_10M(GPIOA_USART_TX) | \ - PIN_OSPEED_10M(GPIOA_USART_RX) | \ - PIN_OSPEED_40M(GPIOA_PIN4) | \ - PIN_OSPEED_10M(GPIOA_LED_GREEN) | \ - PIN_OSPEED_40M(GPIOA_PIN6) | \ - PIN_OSPEED_40M(GPIOA_PIN7) | \ - PIN_OSPEED_40M(GPIOA_PIN8) | \ - PIN_OSPEED_40M(GPIOA_PIN9) | \ - PIN_OSPEED_40M(GPIOA_PIN10) | \ - PIN_OSPEED_40M(GPIOA_PIN11) | \ - PIN_OSPEED_40M(GPIOA_PIN12) | \ - PIN_OSPEED_40M(GPIOA_SWDIO) | \ - PIN_OSPEED_40M(GPIOA_SWCLK) | \ - PIN_OSPEED_40M(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_PIN0) | \ + PIN_OSPEED_HIGH(GPIOA_PIN1) | \ + PIN_OSPEED_LOW(GPIOA_USART_TX) | \ + PIN_OSPEED_LOW(GPIOA_USART_RX) | \ + PIN_OSPEED_HIGH(GPIOA_PIN4) | \ + PIN_OSPEED_LOW(GPIOA_LED_GREEN) | \ + PIN_OSPEED_HIGH(GPIOA_PIN6) | \ + PIN_OSPEED_HIGH(GPIOA_PIN7) | \ + PIN_OSPEED_HIGH(GPIOA_PIN8) | \ + PIN_OSPEED_HIGH(GPIOA_PIN9) | \ + PIN_OSPEED_HIGH(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_PIN11) | \ + PIN_OSPEED_HIGH(GPIOA_PIN12) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) #define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ PIN_PUPDR_FLOATING(GPIOA_USART_TX) | \ @@ -327,22 +345,22 @@ PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_40M(GPIOB_PIN0) | \ - PIN_OSPEED_40M(GPIOB_PIN1) | \ - PIN_OSPEED_40M(GPIOB_PIN2) | \ - PIN_OSPEED_40M(GPIOB_SWO) | \ - PIN_OSPEED_40M(GPIOB_PIN4) | \ - PIN_OSPEED_40M(GPIOB_PIN5) | \ - PIN_OSPEED_40M(GPIOB_PIN6) | \ - PIN_OSPEED_40M(GPIOB_PIN7) | \ - PIN_OSPEED_40M(GPIOB_PIN8) | \ - PIN_OSPEED_40M(GPIOB_PIN9) | \ - PIN_OSPEED_40M(GPIOB_PIN10) | \ - PIN_OSPEED_40M(GPIOB_PIN11) | \ - PIN_OSPEED_40M(GPIOB_PIN12) | \ - PIN_OSPEED_40M(GPIOB_PIN13) | \ - PIN_OSPEED_40M(GPIOB_PIN14) | \ - PIN_OSPEED_40M(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_PIN0) | \ + PIN_OSPEED_HIGH(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_SWO) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_HIGH(GPIOB_PIN5) | \ + PIN_OSPEED_HIGH(GPIOB_PIN6) | \ + PIN_OSPEED_HIGH(GPIOB_PIN7) | \ + PIN_OSPEED_HIGH(GPIOB_PIN8) | \ + PIN_OSPEED_HIGH(GPIOB_PIN9) | \ + PIN_OSPEED_HIGH(GPIOB_PIN10) | \ + PIN_OSPEED_HIGH(GPIOB_PIN11) | \ + PIN_OSPEED_HIGH(GPIOB_PIN12) | \ + PIN_OSPEED_HIGH(GPIOB_PIN13) | \ + PIN_OSPEED_HIGH(GPIOB_PIN14) | \ + PIN_OSPEED_HIGH(GPIOB_PIN15)) #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ @@ -444,22 +462,22 @@ PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | \ PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_40M(GPIOC_PIN0) | \ - PIN_OSPEED_40M(GPIOC_PIN1) | \ - PIN_OSPEED_40M(GPIOC_PIN2) | \ - PIN_OSPEED_40M(GPIOC_PIN3) | \ - PIN_OSPEED_40M(GPIOC_PIN4) | \ - PIN_OSPEED_40M(GPIOC_PIN5) | \ - PIN_OSPEED_40M(GPIOC_PIN6) | \ - PIN_OSPEED_40M(GPIOC_PIN7) | \ - PIN_OSPEED_40M(GPIOC_PIN8) | \ - PIN_OSPEED_40M(GPIOC_PIN9) | \ - PIN_OSPEED_40M(GPIOC_PIN10) | \ - PIN_OSPEED_40M(GPIOC_PIN11) | \ - PIN_OSPEED_40M(GPIOC_PIN12) | \ - PIN_OSPEED_40M(GPIOC_BUTTON) | \ - PIN_OSPEED_40M(GPIOC_PIN14) | \ - PIN_OSPEED_40M(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ + PIN_OSPEED_HIGH(GPIOC_PIN1) | \ + PIN_OSPEED_HIGH(GPIOC_PIN2) | \ + PIN_OSPEED_HIGH(GPIOC_PIN3) | \ + PIN_OSPEED_HIGH(GPIOC_PIN4) | \ + PIN_OSPEED_HIGH(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_PIN6) | \ + PIN_OSPEED_HIGH(GPIOC_PIN7) | \ + PIN_OSPEED_HIGH(GPIOC_PIN8) | \ + PIN_OSPEED_HIGH(GPIOC_PIN9) | \ + PIN_OSPEED_HIGH(GPIOC_PIN10) | \ + PIN_OSPEED_HIGH(GPIOC_PIN11) | \ + PIN_OSPEED_HIGH(GPIOC_PIN12) | \ + PIN_OSPEED_HIGH(GPIOC_BUTTON) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ @@ -561,22 +579,22 @@ PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_40M(GPIOD_PIN0) | \ - PIN_OSPEED_40M(GPIOD_PIN1) | \ - PIN_OSPEED_40M(GPIOD_PIN2) | \ - PIN_OSPEED_40M(GPIOD_PIN3) | \ - PIN_OSPEED_40M(GPIOD_PIN4) | \ - PIN_OSPEED_40M(GPIOD_PIN5) | \ - PIN_OSPEED_40M(GPIOD_PIN6) | \ - PIN_OSPEED_40M(GPIOD_PIN7) | \ - PIN_OSPEED_40M(GPIOD_PIN8) | \ - PIN_OSPEED_40M(GPIOD_PIN9) | \ - PIN_OSPEED_40M(GPIOD_PIN10) | \ - PIN_OSPEED_40M(GPIOD_PIN11) | \ - PIN_OSPEED_40M(GPIOD_PIN12) | \ - PIN_OSPEED_40M(GPIOD_PIN13) | \ - PIN_OSPEED_40M(GPIOD_PIN14) | \ - PIN_OSPEED_40M(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \ + PIN_OSPEED_HIGH(GPIOD_PIN1) | \ + PIN_OSPEED_HIGH(GPIOD_PIN2) | \ + PIN_OSPEED_HIGH(GPIOD_PIN3) | \ + PIN_OSPEED_HIGH(GPIOD_PIN4) | \ + PIN_OSPEED_HIGH(GPIOD_PIN5) | \ + PIN_OSPEED_HIGH(GPIOD_PIN6) | \ + PIN_OSPEED_HIGH(GPIOD_PIN7) | \ + PIN_OSPEED_HIGH(GPIOD_PIN8) | \ + PIN_OSPEED_HIGH(GPIOD_PIN9) | \ + PIN_OSPEED_HIGH(GPIOD_PIN10) | \ + PIN_OSPEED_HIGH(GPIOD_PIN11) | \ + PIN_OSPEED_HIGH(GPIOD_PIN12) | \ + PIN_OSPEED_HIGH(GPIOD_PIN13) | \ + PIN_OSPEED_HIGH(GPIOD_PIN14) | \ + PIN_OSPEED_HIGH(GPIOD_PIN15)) #define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ @@ -678,22 +696,22 @@ PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_2M(GPIOF_OSC_IN) | \ - PIN_OSPEED_2M(GPIOF_OSC_OUT) | \ - PIN_OSPEED_2M(GPIOF_PIN2) | \ - PIN_OSPEED_2M(GPIOF_PIN3) | \ - PIN_OSPEED_2M(GPIOF_PIN4) | \ - PIN_OSPEED_2M(GPIOF_PIN5) | \ - PIN_OSPEED_2M(GPIOF_PIN6) | \ - PIN_OSPEED_2M(GPIOF_PIN7) | \ - PIN_OSPEED_2M(GPIOF_PIN8) | \ - PIN_OSPEED_2M(GPIOF_PIN9) | \ - PIN_OSPEED_2M(GPIOF_PIN10) | \ - PIN_OSPEED_2M(GPIOF_PIN11) | \ - PIN_OSPEED_2M(GPIOF_PIN12) | \ - PIN_OSPEED_2M(GPIOF_PIN13) | \ - PIN_OSPEED_2M(GPIOF_PIN14) | \ - PIN_OSPEED_2M(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) #define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ -- cgit v1.2.3