Revision 37bacabf modules/PowerManagement_1-1/board.h

View differences:

modules/PowerManagement_1-1/board.h
17 17
*/
18 18

  
19 19
/**
20
 * @file    
20
 * @file
21 21
 * @brief   PowerManagement v1.1 Board specific macros.
22 22
 *
23 23
 * @addtogroup powermanagement_board
......
299 299
 * in the initialization code.
300 300
 * Please refer to the STM32 Reference Manual for details.
301 301
 */
302
#define PIN_IGNORE(n)                   (1U << (n))
302 303
#define PIN_MODE_INPUT(n)               (0U << ((n) * 2U))
303 304
#define PIN_MODE_OUTPUT(n)              (1U << ((n) * 2U))
304 305
#define PIN_MODE_ALTERNATE(n)           (2U << ((n) * 2U))
......
336 337
 * PA14 - SWCLK                         (alternate 0 pushpull floating)
337 338
 * PA15 - SYS_SPI_SS1_N                 (input floating)
338 339
 */
340
#define VAL_GPIOA_IGNORE                0
339 341
#define VAL_GPIOA_MODER                 (PIN_MODE_INPUT(GPIOA_WKUP) |                                 \
340 342
                                         PIN_MODE_INPUT(GPIOA_PIN1) |                                 \
341 343
                                         PIN_MODE_INPUT(GPIOA_SYS_UART_TX) |                          \
......
453 455
 * PB14 - BT_CTS                        (inout floating)
454 456
 * PB15 - SYS_UART_UP                   (output opendrain high)
455 457
 */
458
#define VAL_GPIOB_IGNORE                (PIN_IGNORE(GPIOB_POWER_EN) |                                 \
459
                                         PIN_IGNORE(GPIOB_SYS_UART_DN) |                              \
460
                                         PIN_IGNORE(GPIOB_LED) |                                      \
461
                                         PIN_IGNORE(GPIOB_SYS_UART_UP)) & 0
456 462
#define VAL_GPIOB_MODER                 (PIN_MODE_INPUT(GPIOB_IR_INT1_N) |                            \
457 463
                                         PIN_MODE_ANALOG(GPIOB_VSYS_SENSE) |                          \
458 464
                                         PIN_MODE_OUTPUT(GPIOB_POWER_EN) |                            \
......
570 576
 * PC14 - SYS_WARMRST_N                 (output opendrain high)
571 577
 * PC15 - BT_RST                        (output opendrain high)
572 578
 */
579
#define VAL_GPIOC_IGNORE                (PIN_IGNORE(GPIOC_CHARGE_EN1_N) |                             \
580
                                         PIN_IGNORE(GPIOC_SYS_INT_N) |                                \
581
                                         PIN_IGNORE(GPIOC_SYS_PD_N)) & 0
573 582
#define VAL_GPIOC_MODER                 (PIN_MODE_INPUT(GPIOC_CHARGE_STAT1A) |                        \
574 583
                                         PIN_MODE_INPUT(GPIOC_GAUGE_BATLOW1) |                        \
575 584
                                         PIN_MODE_INPUT(GPIOC_GAUGE_BATGD1_N) |                       \
......
687 696
 * PD14 - PIN14                         (input floating)
688 697
 * PD15 - PIN15                         (input floating)
689 698
 */
699
#define VAL_GPIOD_IGNORE                (PIN_IGNORE(GPIOD_CHARGE_EN2_N)) & 0
690 700
#define VAL_GPIOD_MODER                 (PIN_MODE_INPUT(GPIOD_PIN0) |                                 \
691 701
                                         PIN_MODE_INPUT(GPIOD_PIN1) |                                 \
692 702
                                         PIN_MODE_OUTPUT(GPIOD_CHARGE_EN2_N) |                        \
......
804 814
 * PE14 - PIN14                         (input floating)
805 815
 * PE15 - PIN15                         (input floating)
806 816
 */
817
#define VAL_GPIOE_IGNORE                0
807 818
#define VAL_GPIOE_MODER                 (PIN_MODE_INPUT(GPIOE_PIN0) |                                 \
808 819
                                         PIN_MODE_INPUT(GPIOE_PIN1) |                                 \
809 820
                                         PIN_MODE_INPUT(GPIOE_PIN2) |                                 \
......
921 932
 * PF14 - PIN14                         (input floating)
922 933
 * PF15 - PIN15                         (input floating)
923 934
 */
935
#define VAL_GPIOF_IGNORE                0
924 936
#define VAL_GPIOF_MODER                 (PIN_MODE_INPUT(GPIOF_PIN0) |                                 \
925 937
                                         PIN_MODE_INPUT(GPIOF_PIN1) |                                 \
926 938
                                         PIN_MODE_INPUT(GPIOF_PIN2) |                                 \
......
1038 1050
 * PG14 - PIN14                         (input floating)
1039 1051
 * PG15 - PIN15                         (input floating)
1040 1052
 */
1053
#define VAL_GPIOG_IGNORE                0
1041 1054
#define VAL_GPIOG_MODER                 (PIN_MODE_INPUT(GPIOG_PIN0) |                                 \
1042 1055
                                         PIN_MODE_INPUT(GPIOG_PIN1) |                                 \
1043 1056
                                         PIN_MODE_INPUT(GPIOG_PIN2) |                                 \
......
1155 1168
 * PH14 - PIN14                         (input floating)
1156 1169
 * PH15 - PIN15                         (input floating)
1157 1170
 */
1171
#define VAL_GPIOH_IGNORE                0
1158 1172
#define VAL_GPIOH_MODER                 (PIN_MODE_INPUT(GPIOH_OSC_IN) |                               \
1159 1173
                                         PIN_MODE_INPUT(GPIOH_OSC_OUT) |                              \
1160 1174
                                         PIN_MODE_INPUT(GPIOH_PIN2) |                                 \
......
1272 1286
 * PI14 - PIN14                         (input floating)
1273 1287
 * PI15 - PIN15                         (input floating)
1274 1288
 */
1289
#define VAL_GPIOI_IGNORE                0
1275 1290
#define VAL_GPIOI_MODER                 (PIN_MODE_INPUT(GPIOI_PIN0) |                                 \
1276 1291
                                         PIN_MODE_INPUT(GPIOI_PIN1) |                                 \
1277 1292
                                         PIN_MODE_INPUT(GPIOI_PIN2) |                                 \

Also available in: Unified diff