RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
lpc176x
include
bsp
adc.h
Go to the documentation of this file.
1
8
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
36
rtems_status_code
adc_open
(
const
lpc176x_pin_number
pin_number );
37
43
rtems_status_code
adc_close
(
void
);
44
51
rtems_status_code
adc_read
(
52
const
lpc176x_pin_number
pin_number ,
53
float
*
const
result
54
);
55
56
#ifdef __cplusplus
57
}
58
#endif
/* __cplusplus */
59
60
#endif
common-types.h
Definitions types used by some devices in common.
lpc176x_pin_number
uint32_t lpc176x_pin_number
A pin of the board.
Definition
common-types.h:32
rtems_status_code
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition
status.h:85
adc_close
rtems_status_code adc_close(void)
Closes the ADC device.
Definition
adc.c:120
adc_open
rtems_status_code adc_open(const lpc176x_pin_number pin_number)
Opens and initializes the ADC device.
Definition
adc.c:101
adc_read
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
Generated by
1.18.0