RTEMS  5.0.0
adc.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (c) 2014 Taller Technologies.
11  *
12  * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef LPC176X_ADC_H
20 #define LPC176X_ADC_H
21 
22 #include <bsp.h>
23 #include <bsp/common-types.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
28 
37 
44 
52  const lpc176x_pin_number pin_number ,
53  float *const result
54 );
55 
56 #ifdef __cplusplus
57 }
58 #endif /* __cplusplus */
59 
60 #endif
rtems_status_code adc_open(const lpc176x_pin_number pin_number)
Opens and initializes the ADC device.
Definition: adc.c:101
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_status_code adc_read(const lpc176x_pin_number pin_number, float *const result)
Starts a conversion, waits for it to finish and reads the value.
Definition: adc.c:228
Definitions types used by some devices in common.
uint32_t lpc176x_pin_number
A pin of the board.
Definition: common-types.h:32
rtems_status_code adc_close(void)
Closes the ADC device.
Definition: adc.c:120