// HT45F23A.h
//	This file contains the definition of registers for
//		Holtek HT45F23A microcontroller.
//	Generated by cfg2gcch V1.07.
//	[VERSION] 2.3, 4

//	Do not modify manually.

#ifndef _HOLTEK_H_
#define _HOLTEK_H_

#ifndef __DISABLE_HGCC_BUILD_IN__
#include "build-in.h"
#endif

#define DEFINE_ISR(isr_name, vector) void __attribute((interrupt(vector))) isr_name(void)

#define DEFINE_SFR(sfr_type, sfr, addr) static volatile sfr_type sfr __attribute__ ((at(addr)))

typedef unsigned char __sfr_byte;

typedef struct {
	unsigned char __dmbp0 : 1;
	unsigned char : 7;
} __bp_bits;

typedef union {
	__bp_bits bits;
	__sfr_byte byte;
} __bp_type;

typedef struct {
	unsigned char __tb00 : 1;
	unsigned char __tb01 : 1;
	unsigned char __tb02 : 1;
	unsigned char __lxtlp : 1;
	unsigned char __tb10 : 1;
	unsigned char __tb11 : 1;
	unsigned char __tbck : 1;
	unsigned char __tbon : 1;
} __tbc_bits;

typedef union {
	__tbc_bits bits;
	__sfr_byte byte;
} __tbc_type;

typedef struct {
	unsigned char __c : 1;
	unsigned char __ac : 1;
	unsigned char __z : 1;
	unsigned char __ov : 1;
	unsigned char __pdf : 1;
	unsigned char __to : 1;
	unsigned char : 2;
} __status_bits;

typedef union {
	__status_bits bits;
	__sfr_byte byte;
} __status_type;

typedef struct {
	unsigned char __emi : 1;
	unsigned char __eei0 : 1;
	unsigned char __eei1 : 1;
	unsigned char __et0i : 1;
	unsigned char __eif0 : 1;
	unsigned char __eif1 : 1;
	unsigned char __t0f : 1;
	unsigned char : 1;
} __intc0_bits;

typedef union {
	__intc0_bits bits;
	__sfr_byte byte;
} __intc0_type;

typedef struct {
	unsigned char __topsc0 : 1;
	unsigned char __topsc1 : 1;
	unsigned char __topsc2 : 1;
	unsigned char __t0e : 1;
	unsigned char __t0on : 1;
	unsigned char : 1;
	unsigned char __t0m0 : 1;
	unsigned char __t0m1 : 1;
} __tmr0c_bits;

typedef union {
	__tmr0c_bits bits;
	__sfr_byte byte;
} __tmr0c_type;

typedef struct {
	unsigned char : 3;
	unsigned char __t1e : 1;
	unsigned char __t1on : 1;
	unsigned char __t1s : 1;
	unsigned char __t1m0 : 1;
	unsigned char __t1m1 : 1;
} __tmr1c_bits;

typedef union {
	__tmr1c_bits bits;
	__sfr_byte byte;
} __tmr1c_type;

typedef struct {
	unsigned char __vlvd0 : 1;
	unsigned char __vlvd1 : 1;
	unsigned char __vlvd2 : 1;
	unsigned char : 1;
	unsigned char __lvden : 1;
	unsigned char __lvdo : 1;
	unsigned char : 2;
} __lvdc_bits;

typedef union {
	__lvdc_bits bits;
	__sfr_byte byte;
} __lvdc_type;

typedef struct {
	unsigned char __dacen : 1;
	unsigned char : 4;
	unsigned char __vol0 : 1;
	unsigned char __vol1 : 1;
	unsigned char __vol2 : 1;
} __dactrl_bits;

typedef union {
	__dactrl_bits bits;
	__sfr_byte byte;
} __dactrl_type;

typedef struct {
	unsigned char __bz0 : 1;
	unsigned char __bz1 : 1;
	unsigned char __bz2 : 1;
	unsigned char __bc0 : 1;
	unsigned char __bc1 : 1;
	unsigned char __pwm0en : 1;
	unsigned char __pwm1en : 1;
	unsigned char __pmode : 1;
} __bpctl_bits;

typedef union {
	__bpctl_bits bits;
	__sfr_byte byte;
} __bpctl_type;

typedef struct {
	unsigned char __wdten0 : 1;
	unsigned char __wdten1 : 1;
	unsigned char __wdten2 : 1;
	unsigned char __wdten3 : 1;
	unsigned char __ws0 : 1;
	unsigned char __ws1 : 1;
	unsigned char __ws2 : 1;
	unsigned char __fsyson : 1;
} __wdtc_bits;

typedef union {
	__wdtc_bits bits;
	__sfr_byte byte;
} __wdtc_type;

typedef struct {
	unsigned char __et1i : 1;
	unsigned char __esim : 1;
	unsigned char __emfi : 1;
	unsigned char : 1;
	unsigned char __t1f : 1;
	unsigned char __simf : 1;
	unsigned char __mff : 1;
	unsigned char : 1;
} __intc1_bits;

