AnsweredAssumed Answered

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

Question asked by Md Mubdiul Hasan on Nov 25, 2016
Latest reply on Dec 1, 2016 by Md Mubdiul Hasan
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

Outcomes