#ifndef	_Common_h_
#define	_Common_h_

#define	UartEnable								0				// 1 for UART Ebabke
// 硬體連接設定:
//		1. UART
//			TX: P0.20
//			RX: P0.17
//		2. LED: P).22
//		3. OneWire: P0.30
//		4. Simulate PWM
//			Control-0: 12
//			Control-1: 14
//			Control-2: 29
//			Control-3: 27
#define	MotorControl_A							4
#define	MotorControl_B							2				// 原 14
#define	MotorControl_C							30
#define	MotorControl_D							28				// 原 27

#define ONEWIRE_PIN								30
#define	Trace_Pin								3

#define	LED										26

#define	ReverseKey								25

#define	UARTDebug_TX							18				// For Debug: TX
#define	UARTDebug_RX							19				// For Debug: RX

#define	MaxTickValue							10

#define	FanLevel_Off							0				// Fan-Off
#define	FanLevel_Middle							5				// fAN Level-1 -> Small Fan
#define	FanLevel_Full							10				// Fan Level-5 -> Big Fan

extern	void pwm_timeout_handler(void * p_context);
extern	void uart_config(uint8_t txd_pin_number, uint8_t rxd_pin_number);
extern	void uart_putstring(char* str);
extern	void PWMOutput(void);
extern	unsigned char DS18B30_reset(void);
extern	void DS18B30_write(char WRT);
extern	unsigned char DS18B30_read(void);

extern	char	Direct[4];
extern	unsigned char	gDutycycleId;

#endif	// _Common_h_
