RTEMS 7.0-rc1
Loading...
Searching...
No Matches
adc.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
11/*
12 * Copyright (c) 2014 Taller Technologies.
13 *
14 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef LPC176X_ADC_H
22#define LPC176X_ADC_H
23
24#include <bsp.h>
25#include <bsp/common-types.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif /* __cplusplus */
30
39
46
54 const lpc176x_pin_number pin_number ,
55 float *const result
56);
57
58#ifdef __cplusplus
59}
60#endif /* __cplusplus */
61
62#endif
Definitions types used by some devices in common.
uint32_t lpc176x_pin_number
A pin of the board.
Definition: common-types.h:34
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code adc_close(void)
Closes the ADC device.
Definition: adc.c:122
rtems_status_code adc_open(const lpc176x_pin_number pin_number)
Opens and initializes the ADC device.
Definition: adc.c:103
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:230