stm8: make all OPT2 fields available

This commit is contained in:
King Kévin 2022-09-26 18:00:44 +02:00
parent a5d5844237
commit 8535a738de
1 changed files with 11 additions and 6 deletions

17
stm8s.h
View File

@ -3294,26 +3294,31 @@ typedef union {
uint8_t reg; /*!< type used for register access */
} OPT_NOPT1_type; /*!< */
// NOTE: OPT2 fields depends on device's pin count
typedef union {
struct {
uint8_t :1; /*!< bit 0: Reserved */
uint8_t AFR0:1; /*!< bit 0: Alternate function remapping option 0 */
uint8_t AFR1:1; /*!< bit 1: Alternate function remapping option 1 */
uint8_t :3; /*!< bit 2..4: Reserved */
uint8_t AFR2:1; /*!< bit 2: Alternate function remapping option 2 */
uint8_t AFR3:1; /*!< bit 3: Alternate function remapping option 3 */
uint8_t AFR4:1; /*!< bit 4: Alternate function remapping option 4 */
uint8_t AFR5:1; /*!< bit 5: Alternate function remapping option 5 */
uint8_t AFR6:1; /*!< bit 6: Alternate function remapping option 6 */
uint8_t :1; /*!< bit 7: Reserved */
uint8_t AFR7:1; /*!< bit 7: Alternate function remapping option 7 */
} fields; /*!< structure used for bit access */
uint8_t reg; /*!< type used for register access */
} OPT_OPT2_type; /*!< */
typedef union {
struct {
uint8_t :1; /*!< bit 0: Reserved */
uint8_t NAFR0:1; /*!< bit 0: Alternate function remapping option 0 */
uint8_t NAFR1:1; /*!< bit 1: Alternate function remapping option 1 */
uint8_t :3; /*!< bit 2..4: Reserved */
uint8_t NAFR2:1; /*!< bit 2: Alternate function remapping option 2 */
uint8_t NAFR3:1; /*!< bit 3: Alternate function remapping option 3 */
uint8_t NAFR4:1; /*!< bit 4: Alternate function remapping option 4 */
uint8_t NAFR5:1; /*!< bit 5: Alternate function remapping option 5 */
uint8_t NAFR6:1; /*!< bit 6: Alternate function remapping option 6 */
uint8_t :1; /*!< bit 7: Reserved */
uint8_t NAFR7:1; /*!< bit 7: Alternate function remapping option 7 */
} fields; /*!< structure used for bit access */
uint8_t reg; /*!< type used for register access */
} OPT_NOPT2_type; /*!< */