| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /**
- * @file HW_SPI_ATY.h
- *
- * @param Project DEVICE_GENERAL_ATY_LIB
- *
- * @author ATY
- *
- * @copyright
- * - Copyright 2017 - 2023 MZ-ATY
- * - This code follows:
- * - MZ-ATY Various Contents Joint Statement -
- * <a href="https://mengze.top/MZ-ATY_VCJS">
- * https://mengze.top/MZ-ATY_VCJS</a>
- * - CC 4.0 BY-NC-SA -
- * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
- * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
- * - Your use will be deemed to have accepted the terms of this statement.
- *
- * @brief Familiar functions of SPI for all embedded device
- *
- * @version
- * - 1_01_221028 > ATY
- * -# Preliminary version, first Release
- * - 1_01_240111 > ATY
- * -# add multy addr and channel
- * -# add lock
- ********************************************************************************
- */
- #ifndef __HW_SPI_ATY_H
- #define __HW_SPI_ATY_H
- #include "INCLUDE_ATY.h"
- /******************************* For user *************************************/
- /******************************************************************************/
- struct HW_SPI_ATY_Dev
- {
- uint8_t hardwareEnable;
- uint8_t(*spiProcess)(uint8_t* data_t, uint16_t len, uint8_t rw);
- void (*delay)(uint32_t t);
- uint8_t lock;
- uint8_t debugEnable;
- void (*LOG)(const char*, ...);
- };
- uint8_t SPI_Write(uint8_t* data_t, uint16_t len, struct HW_SPI_ATY_Dev* dev);
- uint8_t SPI_Read(uint8_t* data_t, uint16_t len, struct HW_SPI_ATY_Dev* dev);
- uint8_t SPI_ReadWrite(uint8_t* data_t, uint16_t len, struct HW_SPI_ATY_Dev* dev);
- #endif /* __HW_SPI_ATY_H */
- /******************************** End Of File *********************************/
|