TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
Loading...
Searching...
No Matches
adc.h
Go to the documentation of this file.
1
8
9#ifndef INCLUDE_INCLUDE_ADC_H_
10#define INCLUDE_INCLUDE_ADC_H_
11
12#include <stdint.h>
13
20struct ADC_meas {
21 uint8_t channel[4];
22};
23
31void ADC_init(void);
32
39void ADC_start_conv(void);
40
48uint8_t ADC_read_ch(void);
49
58void ADC_read_all(struct ADC_meas *output);
59
65void ADC_test(void);
66
67#endif // INCLUDE_INCLUDE_ADC_H_
68
void ADC_test(void)
Internal ADC test routine. (Currently disabled in implementation.).
void ADC_init(void)
Initialize the external memory–mapped ADC interface.
Definition adc.c:12
uint8_t ADC_read_ch(void)
Read the current ADC channel sample.
Definition adc.c:30
void ADC_read_all(struct ADC_meas *output)
Perform a full four-channel ADC conversion and return all results.
Definition adc.c:36
void ADC_start_conv(void)
Start a conversion on the external ADC and wait for completion.
Definition adc.c:21
Container for ADC measurement results.
Definition adc.h:20
uint8_t channel[4]
Definition adc.h:21