typedef union {
	__intc1_bits bits;
	__sfr_byte byte;
} __intc1_type;

typedef struct {
	unsigned char : 7;
	unsigned char __a1x : 1;
} __opa1c0_bits;

typedef union {
	__opa1c0_bits bits;
	__sfr_byte byte;
} __opa1c0_type;

typedef struct {
	unsigned char __a1en : 1;
	unsigned char __a1oen : 1;
	unsigned char __a1ns : 1;
	unsigned char __a1ps : 1;
	unsigned char __a1psel0 : 1;
	unsigned char __a1psel1 : 1;
	unsigned char __a1o2n : 1;
	unsigned char __a1o2cin : 1;
} __opa1c1_bits;

typedef union {
	__opa1c1_bits bits;
	__sfr_byte byte;
} __opa1c1_type;

typedef struct {
	unsigned char : 7;
	unsigned char __a2x : 1;
} __opa2c0_bits;

typedef union {
	__opa2c0_bits bits;
	__sfr_byte byte;
} __opa2c0_type;

typedef struct {
	unsigned char __a2en : 1;
	unsigned char __a2oen : 1;
	unsigned char __a2ns : 1;
	unsigned char __a2ps : 1;
	unsigned char __a2psel0 : 1;
	unsigned char __a2psel1 : 1;
	unsigned char __a2o2n : 1;
	unsigned char __a2o2cin : 1;
} __opa2c1_bits;

typedef union {
	__opa2c1_bits bits;
	__sfr_byte byte;
} __opa2c1_type;

typedef struct {
	unsigned char __pga0 : 1;
	unsigned char __pga1 : 1;
	unsigned char __pga2 : 1;
	unsigned char __pgaen : 1;
	unsigned char : 2;
	unsigned char __a1o2a2p : 1;
	unsigned char __a1o2a2n : 1;
} __opa2c2_bits;

typedef union {
	__opa2c2_bits bits;
	__sfr_byte byte;
} __opa2c2_type;

typedef struct {
	unsigned char __acs0 : 1;
	unsigned char __acs1 : 1;
	unsigned char __acs2 : 1;
	unsigned char : 3;
	unsigned char __eocb : 1;
	unsigned char __start : 1;
} __adcr_bits;

typedef union {
	__adcr_bits bits;
	__sfr_byte byte;
} __adcr_type;

typedef struct {
	unsigned char __adcs0 : 1;
	unsigned char __adcs1 : 1;
	unsigned char __adcs2 : 1;
	unsigned char : 2;
	unsigned char __vrsel : 1;
	unsigned char __adonb : 1;
	unsigned char : 1;
} __acsr_bits;

typedef union {
	__acsr_bits bits;
	__sfr_byte byte;
} __acsr_type;

typedef struct {
	unsigned char __hlclk : 1;
	unsigned char __idlen : 1;
	unsigned char __hto : 1;
	unsigned char __lto : 1;
	unsigned char __fsten : 1;
	unsigned char __cks0 : 1;
	unsigned char __cks1 : 1;
	unsigned char __cks2 : 1;
} __smod_bits;

typedef union {
	__smod_bits bits;
	__sfr_byte byte;
} __smod_type;

typedef struct {
	unsigned char __pcr0 : 1;
	unsigned char __pcr1 : 1;
	unsigned char __pcr2 : 1;
	unsigned char __pcr3 : 1;
	unsigned char __pcr4 : 1;
	unsigned char __pcr5 : 1;
	unsigned char : 2;
} __adpcr_bits;

typedef union {
	__adpcr_bits bits;
	__sfr_byte byte;
} __adpcr_type;

typedef struct {
	unsigned char __int0s0 : 1;
	unsigned char __int0s1 : 1;
	unsigned char __int1s0 : 1;
	unsigned char __int1s1 : 1;
	unsigned char : 4;
} __intedge_bits;

typedef union {
	__intedge_bits bits;
	__sfr_byte byte;
} __intedge_type;

typedef struct {
	unsigned char __ciof0 : 1;
	unsigned char __c1of1 : 1;
	unsigned char __c1of2 : 1;
	unsigned char __c1of3 : 1;
	unsigned char __c1of4 : 1;
	unsigned char __c1rs : 1;
	unsigned char __c1ofm : 1;
	unsigned char __cmp1x : 1;
} __cmp1c0_bits;

typedef union {
	__cmp1c0_bits bits;
	__sfr_byte byte;
} __cmp1c0_type;

typedef struct {
	unsigned char __cmp1en : 1;
	unsigned char __c1nsel : 1;
	unsigned char __c1outen : 1;
	unsigned char __c1inten : 1;
	unsigned char : 3;
	unsigned char __cnpsel : 1;
} __cmp1c1_bits;

typedef union {
	__cmp1c1_bits bits;
	__sfr_byte byte;
} __cmp1c1_type;

typedef struct {
	unsigned char __c2of0 : 1;
	unsigned char __c2of1 : 1;
	unsigned char __c2of2 : 1;
	unsigned char __c2of3 : 1;
	unsigned char __c2of4 : 1;
	unsigned char __c2rs : 1;
	unsigned char __c2ofm : 1;
	unsigned char __cmp2x : 1;
} __cmp2c0_bits;

