| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- /**
- * @file AD5245_ATY.h
- *
- * @param Project DEVICE_GENERAL_ATY_LIB
- *
- * @author ATY
- *
- * @copyright
- * - Copyright 2017 - 2026 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 functions of AD5245 for C platform
- *
- * @version
- * - 1_01_220927 > ATY
- * -# Preliminary version, first Release
- * - 1_02_231229 > ATY
- * -# add multy addr and channel
- * - 1_01_240111 > ATY
- * -# add lock
- ********************************************************************************
- */
- #ifndef __AD5245_ATY_H
- #define __AD5245_ATY_H
- #include "INCLUDE_ATY.h"
- /******************************* For user *************************************/
- // Set AD0 voltage level for device address
- #define AD5245_AD0 1
- // 0 1 0 1 1 0 AD0 R/W
- #define AD5245_ADDRESS (0x2C | AD5245_AD0)
- /******************************************************************************/
- struct AD5245_ATY_Dev
- {
- uint8_t ad0;
- uint8_t addr;
- uint8_t(*i2cProcess)(uint8_t addr, uint8_t* data_t, uint8_t len, uint8_t rw);
- uint8_t lock;
- };
- uint8_t AD5245_SetValue(uint8_t value, struct AD5245_ATY_Dev* dev);
- uint8_t AD5245_GetValue(uint8_t* value, struct AD5245_ATY_Dev* dev);
- #endif /* __AD5245_ATY_H */
- /******************************** End Of File *********************************/
|