It helps if you use a header file that type defines the sizes.
Then it is much easier to see what is being used.
This is the file I use with Hi-Tech compiler.
Save this file as 'PosixTypes.h' and include it in your c file.
Code:
/*--------------------------------------------------------------------
File Name : PosixTypes.h
Description : ISO (Posix) typedef file for Pic
: Misra Rule 6.3 (advisory)
Revision : 1.0
Date : 21/08/05
----------------------------------------------------------------------*/
#ifndef POSIXTYPES_H
#define POSIXTYPES_H
/*--- Standard type definitions. ---*/
/* Plain char, only to be used for the storage and
use of character values. Misra Rule 6.1 (Required) */
typedef unsigned char uint8_t; /* unsigned 8 bit type definition */
typedef signed char int8_t; /* signed 8 bit type definition */
typedef unsigned int uint16_t; /* unsigned 16 bit type definition */
typedef signed int int16_t; /* signed 16 bit type definition */
typedef unsigned long uint32_t; /* unsigned 32 bit type definition */
typedef signed long int32_t; /* signed 32 bit type definition */
typedef unsigned char Bool; /* Bool type definition */
/*--- Standard constant definition. ---*/
#define False ((Bool)0x00U)
#define True ((Bool)0x01U)
#endif
/*--- End of file. ---*/
You can also get MPLAB to syntax highlight these types.
If you save the words to be highlighted in a text file, say ‘keywords.txt’
uint8_t
int8_t
uint16_t
int16_t
uint32_t
int32_t
Bool
True
False
If you right click in one of your source files in the IDE and choose ‘Properties’, or choose ‘Edit’ from the menu
and ‘Properties’ then click on the ‘Text’ tab. In the ‘Choose Colors’ there is an option for
‘User File Defined.’ Here you can select the color for your highlighting, exit that then
use the browse button to select your ‘User Defined Color File’, and click ‘Apply’
This will turn on highlighting for all the words listed in your ‘keywords.txt’ file.