stm8: fix OPT names
This commit is contained in:
parent
5c415104df
commit
84187401b7
36
stm8s.h
36
stm8s.h
@ -3393,14 +3393,14 @@ typedef struct {
|
||||
|
||||
#define OPT_BASE 0x4800
|
||||
#define OPT ((OPT_type*)OPT_BASE)
|
||||
#define OPT0 (*(volatile uint8_t *)(OPT_BASE + 0x00))
|
||||
#define ROP OPT0
|
||||
#define OPT1 (*(volatile uint8_t *)(OPT_BASE + 0x01))
|
||||
#define UBC OPT1
|
||||
#define NOPT1 (*(volatile uint8_t *)(OPT_BASE + 0x02))
|
||||
#define NUBC NOPT1
|
||||
#define OPT2 (*(volatile uint8_t *)(OPT_BASE + 0x03))
|
||||
#define AFR OPT2
|
||||
#define OPT_OPT0 (*(volatile uint8_t *)(OPT_BASE + 0x00))
|
||||
#define ROP OPT_OPT0
|
||||
#define OPT_OPT1 (*(volatile uint8_t *)(OPT_BASE + 0x01))
|
||||
#define UBC OPT_OPT1
|
||||
#define OPT_NOPT1 (*(volatile uint8_t *)(OPT_BASE + 0x02))
|
||||
#define NUBC OPT_NOPT1
|
||||
#define OPT_OPT2 (*(volatile uint8_t *)(OPT_BASE + 0x03))
|
||||
#define AFR OPT_OPT2
|
||||
#define AFR_AFR0 (1U << 0)
|
||||
#define AFR_AFR1 (1U << 1)
|
||||
#define AFR_AFR2 (1U << 2)
|
||||
@ -3409,8 +3409,8 @@ typedef struct {
|
||||
#define AFR_AFR5 (1U << 5)
|
||||
#define AFR_AFR6 (1U << 6)
|
||||
#define AFR_AFR7 (1U << 7)
|
||||
#define NOPT2 (*(volatile uint8_t *)(OPT_BASE + 0x04))
|
||||
#define NAFR NOPT2
|
||||
#define OPT_NOPT2 (*(volatile uint8_t *)(OPT_BASE + 0x04))
|
||||
#define NAFR OPT_NOPT2
|
||||
#define AFR_NAFR0 (1U << 0)
|
||||
#define AFR_NAFR1 (1U << 1)
|
||||
#define AFR_NAFR2 (1U << 2)
|
||||
@ -3419,32 +3419,32 @@ typedef struct {
|
||||
#define AFR_NAFR5 (1U << 5)
|
||||
#define AFR_NAFR6 (1U << 6)
|
||||
#define AFR_NAFR7 (1U << 7)
|
||||
#define OPT3 (*(volatile uint8_t *)(OPT_BASE + 0x05))
|
||||
#define OPT_OPT3 (*(volatile uint8_t *)(OPT_BASE + 0x05))
|
||||
#define OPT3_WWDG_HALT (1U << 0)
|
||||
#define OPT3_WWDG_HW (1U << 1)
|
||||
#define OPT3_IWDG_HW (1U << 2)
|
||||
#define OPT3_LSI_EN (1U << 3)
|
||||
#define OPT3_HSI_TRIM (1U << 4)
|
||||
#define NOPT3 (*(volatile uint8_t *)(OPT_BASE + 0x06))
|
||||
#define OPT_NOPT3 (*(volatile uint8_t *)(OPT_BASE + 0x06))
|
||||
#define NOPT3_NWWDG_HALT (1U << 0)
|
||||
#define NOPT3_NWWDG_HW (1U << 1)
|
||||
#define NOPT3_NIWDG_HW (1U << 2)
|
||||
#define NOPT3_NLSI_EN (1U << 3)
|
||||
#define NOPT3_NHSI_TRIM (1U << 4)
|
||||
#define OPT4 (*(volatile uint8_t *)(OPT_BASE + 0x07))
|
||||
#define OPT_OPT4 (*(volatile uint8_t *)(OPT_BASE + 0x07))
|
||||
#define OPT4_PRS_C0 (1U << 0)
|
||||
#define OPT4_PRS_C1 (1U << 1)
|
||||
#define OPT4_CKAWU_SEL (1U << 2)
|
||||
#define OPT4_EXT_CLK (1U << 3)
|
||||
#define NOPT4 (*(volatile uint8_t *)(OPT_BASE + 0x08))
|
||||
#define OPT_NOPT4 (*(volatile uint8_t *)(OPT_BASE + 0x08))
|
||||
#define NOPT4_NPRS_C0 (1U << 0)
|
||||
#define NOPT4_NPRS_C1 (1U << 1)
|
||||
#define NOPT4_NCKAWU_SEL (1U << 2)
|
||||
#define NOPT4_NEXT_CLK (1U << 3)
|
||||
#define OPT5 (*(volatile uint8_t *)(OPT_BASE + 0x09))
|
||||
#define HSECNT OPT5
|
||||
#define NOPT5 (*(volatile uint8_t *)(OPT_BASE + 0x0A))
|
||||
#define NHSECNT NOPT5
|
||||
#define OPT_OPT5 (*(volatile uint8_t *)(OPT_BASE + 0x09))
|
||||
#define HSECNT OPT_OPT5
|
||||
#define OPT_NOPT5 (*(volatile uint8_t *)(OPT_BASE + 0x0A))
|
||||
#define NHSECNT OPT_NOPT5
|
||||
|
||||
// Unique ID
|
||||
typedef struct {
|
||||
|
Loading…
Reference in New Issue
Block a user