typedef union {
	__cmp2c0_bits bits;
	__sfr_byte byte;
} __cmp2c0_type;

typedef struct {
	unsigned char __cmp2en : 1;
	unsigned char __c2psel : 1;
	unsigned char __c2outen : 1;
	unsigned char __c2inten : 1;
	unsigned char : 2;
	unsigned char __cmpes0 : 1;
	unsigned char __cmpes1 : 1;
} __cmp2c1_bits;

typedef union {
	__cmp2c1_bits bits;
	__sfr_byte byte;
} __cmp2c1_type;

typedef struct {
	unsigned char __pfden : 1;
	unsigned char __pfdsel : 1;
	unsigned char : 2;
	unsigned char __ode0 : 1;
	unsigned char __ode1 : 1;
	unsigned char __ode2 : 1;
	unsigned char __ode3 : 1;
} __misc_bits;

typedef union {
	__misc_bits bits;
	__sfr_byte byte;
} __misc_type;

typedef struct {
	unsigned char __eadi : 1;
	unsigned char __tb0e : 1;
	unsigned char __tb1e : 1;
	unsigned char __epi : 1;
	unsigned char __adf : 1;
	unsigned char __tb0f : 1;
	unsigned char __tb1f : 1;
	unsigned char __pef : 1;
} __mfic0_bits;

typedef union {
	__mfic0_bits bits;
	__sfr_byte byte;
} __mfic0_type;

typedef struct {
	unsigned char __eci : 1;
	unsigned char __ee2i : 1;
	unsigned char __elvdi : 1;
	unsigned char : 1;
	unsigned char __cf : 1;
	unsigned char __e2f : 1;
	unsigned char __lvdf : 1;
	unsigned char : 1;
} __mfic1_bits;

typedef union {
	__mfic1_bits bits;
	__sfr_byte byte;
} __mfic1_type;

typedef struct {
	unsigned char : 1;
	unsigned char __simen : 1;
	unsigned char __pckp0 : 1;
	unsigned char __pckp1 : 1;
	unsigned char __pcken : 1;
	unsigned char __sim0 : 1;
	unsigned char __sim1 : 1;
	unsigned char __sim2 : 1;
} __simc0_bits;

typedef union {
	__simc0_bits bits;
	__sfr_byte byte;
} __simc0_type;

typedef struct {
	unsigned char __rxak : 1;
	unsigned char __iamwu : 1;
	unsigned char __srw : 1;
	unsigned char __txak : 1;
	unsigned char __htx : 1;
	unsigned char __hbb : 1;
	unsigned char __haas : 1;
	unsigned char __hcf : 1;
} __simc1_bits;

typedef union {
	__simc1_bits bits;
	__sfr_byte byte;
} __simc1_type;

typedef struct {
	unsigned char : 1;
	unsigned char __iica0 : 1;
	unsigned char __iica1 : 1;
	unsigned char __iica2 : 1;
	unsigned char __iica3 : 1;
	unsigned char __iica4 : 1;
	unsigned char __iica5 : 1;
	unsigned char __iica6 : 1;
} __sima_bits;

typedef union {
	__sima_bits bits;
	__sfr_byte byte;
} __sima_type;

typedef struct {
	unsigned char __trf : 1;
	unsigned char __wcol : 1;
	unsigned char __csen : 1;
	unsigned char __mls : 1;
	unsigned char __ckeg : 1;
	unsigned char __ckpolb : 1;
	unsigned char : 2;
} __simc2_bits;

typedef union {
	__simc2_bits bits;
	__sfr_byte byte;
} __simc2_type;

typedef struct {
	unsigned char __com0en : 1;
	unsigned char __com1en : 1;
	unsigned char __com2en : 1;
	unsigned char __com3en : 1;
	unsigned char __lcden : 1;
	unsigned char __isel : 1;
	unsigned char __lcdbuf : 1;
	unsigned char : 1;
} __lcdc_bits;

typedef union {
	__lcdc_bits bits;
	__sfr_byte byte;
} __lcdc_type;

typedef struct {
	unsigned char __ldoen : 1;
	unsigned char __vsel : 1;
	unsigned char __vres : 1;
	unsigned char __ren1 : 1;
	unsigned char __vloe : 1;
	unsigned char : 3;
} __ldoc_bits;

typedef union {
	__ldoc_bits bits;
	__sfr_byte byte;
} __ldoc_type;

typedef struct {
	unsigned char __rd : 1;
	unsigned char __rden : 1;
	unsigned char __wr : 1;
	unsigned char __wren : 1;
	unsigned char : 4;
} __eec_bits;

typedef union {
	__eec_bits bits;
	__sfr_byte byte;
} __eec_type;
//-------------------------------------------------
typedef struct {
	unsigned char __pa0 : 1;
	unsigned char __pa1 : 1;
	unsigned char __pa2 : 1;
	unsigned char __pa3 : 1;
	unsigned char __pa4 : 1;
	unsigned char __pa5 : 1;
	unsigned char __pa6 : 1;
	unsigned char __pa7 : 1;
} __pa_bits;

