/****************************************************************************** **************************Hardware interface layer***************************** * | file : DEV_Config.c * | version : V1.0 * | date : 2020-06-17 * | function : Provide the hardware underlying interface ******************************************************************************/ #include "DEV_Config.h" #include //printf() #include #include /******************************************************************************** function: System Init note: Initialize the communication method ********************************************************************************/ uint8_t System_Init(void) { return 0; } void System_Exit(void) { } /******************************************************************************** function: Hardware interface note: SPI4W_Write_Byte(value) : HAL library hardware SPI Register hardware SPI Gpio analog SPI I2C_Write_Byte(value, cmd): HAL library hardware I2C ********************************************************************************/ uint8_t SPI4W_Write_Byte(uint8_t value) { return 0; } void I2C_Write_Byte(uint8_t value, uint8_t Cmd) { } /******************************************************************************** function: Delay function note: Driver_Delay_ms(xms) : Delay x ms Driver_Delay_us(xus) : Delay x us ********************************************************************************/ void Driver_Delay_ms(uint32_t xms) { HAL_Delay(xms); } void Driver_Delay_us(uint32_t xus) { int j; for(j=xus; j > 0; j--); }