I used the header file in my project, which had the following definitions (s):
#ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus #define __I volatile #else #define __I volatile const #endif
__I used in the following header file as follows:
typedef struct {
My question is, why __I make const in C, but not in C ++? You can still change the value that CR points to, since you have an address, but just wondering why the __I definition __I different.
For someone interesting, this is for or from, __I is determined from the IAR Embedded Workbench ARM for Cortex-M4, and the structure is from CMSIS Texas Instruments LM4F120H5QR files.
c ++ c cortex-m iar cmsis
SoftwareDev
source share