diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-05-04 14:22:41 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-05-04 14:22:41 +0000 |
commit | 1d76faa7cba467f1f147f9e0dba2915c73427612 (patch) | |
tree | a543023b9a4bfddef494723f8da85e394f50d47d /os/hal/boards/ST_NUCLEO64_L053R8 | |
parent | e1e2af64f7096fecc1ca9cee407d1e23bd99b52e (diff) | |
download | ChibiOS-1d76faa7cba467f1f147f9e0dba2915c73427612.tar.gz ChibiOS-1d76faa7cba467f1f147f9e0dba2915c73427612.tar.bz2 ChibiOS-1d76faa7cba467f1f147f9e0dba2915c73427612.zip |
Revert part of last changes
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9411 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/boards/ST_NUCLEO64_L053R8')
-rw-r--r-- | os/hal/boards/ST_NUCLEO64_L053R8/board.h | 56 | ||||
-rw-r--r-- | os/hal/boards/ST_NUCLEO64_L053R8/cfg/board.chcfg | 40 |
2 files changed, 46 insertions, 50 deletions
diff --git a/os/hal/boards/ST_NUCLEO64_L053R8/board.h b/os/hal/boards/ST_NUCLEO64_L053R8/board.h index 3b67109b1..600ff9f10 100644 --- a/os/hal/boards/ST_NUCLEO64_L053R8/board.h +++ b/os/hal/boards/ST_NUCLEO64_L053R8/board.h @@ -84,9 +84,7 @@ #define GPIOB_ARD_D10 6U
#define GPIOB_PIN7 7U
#define GPIOB_ARD_D15 8U
-#define GPIOB_I2C1_SCL 8U
#define GPIOB_ARD_D14 9U
-#define GPIOB_I2C1_SDA 9U
#define GPIOB_ARD_D6 10U
#define GPIOB_PIN11 11U
#define GPIOB_PIN12 12U
@@ -178,9 +176,7 @@ #define LINE_ARD_D4 PAL_LINE(GPIOB, 5U)
#define LINE_ARD_D10 PAL_LINE(GPIOB, 6U)
#define LINE_ARD_D15 PAL_LINE(GPIOB, 8U)
-#define LINE_I2C1_SCL PAL_LINE(GPIOB, 8U)
#define LINE_ARD_D14 PAL_LINE(GPIOB, 9U)
-#define LINE_I2C1_SDA PAL_LINE(GPIOB, 9U)
#define LINE_ARD_D6 PAL_LINE(GPIOB, 10U)
#define LINE_ARD_A5 PAL_LINE(GPIOC, 0U)
@@ -221,11 +217,11 @@ /*
* GPIOA setup:
*
- * PA0 - ARD_A0 ACD1_IN0 (analog).
- * PA1 - ARD_A1 ACD1_IN1 (analog).
+ * PA0 - ARD_A0 ACD1_IN0 (input pullup).
+ * PA1 - ARD_A1 ACD1_IN1 (input pullup).
* PA2 - ARD_D1 USART2_TX (alternate 4).
* PA3 - ARD_D0 USART2_RX (alternate 4).
- * PA4 - ARD_A2 ACD1_IN4 (analog).
+ * PA4 - ARD_A2 ACD1_IN4 (input pullup).
* PA5 - LED_GREEN ARD_D13 (output pushpull maximum).
* PA6 - ARD_D12 (input pullup).
* PA7 - ARD_D11 (input pullup).
@@ -238,11 +234,11 @@ * PA14 - SWCLK (alternate 0).
* PA15 - PIN15 (input pullup).
*/
-#define VAL_GPIOA_MODER (PIN_MODE_ANALOG(GPIOA_ARD_A0) | \
- PIN_MODE_ANALOG(GPIOA_ARD_A1) | \
+#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | \
+ PIN_MODE_INPUT(GPIOA_ARD_A1) | \
PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | \
PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | \
- PIN_MODE_ANALOG(GPIOA_ARD_A2) | \
+ PIN_MODE_INPUT(GPIOA_ARD_A2) | \
PIN_MODE_OUTPUT(GPIOA_LED_GREEN) | \
PIN_MODE_INPUT(GPIOA_ARD_D12) | \
PIN_MODE_INPUT(GPIOA_ARD_D11) | \
@@ -286,11 +282,11 @@ PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
PIN_OSPEED_HIGH(GPIOA_PIN15))
-#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_ARD_A0) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A1) | \
+#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | \
PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | \
PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A2) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \
PIN_PUPDR_FLOATING(GPIOA_LED_GREEN) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | \
@@ -338,7 +334,7 @@ /*
* GPIOB setup:
*
- * PB0 - ARD_A3 ACD1_IN8 (analog).
+ * PB0 - ARD_A3 ACD1_IN8 (input pullup).
* PB1 - PIN1 (input pullup).
* PB2 - PIN2 (input pullup).
* PB3 - SWO ARD_D3 (alternate 0).
@@ -346,8 +342,8 @@ * PB5 - ARD_D4 (input pullup).
* PB6 - ARD_D10 (input pullup).
* PB7 - PIN7 (input pullup).
- * PB8 - ARD_D15 I2C1_SCL (alternate 4).
- * PB9 - ARD_D14 I2C1_SDA (alternate 4).
+ * PB8 - ARD_D15 (input pullup).
+ * PB9 - ARD_D14 (input pullup).
* PB10 - ARD_D6 (input pullup).
* PB11 - PIN11 (input pullup).
* PB12 - PIN12 (input pullup).
@@ -355,7 +351,7 @@ * PB14 - PIN14 (input pullup).
* PB15 - PIN15 (input pullup).
*/
-#define VAL_GPIOB_MODER (PIN_MODE_ANALOG(GPIOB_ARD_A3) | \
+#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_A3) | \
PIN_MODE_INPUT(GPIOB_PIN1) | \
PIN_MODE_INPUT(GPIOB_PIN2) | \
PIN_MODE_ALTERNATE(GPIOB_SWO) | \
@@ -363,8 +359,8 @@ PIN_MODE_INPUT(GPIOB_ARD_D4) | \
PIN_MODE_INPUT(GPIOB_ARD_D10) | \
PIN_MODE_INPUT(GPIOB_PIN7) | \
- PIN_MODE_ALTERNATE(GPIOB_ARD_D15) | \
- PIN_MODE_ALTERNATE(GPIOB_ARD_D14) | \
+ PIN_MODE_INPUT(GPIOB_ARD_D15) | \
+ PIN_MODE_INPUT(GPIOB_ARD_D14) | \
PIN_MODE_INPUT(GPIOB_ARD_D6) | \
PIN_MODE_INPUT(GPIOB_PIN11) | \
PIN_MODE_INPUT(GPIOB_PIN12) | \
@@ -403,7 +399,7 @@ PIN_OSPEED_HIGH(GPIOB_PIN13) | \
PIN_OSPEED_HIGH(GPIOB_PIN14) | \
PIN_OSPEED_HIGH(GPIOB_PIN15))
-#define VAL_GPIOB_PUPDR (PIN_PUPDR_FLOATING(GPIOB_ARD_A3) | \
+#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_A3) | \
PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
PIN_PUPDR_PULLUP(GPIOB_SWO) | \
@@ -411,8 +407,8 @@ PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D10) | \
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
- PIN_PUPDR_FLOATING(GPIOB_ARD_D15) | \
- PIN_PUPDR_FLOATING(GPIOB_ARD_D14) | \
+ PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | \
+ PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | \
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
@@ -443,8 +439,8 @@ PIN_AFIO_AF(GPIOB_ARD_D4, 0) | \
PIN_AFIO_AF(GPIOB_ARD_D10, 0) | \
PIN_AFIO_AF(GPIOB_PIN7, 0))
-#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 4) | \
- PIN_AFIO_AF(GPIOB_ARD_D14, 4) | \
+#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0) | \
+ PIN_AFIO_AF(GPIOB_ARD_D14, 0) | \
PIN_AFIO_AF(GPIOB_ARD_D6, 0) | \
PIN_AFIO_AF(GPIOB_PIN11, 0) | \
PIN_AFIO_AF(GPIOB_PIN12, 0) | \
@@ -455,8 +451,8 @@ /*
* GPIOC setup:
*
- * PC0 - ARD_A5 ACD1_IN10 (analog).
- * PC1 - ARD_A4 ACD1_IN11 (analog).
+ * PC0 - ARD_A5 ACD1_IN10 (input pullup).
+ * PC1 - ARD_A4 ACD1_IN11 (input pullup).
* PC2 - PIN2 (input pullup).
* PC3 - PIN3 (input pullup).
* PC4 - PIN4 (input pullup).
@@ -472,8 +468,8 @@ * PC14 - OSC32_IN (input floating).
* PC15 - OSC32_OUT (input floating).
*/
-#define VAL_GPIOC_MODER (PIN_MODE_ANALOG(GPIOC_ARD_A5) | \
- PIN_MODE_ANALOG(GPIOC_ARD_A4) | \
+#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A5) | \
+ PIN_MODE_INPUT(GPIOC_ARD_A4) | \
PIN_MODE_INPUT(GPIOC_PIN2) | \
PIN_MODE_INPUT(GPIOC_PIN3) | \
PIN_MODE_INPUT(GPIOC_PIN4) | \
@@ -520,8 +516,8 @@ PIN_OSPEED_HIGH(GPIOC_BUTTON) | \
PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
-#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_ARD_A5) | \
- PIN_PUPDR_FLOATING(GPIOC_ARD_A4) | \
+#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A5) | \
+ PIN_PUPDR_PULLUP(GPIOC_ARD_A4) | \
PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
diff --git a/os/hal/boards/ST_NUCLEO64_L053R8/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO64_L053R8/cfg/board.chcfg index ae4b74e04..bc8cba31a 100644 --- a/os/hal/boards/ST_NUCLEO64_L053R8/cfg/board.chcfg +++ b/os/hal/boards/ST_NUCLEO64_L053R8/cfg/board.chcfg @@ -21,16 +21,16 @@ Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin1 ID="ARD_A1 ACD1_IN1" Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin2 ID="ARD_D1 USART2_TX" @@ -53,8 +53,8 @@ Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin5 ID="LED_GREEN ARD_D13" @@ -151,8 +151,8 @@ Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin1 ID="" @@ -211,21 +211,21 @@ Mode="Input" Alternate="0" /> <pin8 - ID="ARD_D15 I2C1_SCL" + ID="ARD_D15" Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Alternate" - Alternate="4" /> + Resistor="PullUp" + Mode="Input" + Alternate="0" /> <pin9 - ID="ARD_D14 I2C1_SDA" + ID="ARD_D14" Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Alternate" - Alternate="4" /> + Resistor="PullUp" + Mode="Input" + Alternate="0" /> <pin10 ID="ARD_D6" Type="PushPull" @@ -281,16 +281,16 @@ Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin1 ID="ARD_A4 ACD1_IN11" Type="PushPull" Level="High" Speed="Maximum" - Resistor="Floating" - Mode="Analog" + Resistor="PullUp" + Mode="Input" Alternate="0" /> <pin2 ID="" |