| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- /******************************************************************************
- **************************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 <stdio.h> //printf()
- #include <string.h>
- #include <stdlib.h>
- /********************************************************************************
- 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--);
- }
|