forked from timypik/STM8S-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbadc.h
31 lines (29 loc) · 1.1 KB
/
badc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
******************************************************************************
* @file adc.c
* @author Khusainov Timur
* @version 0.0.0.1
* @date 7.04.2014
* @brief Board Analog-to-Digital converter support
******************************************************************************
* @attention
* <h2><center>© COPYRIGHT [email protected] </center></h2>
******************************************************************************
*/
#ifndef BADC_H
#define BADC_H
//------------------------------------------------------------------------------
typedef enum
{
BADC_ACTION_MEASURE,
BADC_ACTION_ERROR,
} tBADC_Action;
typedef void (*tBADC_OnAction)(tBADC_Action action, uint16_t data);
//------------------------------------------------------------------------------
void BADC_DeInit();
void BADC_Init(tBADC_OnAction pOnAction);
uint16_t BADC_GetMeasureImmediately(size_t channel);
void BADC_GetMeasureLazily(size_t channel);
void BADC_Process();
//------------------------------------------------------------------------------
#endif // BADC_H