Starter Kit MB2146-410-01-E Setup Guide V1.1
Chapter 4 Sample Code Manual
MCU-UM-500002-E-11 – Page
18
4.3 Source Code File Description
Six files are available in each sample code source code folder shown below,
Figure 4.3-1 Source Code Files
4.3.1 Header Files
The MB95200H/210H.h and the MB95200H/210H.asm are header files, including
MB95200H/210H MCU I/O registers definition;
Here take PDR0 for example. In MB95200H/210H.h, PDR0 is defined as below.
/* REGISTER BIT STRUCTURES */
typedef union{ /* Port0 */
IO_BYTE byte;
struct{
IO_BYTE _P07:1;
IO_BYTE _P06:1;
IO_BYTE _P05:1;
IO_BYTE _P04:1;
IO_BYTE _P03:1;
IO_BYTE _P02:1;
IO_BYTE _P01:1;
IO_BYTE _P00:1;
} bit;
} PDR0STR;
……
__IO_EXTERN __io PDR0STR _pdr0; /* Port0 */
#define PDR0 _pdr0.byte
#define PDR0_P00 _pdr0.bit._P00
#define PDR0_P01 _pdr0.bit._P01
#define PDR0_P02 _pdr0.bit._P02