
#include "define.h"


#ifdef __BOARD_C__
	#define EXT_BOARD_C
#else
	#define EXT_BOARD_C    extern
#endif

EXT_BOARD_C void Gvar_init( void );
EXT_BOARD_C void board_init( void );

EXT_BOARD_C void tmr_delay( u32 delay );
EXT_BOARD_C void led_onoff( int flag );

EXT_BOARD_C void put_char( char ch );
EXT_BOARD_C int get_char( char *ch );
EXT_BOARD_C int get_line( u32 max_len );
EXT_BOARD_C void debug_printf( char *msg, ... );
EXT_BOARD_C void UART0_get_cmd(void);

EXT_BOARD_C void pwm_init( u32 period );

EXT_BOARD_C void Set_PWM_Duty( u32 ch, float ratio );

EXT_BOARD_C void Uart_Init( void );
EXT_BOARD_C void Adc_Init( void );


EXT_BOARD_C void SPI_init( void );
EXT_BOARD_C void Lin_init( void );
EXT_BOARD_C void Lin_tx_test( uint8 instance );

EXT_BOARD_C void SPI_test(void);
EXT_BOARD_C void i2c0_init( void );
EXT_BOARD_C void i2c1_init( void );
EXT_BOARD_C void i2c_test(void);
EXT_BOARD_C void sda_in( void );
EXT_BOARD_C void sda_out( void );
EXT_BOARD_C void i2c_delay( u32 tick );

EXT_BOARD_C int Can_Init_ECU3( int ch );
EXT_BOARD_C void can_main_ECU3( void );
EXT_BOARD_C void ECU3_Data_Init( void );
EXT_BOARD_C int get_can_data( u32 ch );
EXT_BOARD_C void can_send_txring(uint8_t ch, uint32_t id, uint8_t *buf, uint8_t len);
EXT_BOARD_C void can_transmit_txring(uint8_t ch);
EXT_BOARD_C void can_tx_check(void);
EXT_BOARD_C void clear_tx_ring(uint8_t ch);
EXT_BOARD_C void clear_tx_buf(uint8_t ch);
EXT_BOARD_C void register_bus_off_callback( int ch, user_callback fp, int param );


EXT_BOARD_C void DIN_TEST(void);
EXT_BOARD_C void Adc_Read_ch(uint8_t ch);
EXT_BOARD_C uint16_t ADC_Read(uint8_t ADC_No);
EXT_BOARD_C uint8_t Digital_Read(uint8_t DIN_No);
EXT_BOARD_C void Digital_Write (uint8_t DOUT_No,uint8_t Value);


EXT_BOARD_C uint16_t adc_test1;
EXT_BOARD_C uint8_t din_test;
extern uint64_t vcan_send_miss_message;
EXT_BOARD_C u8 canfd_test_buf[64];
EXT_BOARD_C u8 hscan_test_buf[8];


