31 lines
532 B
C
31 lines
532 B
C
//
|
|
// Created by cfif on 17.11.22.
|
|
//
|
|
|
|
#ifndef ADC_NATION_H
|
|
#define ADC_NATION_H
|
|
|
|
#include "Adc.h"
|
|
#include "cmsis_os2.h"
|
|
#include "n32g45x.h"
|
|
|
|
typedef struct {
|
|
ADC_Module *ADCx;
|
|
uint8_t ADC_Channel;
|
|
bool isCalibration;
|
|
|
|
struct {
|
|
int32_t mux;
|
|
int32_t div;
|
|
int32_t offset;
|
|
} ratio;
|
|
} tAdcNation;
|
|
|
|
tAdcNation ADC_Initial(
|
|
ADC_Module *ADCx, uint8_t ADC_Channel, int32_t mux, int32_t div, int32_t offset, uint32_t timeout
|
|
);
|
|
|
|
tAdcIO vAdcGetIo(tAdcNation *env);
|
|
|
|
#endif //ADC_NATION_H
|