|
521 | 521 |
|
522 | 522 | #endif |
523 | 523 |
|
| 524 | +#if defined (STM32WB15xx) || defined (STM32WB10xx) |
| 525 | +/** |
| 526 | + * @brief AF 0 selection |
| 527 | + */ |
| 528 | +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ |
| 529 | +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ |
| 530 | +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ |
| 531 | +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ |
| 532 | +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ |
| 533 | +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ |
| 534 | +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ |
| 535 | +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ |
| 536 | + |
| 537 | + /** |
| 538 | + * @brief AF 1 selection |
| 539 | + */ |
| 540 | +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ |
| 541 | +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ |
| 542 | +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ |
| 543 | + |
| 544 | +/** |
| 545 | + * @brief AF 2 selection |
| 546 | + */ |
| 547 | +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ |
| 548 | +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ |
| 549 | + |
| 550 | +/** |
| 551 | + * @brief AF 3 selection |
| 552 | + */ |
| 553 | +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ |
| 554 | + |
| 555 | +/** |
| 556 | + * @brief AF 4 selection |
| 557 | + */ |
| 558 | +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ |
| 559 | +#define GPIO_AF4_SPI1 ((uint8_t)0x04) /*!< SPI1 Alternate Function mapping */ |
| 560 | + |
| 561 | +/** |
| 562 | + * @brief AF 5 selection |
| 563 | + */ |
| 564 | +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ |
| 565 | + |
| 566 | +/** |
| 567 | + * @brief AF 6 selection |
| 568 | + */ |
| 569 | +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ |
| 570 | +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ |
| 571 | +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ |
| 572 | +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ |
| 573 | +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ |
| 574 | +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ |
| 575 | +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ |
| 576 | +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ |
| 577 | +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ |
| 578 | +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ |
| 579 | +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ |
| 580 | +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ |
| 581 | +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ |
| 582 | +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ |
| 583 | +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ |
| 584 | +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ |
| 585 | +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ |
| 586 | +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ |
| 587 | +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ |
| 588 | +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ |
| 589 | +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ |
| 590 | +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ |
| 591 | +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ |
| 592 | +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ |
| 593 | +/** |
| 594 | + * @brief AF 7 selection |
| 595 | + */ |
| 596 | +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ |
| 597 | + |
| 598 | +/** |
| 599 | + * @brief AF 8 selection |
| 600 | + */ |
| 601 | +#define GPIO_AF8_LPUART1 ((uint8_t)0x08) /*!< LPUART1 Alternate Function mapping */ |
| 602 | + |
| 603 | +/** |
| 604 | + * @brief AF 9 selection |
| 605 | + */ |
| 606 | + #define GPIO_AF9_TSC ((uint8_t)0x09) /*!< TSC Alternate Function mapping */ |
| 607 | + |
| 608 | +/** |
| 609 | + * @brief AF 12 selection |
| 610 | + */ |
| 611 | +#define GPIO_AF12_COMP1 ((uint8_t)0x0c) /*!< COMP1 Alternate Function mapping */ |
| 612 | +#define GPIO_AF12_TIM1 ((uint8_t)0x0c) /*!< TIM1 Alternate Function mapping */ |
| 613 | + |
| 614 | +/** |
| 615 | + * @brief AF 14 selection |
| 616 | + */ |
| 617 | +#define GPIO_AF14_TIM2 ((uint8_t)0x0e) /*!< TIM2 Alternate Function mapping */ |
| 618 | +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0e) /*!< LPTIM2 Alternate Function mapping */ |
| 619 | + |
| 620 | + |
| 621 | +/** |
| 622 | +* @brief AF 15 selection |
| 623 | +*/ |
| 624 | +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0f) /*!< EVENTOUT Alternate Function mapping */ |
| 625 | + |
| 626 | +#define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0f) |
| 627 | +#endif |
524 | 628 |
|
525 | 629 | /** |
526 | 630 | * @} |
|
0 commit comments