typedef union {
	__pa_bits bits;
	__sfr_byte byte;
} __pa_type;

typedef struct {
	unsigned char __pac0 : 1;
	unsigned char __pac1 : 1;
	unsigned char __pac2 : 1;
	unsigned char __pac3 : 1;
	unsigned char __pac4 : 1;
	unsigned char __pac5 : 1;
	unsigned char __pac6 : 1;				//2013.08.16 by tony
	unsigned char __pac7 : 1;
} __pac_bits;
typedef union {
	__pac_bits bits;
	__sfr_byte byte;
} __pac_type;

//-------------------------------------------------
typedef struct {
	unsigned char __pb0 : 1;
	unsigned char __pb1 : 1;
	unsigned char __pb2 : 1;
	unsigned char __pb3 : 1;
	unsigned char __pb4 : 1;
	unsigned char __pb5 : 1;
	unsigned char __pb6 : 1;
	unsigned char __pb7 : 1;
} __pb_bits;

typedef union {
	__pb_bits bits;
	__sfr_byte byte;
} __pb_type;

typedef struct {
	unsigned char __pbc0 : 1;
	unsigned char __pbc1 : 1;
	unsigned char __pbc2 : 1;
	unsigned char __pbc3 : 1;
	unsigned char __pbc4 : 1;
	unsigned char __pbc5 : 1;
	unsigned char __pbc6 : 1;				//2013.08.16 by tony
	unsigned char __pbc7 : 1;
} __pbc_bits;
typedef union {
	__pbc_bits bits;
	__sfr_byte byte;
} __pbc_type;


//---------------------------------------------
typedef struct {
	unsigned char __pc0 : 1;
	unsigned char __pc1 : 1;
	unsigned char __pc2 : 1;
	unsigned char __pc3 : 1;
	unsigned char __pc4 : 1;
	unsigned char __pc5 : 1;
	unsigned char __pc6 : 1;				//2013.08.16 by tony
	unsigned char __pc7 : 1;
} __pc_bits;
typedef union {
	__pc_bits bits;
	__sfr_byte byte;
} __pc_type;


typedef struct {
	unsigned char __pcc0 : 1;
	unsigned char __pcc1 : 1;
	unsigned char __pcc2 : 1;
	unsigned char __pcc3 : 1;
	unsigned char __pcc4 : 1;
	unsigned char __pcc5 : 1;
	unsigned char __pcc6 : 1;				//2013.08.16 by tony
	unsigned char __pcc7 : 1;
} __pcc_bits;
typedef union {
	__pcc_bits bits;
	__sfr_byte byte;
} __pcc_type;


//------------------------------------------------
DEFINE_SFR(__sfr_byte, __mp0, 0x01);
DEFINE_SFR(__sfr_byte, __mp1, 0x03);
DEFINE_SFR(__bp_type, __bp, 0x04);
DEFINE_SFR(__sfr_byte, __acc, 0x05);
DEFINE_SFR(__sfr_byte, __pcl, 0x06);
DEFINE_SFR(__sfr_byte, __tblp, 0x07);
DEFINE_SFR(__sfr_byte, __tblh, 0x08);
DEFINE_SFR(__tbc_type, __tbc, 0x09);
DEFINE_SFR(__status_type, __status, 0x0a);
DEFINE_SFR(__intc0_type, __intc0, 0x0b);
DEFINE_SFR(__sfr_byte, __tbhp, 0x0c);
DEFINE_SFR(__sfr_byte, __tmr0, 0x0d);
DEFINE_SFR(__tmr0c_type, __tmr0c, 0x0e);
DEFINE_SFR(__sfr_byte, __tmr1h, 0x0f);
DEFINE_SFR(__sfr_byte, __tmr1l, 0x10);
DEFINE_SFR(__tmr1c_type, __tmr1c, 0x11);
//DEFINE_SFR(__sfr_byte, __pa, 0x12);
//DEFINE_SFR(__sfr_byte, __pac, 0x13);
//DEFINE_SFR(__sfr_byte, __pb, 0x14);
//DEFINE_SFR(__sfr_byte, __pbc, 0x15);			//Shielded 2013.08.16
//DEFINE_SFR(__sfr_byte, __pc, 0x16);
//DEFINE_SFR(__sfr_byte, __pcc, 0x17);
DEFINE_SFR(__pa_type, __pa, 0x12);
DEFINE_SFR(__pac_type, __pac, 0x13);
DEFINE_SFR(__pb_type, __pb, 0x14);
DEFINE_SFR(__pbc_type, __pbc, 0x15);
DEFINE_SFR(__pc_type, __pc, 0x16);
DEFINE_SFR(__pcc_type, __pcc, 0x17);


