Added structure tags to avoid usign GNU extension
I just addded the tag 's' for all the anonymous structures as they don't use typedef and their scope is limited. Seems to compile for my testing so far.
This commit is contained in:
parent
38dea7ead4
commit
6a7e10b4fb
1 changed files with 10 additions and 10 deletions
|
@ -227,7 +227,7 @@ extern "C"
|
||||||
{
|
{
|
||||||
__I uint16_t REVID;
|
__I uint16_t REVID;
|
||||||
__I uint16_t DEVID;
|
__I uint16_t DEVID;
|
||||||
};
|
}s;
|
||||||
};
|
};
|
||||||
} INFO_TypeDef;
|
} INFO_TypeDef;
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ extern "C"
|
||||||
GPIO_CFGLR_PIN_MODE_Typedef PIN5 : 4;
|
GPIO_CFGLR_PIN_MODE_Typedef PIN5 : 4;
|
||||||
GPIO_CFGLR_PIN_MODE_Typedef PIN6 : 4;
|
GPIO_CFGLR_PIN_MODE_Typedef PIN6 : 4;
|
||||||
GPIO_CFGLR_PIN_MODE_Typedef PIN7 : 4;
|
GPIO_CFGLR_PIN_MODE_Typedef PIN7 : 4;
|
||||||
};
|
}s;
|
||||||
} GPIO_CFGLR_t;
|
} GPIO_CFGLR_t;
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ extern "C"
|
||||||
uint32_t IDR6 : 1;
|
uint32_t IDR6 : 1;
|
||||||
uint32_t IDR7 : 1;
|
uint32_t IDR7 : 1;
|
||||||
uint32_t : 24;
|
uint32_t : 24;
|
||||||
};
|
}s;
|
||||||
} GPIO_INDR_t;
|
} GPIO_INDR_t;
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -296,7 +296,7 @@ extern "C"
|
||||||
uint32_t ODR6 : 1;
|
uint32_t ODR6 : 1;
|
||||||
uint32_t ODR7 : 1;
|
uint32_t ODR7 : 1;
|
||||||
uint32_t : 24;
|
uint32_t : 24;
|
||||||
};
|
}s;
|
||||||
} GPIO_OUTDR_t;
|
} GPIO_OUTDR_t;
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -321,7 +321,7 @@ extern "C"
|
||||||
uint32_t BR6 : 1;
|
uint32_t BR6 : 1;
|
||||||
uint32_t BR7 : 1;
|
uint32_t BR7 : 1;
|
||||||
uint32_t : 8;
|
uint32_t : 8;
|
||||||
};
|
}s;
|
||||||
} GPIO_BSHR_t;
|
} GPIO_BSHR_t;
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -337,7 +337,7 @@ extern "C"
|
||||||
uint32_t BR6 : 1;
|
uint32_t BR6 : 1;
|
||||||
uint32_t BR7 : 1;
|
uint32_t BR7 : 1;
|
||||||
uint32_t : 24;
|
uint32_t : 24;
|
||||||
};
|
}s;
|
||||||
} GPIO_BCR_t;
|
} GPIO_BCR_t;
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
|
@ -354,7 +354,7 @@ extern "C"
|
||||||
uint32_t LCK7 : 1;
|
uint32_t LCK7 : 1;
|
||||||
uint32_t LCKK : 1;
|
uint32_t LCKK : 1;
|
||||||
uint32_t : 23;
|
uint32_t : 23;
|
||||||
};
|
}s;
|
||||||
} GPIO_LCKR_t;
|
} GPIO_LCKR_t;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -744,9 +744,9 @@ extern "C"
|
||||||
#define OB ((OB_TypeDef *)OB_BASE)
|
#define OB ((OB_TypeDef *)OB_BASE)
|
||||||
#define ESIG ((ESG_TypeDef *)ESIG_BASE)
|
#define ESIG ((ESG_TypeDef *)ESIG_BASE)
|
||||||
// Mentioned in ch32v30x_dbgmcu.c, may not work on all processors.
|
// Mentioned in ch32v30x_dbgmcu.c, may not work on all processors.
|
||||||
#define INFO ((INFO_TypeDef *)INFO_BASE)
|
//#define INFO ((INFO_TypeDef *)INFO_BASE)
|
||||||
#define EXTEN ((EXTEN_TypeDef *)EXTEN_BASE)
|
//#define EXTEN ((EXTEN_TypeDef *)EXTEN_BASE)
|
||||||
#define EXTEND ((EXTEND_TypeDef *)EXTEN_BASE) // Alias to EXTEN
|
//#define EXTEND ((EXTEND_TypeDef *)EXTEN_BASE) // Alias to EXTEN
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Peripheral Registers Bits Definition */
|
/* Peripheral Registers Bits Definition */
|
||||||
|
|
Loading…
Add table
Reference in a new issue