common.h 685 Bytes
Newer Older
李俭双's avatar
李俭双 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#ifndef __COMMON_H__
#define __COMMON_H__

#include "BAT32A239.h"
#if (BAT32G139_100PIN) || ( BAT32G239_100PIN)
	#define BAT32G1XX_100PIN
#elif defined BAT32G139_80PIN || defined BAT32G239_80PIN
	#define BAT32G1XX_80PIN
#elif defined BAT32G139_64PIN || defined BAT32G239_64PIN
	#define BAT32G1XX_64PIN
#elif defined BAT32G139_48PIN || defined BAT32G239_48PIN
	#define BAT32G1XX_48PIN
#endif
typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;

typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
//#define SPI_INTERFACE

#endif