/**
* @file AD5245_ATY.h
*
* @param Project DEVICE_GENERAL_ATY_LIB
*
* @author ATY
*
* @copyright
* - Copyright 2017 - 2025 MZ-ATY
* - This code follows:
* - MZ-ATY Various Contents Joint Statement -
*
* https://mengze.top/MZ-ATY_VCJS
* - CC 4.0 BY-NC-SA -
*
* https://creativecommons.org/licenses/by-nc-sa/4.0/
* - Your use will be deemed to have accepted the terms of this statement.
*
* @brief Familiar functions of AD5245 for all embedded device
*
* @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 debugEnable;
int (*LOG)();
};
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 *********************************/