#ifndef __BSP_H__
#define __BSP_H__

//#define ALLOCATE_EXTERN

#include "HC89S105AK8.h"

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#ifndef NULL
#define NULL 0
#endif


#define			RS485_EN								P0_6
#define			RS485_EN1_PIN						P1_4
#define			RS485_EN2_PIN						P3_2
#define			RS485_EN3_PIN						P3_5


#define		DEBANCE_DELAY			40

#define		BOARD1_SET_ADD 0xFF80
#define		BOARD2_SET_ADD 0xFF00
#define		BOARD3_SET_ADD	0xFE00


#include "bsp_timer.h"
#include "bsp_wdt.h"

#include "bsp_uart.h"
//#include "bsp_flash.h"




void bsp_init(void);
void hal_clock_init(void);
void delay_2us(u32 us);
void delay_ms(u32 ms);


#endif

