Revision 340f2bdf modules/PowerManagement_1-1/board.h

View differences:

modules/PowerManagement_1-1/board.h
313 313
 * in the initialization code.
314 314
 * Please refer to the STM32 Reference Manual for details.
315 315
 */
316
#define PIN_IGNORE(n)                   (1U << (n))
317 316
#define PIN_MODE_INPUT(n)               (0U << ((n) * 2U))
318 317
#define PIN_MODE_OUTPUT(n)              (1U << ((n) * 2U))
319 318
#define PIN_MODE_ALTERNATE(n)           (2U << ((n) * 2U))
......
351 350
 * PA14 - SWCLK                         (alternate 0 pushpull floating)
352 351
 * PA15 - SYS_SPI_SS1_N                 (input floating)
353 352
 */
354
#define VAL_GPIOA_IGNORE                0
355 353
#define VAL_GPIOA_MODER                 (PIN_MODE_INPUT(GPIOA_WKUP) |                                 \
356 354
                                         PIN_MODE_INPUT(GPIOA_PIN1) |                                 \
357 355
                                         PIN_MODE_INPUT(GPIOA_SYS_UART_TX) |                          \
......
469 467
 * PB14 - BT_CTS                        (inout floating)
470 468
 * PB15 - SYS_UART_UP                   (output opendrain high)
471 469
 */
472
#define VAL_GPIOB_IGNORE                (PIN_IGNORE(GPIOB_POWER_EN) |                                 \
473
                                         PIN_IGNORE(GPIOB_SYS_UART_DN) |                              \
474
                                         PIN_IGNORE(GPIOB_LED) |                                      \
475
                                         PIN_IGNORE(GPIOB_SYS_UART_UP)) & 0
476 470
#define VAL_GPIOB_MODER                 (PIN_MODE_INPUT(GPIOB_IR_INT1_N) |                            \
477 471
                                         PIN_MODE_ANALOG(GPIOB_VSYS_SENSE) |                          \
478 472
                                         PIN_MODE_OUTPUT(GPIOB_POWER_EN) |                            \
......
590 584
 * PC14 - SYS_WARMRST_N                 (output opendrain high)
591 585
 * PC15 - BT_RST                        (output opendrain high)
592 586
 */
593
#define VAL_GPIOC_IGNORE                (PIN_IGNORE(GPIOC_CHARGE_EN1_N) |                             \
594
                                         PIN_IGNORE(GPIOC_SYS_INT_N) |                                \
595
                                         PIN_IGNORE(GPIOC_SYS_PD_N)) & 0
596 587
#define VAL_GPIOC_MODER                 (PIN_MODE_INPUT(GPIOC_CHARGE_STAT1A) |                        \
597 588
                                         PIN_MODE_INPUT(GPIOC_GAUGE_BATLOW1) |                        \
598 589
                                         PIN_MODE_INPUT(GPIOC_GAUGE_BATGD1_N) |                       \
......
710 701
 * PD14 - PIN14                         (input floating)
711 702
 * PD15 - PIN15                         (input floating)
712 703
 */
713
#define VAL_GPIOD_IGNORE                (PIN_IGNORE(GPIOD_CHARGE_EN2_N)) & 0
714 704
#define VAL_GPIOD_MODER                 (PIN_MODE_INPUT(GPIOD_PIN0) |                                 \
715 705
                                         PIN_MODE_INPUT(GPIOD_PIN1) |                                 \
716 706
                                         PIN_MODE_OUTPUT(GPIOD_CHARGE_EN2_N) |                        \
......
828 818
 * PE14 - PIN14                         (input floating)
829 819
 * PE15 - PIN15                         (input floating)
830 820
 */
831
#define VAL_GPIOE_IGNORE                0
832 821
#define VAL_GPIOE_MODER                 (PIN_MODE_INPUT(GPIOE_PIN0) |                                 \
833 822
                                         PIN_MODE_INPUT(GPIOE_PIN1) |                                 \
834 823
                                         PIN_MODE_INPUT(GPIOE_PIN2) |                                 \
......
946 935
 * PF14 - PIN14                         (input floating)
947 936
 * PF15 - PIN15                         (input floating)
948 937
 */
949
#define VAL_GPIOF_IGNORE                0
950 938
#define VAL_GPIOF_MODER                 (PIN_MODE_INPUT(GPIOF_PIN0) |                                 \
951 939
                                         PIN_MODE_INPUT(GPIOF_PIN1) |                                 \
952 940
                                         PIN_MODE_INPUT(GPIOF_PIN2) |                                 \
......
1064 1052
 * PG14 - PIN14                         (input floating)
1065 1053
 * PG15 - PIN15                         (input floating)
1066 1054
 */
1067
#define VAL_GPIOG_IGNORE                0
1068 1055
#define VAL_GPIOG_MODER                 (PIN_MODE_INPUT(GPIOG_PIN0) |                                 \
1069 1056
                                         PIN_MODE_INPUT(GPIOG_PIN1) |                                 \
1070 1057
                                         PIN_MODE_INPUT(GPIOG_PIN2) |                                 \
......
1182 1169
 * PH14 - PIN14                         (input floating)
1183 1170
 * PH15 - PIN15                         (input floating)
1184 1171
 */
1185
#define VAL_GPIOH_IGNORE                0
1186 1172
#define VAL_GPIOH_MODER                 (PIN_MODE_INPUT(GPIOH_OSC_IN) |                               \
1187 1173
                                         PIN_MODE_INPUT(GPIOH_OSC_OUT) |                              \
1188 1174
                                         PIN_MODE_INPUT(GPIOH_PIN2) |                                 \
......
1300 1286
 * PI14 - PIN14                         (input floating)
1301 1287
 * PI15 - PIN15                         (input floating)
1302 1288
 */
1303
#define VAL_GPIOI_IGNORE                0
1304 1289
#define VAL_GPIOI_MODER                 (PIN_MODE_INPUT(GPIOI_PIN0) |                                 \
1305 1290
                                         PIN_MODE_INPUT(GPIOI_PIN1) |                                 \
1306 1291
                                         PIN_MODE_INPUT(GPIOI_PIN2) |                                 \

Also available in: Unified diff