DEFINE_SFR(__lvdc_type, __lvdc, 0x18);
DEFINE_SFR(__dactrl_type, __dactrl, 0x19);
DEFINE_SFR(__sfr_byte, __pwm0, 0x1a);
DEFINE_SFR(__sfr_byte, __pwm1, 0x1b);
DEFINE_SFR(__bpctl_type, __bpctl, 0x1c);
DEFINE_SFR(__wdtc_type, __wdtc, 0x1d);
DEFINE_SFR(__intc1_type, __intc1, 0x1e);
DEFINE_SFR(__opa1c0_type, __opa1c0, 0x1f);
DEFINE_SFR(__opa1c1_type, __opa1c1, 0x20);
DEFINE_SFR(__opa2c0_type, __opa2c0, 0x21);
DEFINE_SFR(__opa2c1_type, __opa2c1, 0x22);
DEFINE_SFR(__opa2c2_type, __opa2c2, 0x23);
DEFINE_SFR(__sfr_byte, __adrl, 0x24);
DEFINE_SFR(__sfr_byte, __adrh, 0x25);
DEFINE_SFR(__adcr_type, __adcr, 0x26);
DEFINE_SFR(__acsr_type, __acsr, 0x27);
DEFINE_SFR(__smod_type, __smod, 0x28);
DEFINE_SFR(__sfr_byte, __pawu, 0x29);
DEFINE_SFR(__sfr_byte, __papu, 0x2a);
DEFINE_SFR(__sfr_byte, __pbpu, 0x2b);
DEFINE_SFR(__sfr_byte, __pcpu, 0x2c);
DEFINE_SFR(__adpcr_type, __adpcr, 0x2d);
DEFINE_SFR(__intedge_type, __intedge, 0x2e);
DEFINE_SFR(__cmp1c0_type, __cmp1c0, 0x2f);
DEFINE_SFR(__cmp1c1_type, __cmp1c1, 0x30);
DEFINE_SFR(__cmp2c0_type, __cmp2c0, 0x31);
DEFINE_SFR(__cmp2c1_type, __cmp2c1, 0x32);
DEFINE_SFR(__misc_type, __misc, 0x33);
DEFINE_SFR(__mfic0_type, __mfic0, 0x34);
DEFINE_SFR(__mfic1_type, __mfic1, 0x35);
DEFINE_SFR(__simc0_type, __simc0, 0x36);
DEFINE_SFR(__simc1_type, __simc1, 0x37);
DEFINE_SFR(__sfr_byte, __simd, 0x38);
DEFINE_SFR(__sima_type, __sima, 0x39);
DEFINE_SFR(__simc2_type, __simc2, 0x39);
DEFINE_SFR(__sfr_byte, __eea, 0x3a);
DEFINE_SFR(__sfr_byte, __eed, 0x3b);
DEFINE_SFR(__lcdc_type, __lcdc, 0x3c);
DEFINE_SFR(__ldoc_type, __ldoc, 0x3d);
DEFINE_SFR(__sfr_byte, __dal, 0x3e);
DEFINE_SFR(__sfr_byte, __dah, 0x3f);
DEFINE_SFR(__eec_type, __eec, 0x140);
DEFINE_SFR(__sfr_byte, __iar0, 0x00);
DEFINE_SFR(__sfr_byte, __iar1, 0x02);


#define _iar0     __iar0
#define _iar1     __iar1
#define _mp0      __mp0
#define _mp1      __mp1
#define _bp       __bp.byte
#define _acc      __acc
#define _pcl      __pcl
#define _tblp     __tblp
#define _tblh     __tblh
#define _tbc      __tbc.byte
#define _status   __status.byte
#define _intc0    __intc0.byte
#define _tbhp     __tbhp
#define _tmr0     __tmr0
#define _tmr0c    __tmr0c.byte
#define _tmr1h    __tmr1h
#define _tmr1l    __tmr1l
#define _tmr1c    __tmr1c.byte
#define _pa       __pa.byte
#define _pac      __pac.byte
#define _pb       __pb.byte
#define _pbc      __pbc.byte
#define _pc       __pc.byte
#define _pcc      __pcc.byte
#define _lvdc     __lvdc.byte
#define _dactrl   __dactrl.byte
#define _pwm0     __pwm0
#define _pwm1     __pwm1
#define _bpctl    __bpctl.byte
#define _wdtc     __wdtc.byte
#define _intc1    __intc1.byte
#define _opa1c0   __opa1c0.byte
#define _opa1c1   __opa1c1.byte
#define _opa2c0   __opa2c0.byte
#define _opa2c1   __opa2c1.byte
#define _opa2c2   __opa2c2.byte
#define _adrl     __adrl
#define _adrh     __adrh
#define _adcr     __adcr.byte
#define _acsr     __acsr.byte
#define _smod     __smod.byte
#define _pawu     __pawu
#define _papu     __papu
#define _pbpu     __pbpu
#define _pcpu     __pcpu
#define _adpcr    __adpcr.byte
#define _intedge  __intedge.byte
#define _cmp1c0   __cmp1c0.byte
#define _cmp1c1   __cmp1c1.byte
#define _cmp2c0   __cmp2c0.byte
#define _cmp2c1   __cmp2c1.byte
#define _misc     __misc.byte
#define _mfic0    __mfic0.byte
#define _mfic1    __mfic1.byte
#define _simc0    __simc0.byte
#define _simc1    __simc1.byte
#define _simd     __simd
#define _sima     __sima.byte
#define _simc2    __simc2.byte
#define _eea      __eea
#define _eed      __eed
#define _lcdc     __lcdc.byte
#define _ldoc     __ldoc.byte
#define _dal      __dal
#define _dah      __dah
#define _eec      __eec.byte

