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:
parent
c59dd9787f
commit
d42d226d66
@ -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_ */
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user