1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

cpu: use adc_legacy.h where appropriate

This commit is contained in:
Ludwig Ortmann 2014-10-25 17:09:22 +02:00
parent c59dd9787f
commit d42d226d66
2 changed files with 2 additions and 12 deletions

View File

@ -27,6 +27,7 @@
*/
#include <stdint.h>
#include "adc_legacy.h"
#define ADC_NUM (6)
#define ADC_OFFSET (0x10)
@ -38,18 +39,8 @@
/**
* @brief Initialize ADC.
*/
void adc_init(void);
void adc_init_1(void);
void adc_init_2(void);
/**
* @brief Read ADC value of selected channel.
*
* Valid channel numbers are from 0 to 2.
*
* @return ADC value of selected channel.
*/
uint16_t adc_read(uint8_t channel);
/** @} */
#endif /* LPC2387ADC_H_ */

View File

@ -13,6 +13,7 @@
#define ADC_H
#include <stdint.h>
#include "adc_legacy.h"
#define ADC_BASE (0x8000D000)
@ -123,9 +124,7 @@ struct ADC_struct {
static volatile struct ADC_struct *const ADC = (void *)(ADC_BASE);
/* function prototypes */
void adc_init(void);
void adc_setup_channel(uint8_t channel);
uint16_t adc_read(void);
void adc_flush(void);
void adc_service(uint16_t *channels_read);