#define _dmbp0    __bp.bits.__dmbp0
#define _tb00     __tbc.bits.__tb00
#define _tb01     __tbc.bits.__tb01
#define _tb02     __tbc.bits.__tb02
#define _lxtlp    __tbc.bits.__lxtlp
#define _tb10     __tbc.bits.__tb10
#define _tb11     __tbc.bits.__tb11
#define _tbck     __tbc.bits.__tbck
#define _tbon     __tbc.bits.__tbon
#define _c        __status.bits.__c
#define _ac       __status.bits.__ac
#define _z        __status.bits.__z
#define _ov       __status.bits.__ov
#define _pdf      __status.bits.__pdf
#define _to       __status.bits.__to
#define _emi      __intc0.bits.__emi
#define _eei0     __intc0.bits.__eei0
#define _eei1     __intc0.bits.__eei1
#define _et0i     __intc0.bits.__et0i
#define _eif0     __intc0.bits.__eif0
#define _eif1     __intc0.bits.__eif1
#define _t0f      __intc0.bits.__t0f
#define _topsc0   __tmr0c.bits.__topsc0
#define _topsc1   __tmr0c.bits.__topsc1
#define _topsc2   __tmr0c.bits.__topsc2
#define _t0e      __tmr0c.bits.__t0e
#define _t0on     __tmr0c.bits.__t0on
#define _t0m0     __tmr0c.bits.__t0m0
#define _t0m1     __tmr0c.bits.__t0m1
#define _t1e      __tmr1c.bits.__t1e
#define _t1on     __tmr1c.bits.__t1on
#define _t1s      __tmr1c.bits.__t1s
#define _t1m0     __tmr1c.bits.__t1m0
#define _t1m1     __tmr1c.bits.__t1m1
#define _vlvd0    __lvdc.bits.__vlvd0
#define _vlvd1    __lvdc.bits.__vlvd1
#define _vlvd2    __lvdc.bits.__vlvd2
#define _lvden    __lvdc.bits.__lvden
#define _lvdo     __lvdc.bits.__lvdo
#define _dacen    __dactrl.bits.__dacen
#define _vol0     __dactrl.bits.__vol0
#define _vol1     __dactrl.bits.__vol1
#define _vol2     __dactrl.bits.__vol2
#define _bz0      __bpctl.bits.__bz0
#define _bz1      __bpctl.bits.__bz1
#define _bz2      __bpctl.bits.__bz2
#define _bc0      __bpctl.bits.__bc0
#define _bc1      __bpctl.bits.__bc1
#define _pwm0en   __bpctl.bits.__pwm0en
#define _pwm1en   __bpctl.bits.__pwm1en
#define _pmode    __bpctl.bits.__pmode
#define _wdten0   __wdtc.bits.__wdten0
#define _wdten1   __wdtc.bits.__wdten1
#define _wdten2   __wdtc.bits.__wdten2
#define _wdten3   __wdtc.bits.__wdten3
#define _ws0      __wdtc.bits.__ws0
#define _ws1      __wdtc.bits.__ws1
#define _ws2      __wdtc.bits.__ws2
#define _fsyson   __wdtc.bits.__fsyson
#define _et1i     __intc1.bits.__et1i
#define _esim     __intc1.bits.__esim
#define _emfi     __intc1.bits.__emfi
#define _t1f      __intc1.bits.__t1f
#define _simf     __intc1.bits.__simf
#define _mff      __intc1.bits.__mff
#define _a1x      __opa1c0.bits.__a1x
#define _a1en     __opa1c1.bits.__a1en
#define _a1oen    __opa1c1.bits.__a1oen
#define _a1ns     __opa1c1.bits.__a1ns
#define _a1ps     __opa1c1.bits.__a1ps
#define _a1psel0  __opa1c1.bits.__a1psel0
#define _a1psel1  __opa1c1.bits.__a1psel1
#define _a1o2n    __opa1c1.bits.__a1o2n
#define _a1o2cin  __opa1c1.bits.__a1o2cin
#define _a2x      __opa2c0.bits.__a2x
#define _a2en     __opa2c1.bits.__a2en
#define _a2oen    __opa2c1.bits.__a2oen
#define _a2ns     __opa2c1.bits.__a2ns
#define _a2ps     __opa2c1.bits.__a2ps
#define _a2psel0  __opa2c1.bits.__a2psel0
#define _a2psel1  __opa2c1.bits.__a2psel1
#define _a2o2n    __opa2c1.bits.__a2o2n
#define _a2o2cin  __opa2c1.bits.__a2o2cin
#define _pga0     __opa2c2.bits.__pga0
#define _pga1     __opa2c2.bits.__pga1
#define _pga2     __opa2c2.bits.__pga2
#define _pgaen    __opa2c2.bits.__pgaen
#define _a1o2a2p  __opa2c2.bits.__a1o2a2p
#define _a1o2a2n  __opa2c2.bits.__a1o2a2n
#define _acs0     __adcr.bits.__acs0
#define _acs1     __adcr.bits.__acs1
#define _acs2     __adcr.bits.__acs2
#define _eocb     __adcr.bits.__eocb
#define _start    __adcr.bits.__start
#define _adcs0    __acsr.bits.__adcs0
#define _adcs1    __acsr.bits.__adcs1
#define _adcs2    __acsr.bits.__adcs2
#define _vrsel    __acsr.bits.__vrsel
#define _adonb    __acsr.bits.__adonb
#define _hlclk    __smod.bits.__hlclk
#define _idlen    __smod.bits.__idlen
#define _hto      __smod.bits.__hto
#define _lto      __smod.bits.__lto
#define _fsten    __smod.bits.__fsten
#define _cks0     __smod.bits.__cks0
#define _cks1     __smod.bits.__cks1
#define _cks2     __smod.bits.__cks2
#define _pcr0     __adpcr.bits.__pcr0
#define _pcr1     __adpcr.bits.__pcr1
#define _pcr2     __adpcr.bits.__pcr2
#define _pcr3     __adpcr.bits.__pcr3
#define _pcr4     __adpcr.bits.__pcr4
#define _pcr5     __adpcr.bits.__pcr5
#define _int0s0   __intedge.bits.__int0s0
#define _int0s1   __intedge.bits.__int0s1
#define _int1s0   __intedge.bits.__int1s0
#define _int1s1   __intedge.bits.__int1s1
#define _ciof0    __cmp1c0.bits.__ciof0
#define _c1of1    __cmp1c0.bits.__c1of1
#define _c1of2    __cmp1c0.bits.__c1of2
#define _c1of3    __cmp1c0.bits.__c1of3
#define _c1of4    __cmp1c0.bits.__c1of4
#define _c1rs     __cmp1c0.bits.__c1rs
#define _c1ofm    __cmp1c0.bits.__c1ofm
#define _cmp1x    __cmp1c0.bits.__cmp1x
#define _cmp1en   __cmp1c1.bits.__cmp1en
#define _c1nsel   __cmp1c1.bits.__c1nsel
#define _c1outen  __cmp1c1.bits.__c1outen
#define _c1inten  __cmp1c1.bits.__c1inten
#define _cnpsel   __cmp1c1.bits.__cnpsel
#define _c2of0    __cmp2c0.bits.__c2of0
#define _c2of1    __cmp2c0.bits.__c2of1
#define _c2of2    __cmp2c0.bits.__c2of2
#define _c2of3    __cmp2c0.bits.__c2of3
#define _c2of4    __cmp2c0.bits.__c2of4
#define _c2rs     __cmp2c0.bits.__c2rs
#define _c2ofm    __cmp2c0.bits.__c2ofm
#define _cmp2x    __cmp2c0.bits.__cmp2x
#define _cmp2en   __cmp2c1.bits.__cmp2en
#define _c2psel   __cmp2c1.bits.__c2psel
#define _c2outen  __cmp2c1.bits.__c2outen
#define _c2inten  __cmp2c1.bits.__c2inten
#define _cmpes0   __cmp2c1.bits.__cmpes0
#define _cmpes1   __cmp2c1.bits.__cmpes1
#define _pfden    __misc.bits.__pfden
#define _pfdsel   __misc.bits.__pfdsel
#define _ode0     __misc.bits.__ode0
#define _ode1     __misc.bits.__ode1
#define _ode2     __misc.bits.__ode2
#define _ode3     __misc.bits.__ode3
#define _eadi     __mfic0.bits.__eadi
#define _tb0e     __mfic0.bits.__tb0e
#define _tb1e     __mfic0.bits.__tb1e
#define _epi      __mfic0.bits.__epi
#define _adf      __mfic0.bits.__adf
#define _tb0f     __mfic0.bits.__tb0f
#define _tb1f     __mfic0.bits.__tb1f
#define _pef      __mfic0.bits.__pef
#define _eci      __mfic1.bits.__eci
#define _ee2i     __mfic1.bits.__ee2i
#define _elvdi    __mfic1.bits.__elvdi
#define _cf       __mfic1.bits.__cf
#define _e2f      __mfic1.bits.__e2f
#define _lvdf     __mfic1.bits.__lvdf
#define _simen    __simc0.bits.__simen
#define _pckp0    __simc0.bits.__pckp0
#define _pckp1    __simc0.bits.__pckp1
#define _pcken    __simc0.bits.__pcken
#define _sim0     __simc0.bits.__sim0
#define _sim1     __simc0.bits.__sim1
#define _sim2     __simc0.bits.__sim2
#define _rxak     __simc1.bits.__rxak
#define _iamwu    __simc1.bits.__iamwu
#define _srw      __simc1.bits.__srw
#define _txak     __simc1.bits.__txak
#define _htx      __simc1.bits.__htx
#define _hbb      __simc1.bits.__hbb
#define _haas     __simc1.bits.__haas
#define _hcf      __simc1.bits.__hcf
#define _iica0    __sima.bits.__iica0
#define _iica1    __sima.bits.__iica1
#define _iica2    __sima.bits.__iica2
#define _iica3    __sima.bits.__iica3
#define _iica4    __sima.bits.__iica4
#define _iica5    __sima.bits.__iica5
#define _iica6    __sima.bits.__iica6
#define _trf      __simc2.bits.__trf
#define _wcol     __simc2.bits.__wcol
#define _csen     __simc2.bits.__csen
#define _mls      __simc2.bits.__mls
#define _ckeg     __simc2.bits.__ckeg
#define _ckpolb   __simc2.bits.__ckpolb
#define _com0en   __lcdc.bits.__com0en
#define _com1en   __lcdc.bits.__com1en
#define _com2en   __lcdc.bits.__com2en
#define _com3en   __lcdc.bits.__com3en
#define _lcden    __lcdc.bits.__lcden
#define _isel     __lcdc.bits.__isel
#define _lcdbuf   __lcdc.bits.__lcdbuf
#define _ldoen    __ldoc.bits.__ldoen
#define _vsel     __ldoc.bits.__vsel
#define _vres     __ldoc.bits.__vres
#define _ren1     __ldoc.bits.__ren1
#define _vloe     __ldoc.bits.__vloe
#define _rd       __eec.bits.__rd
#define _rden     __eec.bits.__rden
#define _wr       __eec.bits.__wr
#define _wren     __eec.bits.__wren

