-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpio_adc.h
36 lines (28 loc) · 938 Bytes
/
gpio_adc.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
32
33
34
35
36
/*********************************************************************
* Filename: gpio_adc.h
*
* Description:
*
* Author: Bright Pan <[email protected]>
* Created at: 2013-04-27
*
* Change Log:
*
* Copyright (C) 2013 Yuettak Co.,Ltd
********************************************************************/
#ifndef _GPIO_ADC_H_
#define _GPIO_ADC_H_
#include <rthw.h>
#include <rtthread.h>
#include <stm32f10x.h>
#include "gpio.h"
#define RT_DEVICE_CTRL_ENABLE_CONVERT 0x14 /* enable adc convert */
#define RT_DEVICE_CTRL_DISABLE_CONVERT 0x15 /* disable adc convert */
#define RT_DEVICE_CTRL_GET_CONVERT_VALUE 0x16 /* get adc converted value */
#define DEVICE_NAME_BATTERY_ADC "bat_adc" /* BATTERY DEVICE NAME */
void rt_hw_adc11_register(void);
void rt_hw_battery_adc_register(void);
void bat_enable(void);
void bat_disable(void);
uint16_t bat_get_value(void);
#endif