Bit Masks

The bit masks are predefined in the device header file. For example, the bit mask for the ADPSIS bit is defined as below.

#define _ADCON2_ADPSIS_MASK                                 0x80

The naming convention adopted for the predefined bit masks in the header file is presented in Figure 2-2 with an example for the ADPSIS bit in the ADCON2 register.

Figure 1. Naming Convention of Bit Masks
Note: The register name, bit name, bit field name, the ‘MASK’ suffix are separated with ‘_’ and the entire macro name begins with ‘_’.