Files
microchip-application-bmd38…/elite_dac.h
T
2024-06-27 21:30:26 +08:00

29 lines
822 B
C

#ifndef __ELITE_DAC_H__
#define __ELITE_DAC_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdint.h>
#define DACCLS 0x02
#define DACOUT 0x31
// DAC Vout theoretical boundary <300, 100~ (mV)
#define DAC_VOUT_GAIN_SMALL_BOUNDARY 100000 // 25500(usercode) = 100 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY 300000 // 26500(usercode) = 300 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY_USERCODE 26500 // 26500(usercode) = 300 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY1_USERCODE 23500 // 23500(usercode) = -300 mV
void VoutGainControl(uint8_t VOUTLevel);
int32_t User2Real(uint16_t UserCode);
void AutoGainChangeVout(uint32_t *p_VoutGainLv, int32_t usr_code);
#ifdef __cplusplus
}
#endif
#endif /* ! __ELITE_DAC_H__ */