//-----------------------------------------------------
#define _pa0      __pa.bits.__pa0
#define _pa1      __pa.bits.__pa1
#define _pa2      __pa.bits.__pa2
#define _pa3      __pa.bits.__pa3
#define _pa4      __pa.bits.__pa4		//add 2013.08.16
#define _pa5      __pa.bits.__pa5
#define _pa6      __pa.bits.__pa6
#define _pa7      __pa.bits.__pa7


#define _pac0      __pac.bits.__pac0
#define _pac1      __pac.bits.__pac1
#define _pac2      __pac.bits.__pac2
#define _pac3      __pac.bits.__pac3
#define _pac4      __pac.bits.__pac4
#define _pac5      __pac.bits.__pac5
#define _pac6      __pac.bits.__pac6
#define _pac7      __pac.bits.__pac7


//-----------------------------------------------------
#define _pb0      __pb.bits.__pb0
#define _pb1      __pb.bits.__pb1
#define _pb2      __pb.bits.__pb2
#define _pb3      __pb.bits.__pb3
#define _pb4      __pb.bits.__pb4		//add 2013.08.16
#define _pb5      __pb.bits.__pb5
#define _pb6      __pb.bits.__pb6
#define _pb7      __pb.bits.__pb7


#define _pbc0      __pbc.bits.__pbc0
#define _pbc1      __pbc.bits.__pbc1
#define _pbc2      __pbc.bits.__pbc2
#define _pbc3      __pbc.bits.__pbc3
#define _pbc4      __pbc.bits.__pbc4
#define _pbc5      __pbc.bits.__pbc5
#define _pbc6      __pbc.bits.__pbc6
#define _pbc7      __pbc.bits.__pbc7
//------------------------------------------------------
#define _pc0      __pc.bits.__pc0
#define _pc1      __pc.bits.__pc1
#define _pc2      __pc.bits.__pc2
#define _pc3      __pc.bits.__pc3
#define _pc4      __pc.bits.__pc4
#define _pc5      __pc.bits.__pc5		//add 2013.08.16
#define _pc6      __pc.bits.__pc6
#define _pc7      __pc.bits.__pc7



#define _pcc0      __pcc.bits.__pcc0
#define _pcc1      __pcc.bits.__pcc1
#define _pcc2      __pcc.bits.__pcc2
#define _pcc3      __pcc.bits.__pcc3
#define _pcc4      __pcc.bits.__pcc4
#define _pcc5      __pcc.bits.__pcc5
#define _pcc6      __pcc.bits.__pcc6
#define _pcc7      __pcc.bits.__pcc7


//------------------------------------------------------

#define ___mkstr(x)                #x
#define __EEPROM_DATA(a, b, c, d, e, f, g, h) \
                         asm("eeprom_data .section 'eeprom'"); \
                         asm("db\t" ___mkstr(a));        \
                         asm("db\t" ___mkstr(b));        \
                         asm("db\t" ___mkstr(c));        \
                         asm("db\t" ___mkstr(d));        \
                         asm("db\t" ___mkstr(e));        \
                         asm("db\t" ___mkstr(f));        \
                         asm("db\t" ___mkstr(g));        \
                         asm("db\t" ___mkstr(h));        

#endif // _HOLTEK_H_
