#ifndef	_MAIN_H
#define	_MAIN_H

#define MAIN_PWM_RES_BITS 7
#define PRS_PWM_RES_BITS  8
#define PWM_RES_BITS (MAIN_PWM_RES_BITS + PRS_PWM_RES_BITS)
#define MAIN_PWM_PERIOD ((1 << MAIN_PWM_RES_BITS) - 1)

#pragma fastcall16 ADPCMDecoder1
#pragma fastcall16 ADPCMDecoder2
#pragma fastcall16 PRSPWM_WritePulseWidth

extern unsigned char SPI_SEND(unsigned char UUBUF);		//read from assemble file
extern void 	DPCM_INIT(void);
extern void 	DPCMDecoder1(unsigned char code);
extern void 	DPCMDecoder2(unsigned char code);
extern void 	PRSPWM_WritePulseWidth(WORD dur);

#define	MMC_xCS	(((struct s_GpioGroup*)&PRT2DR)->b0) 	//Port_2_0 = MMC_xCS
struct s_GpioGroup {
	char	b0	:1;
	char	b1	:1;
	char	b2	:1;
	char	b3	:1;
	char	b4	:1;
	char	b5	:1;
	char	b6	:1;
	char	b7	:1;
};




#endif


