Skip to main content
Md Mubdiul Hasan
Associate III
November 25, 2016
Question

Does it wrong typdef constant select from comdef.h to main.c?

  • November 25, 2016
  • 11 replies
  • 2107 views
Posted on November 25, 2016 at 03:45

Dear Sir,

Take a look the global constant contained in comdef.h.

typedef  unsigned char      boolean;        /* Boolean value type. */

typedef  unsigned int       uint32;      /* Unsigned 32 bit value */

typedef  unsigned short     uint16;      /* Unsigned 16 bit value */

typedef  unsigned char      uint8;       /* Unsigned 8  bit value */

typedef  signed int         int32;       /* Signed 32 bit value */

typedef  signed short       int16;       /* Signed 16 bit value */

typedef  signed char        int8;        /* Signed 8  bit value */

typedef  float              FP32;        /* Single precision floating point */

typedef  double             FP64;        /* Double precision floating point */

typedef  unsigned char      bool;        /* Boolean value type. */

//typedef  unsigned int       uint32_t;      /* Unsigned 32 bit value */

//typedef  unsigned short     uint16_t;      /* Unsigned 16 bit value */

//typedef  unsigned char      uint8_t;       /* Unsigned 8  bit value */

//typedef  signed int         int32_t;       /* Signed 32 bit value */

//typedef  signed short       int16_t;       /* Signed 16 bit value */

//typedef  signed char        int8_t;        /* Signed 8  bit value */

Its clear from this section that, uint16_t; is kept inactive.

Now look at my Private variables called in C main,

uint16_t LED1_Status=0;

uint16_t LED2_Status=0;

uint16_t LED5_Status=0;

uint16_t LED6_Status=0;

Is it okay? Why then?

Regards

Hasan

    This topic has been closed for replies.

    11 replies

    Md Mubdiul Hasan
    Associate III
    December 1, 2016
    Posted on December 01, 2016 at 02:01

    Dear Sir Clive1,

    In my push key state file included (from Coo-cox) signal.h and stdint.h that is not from ARMCC may be.

    Take a look on search output,

    Searching for 'signal.h'...

    C:\MDK5-projects\rc_2016\key driver\hs_key_handle.c(25) : //#include ''signal.h''

    Lines matched: 1      Files matched: 1      Total files searched: 80

     ARMCC dont have such file in MDK.

    Regarding ''comdef.h'' I can also only say, this file belongs to Visual Studio. Most likely non of the files from MDK-ARM nor CubeMX refer to this file