TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
Loading...
Searching...
No Matches
adc.c File Reference
#include <avr/io.h>
#include <stdio.h>
#include <util/delay.h>
#include "adc.h"
#include "log.h"

Go to the source code of this file.

Macros

#define ADC_BASE_ADR   ((volatile uint8_t *)0x1000)

Functions

 LOG_MODULE_DEFINE ("ADC")
void ADC_init (void)
 Initialize the external memory–mapped ADC interface.
void ADC_start_conv (void)
 Start a conversion on the external ADC and wait for completion.
uint8_t ADC_read_ch (void)
 Read the current ADC channel sample.
void ADC_read_all (struct ADC_meas *output)
 Perform a full four-channel ADC conversion and return all results.

Macro Definition Documentation

◆ ADC_BASE_ADR

#define ADC_BASE_ADR   ((volatile uint8_t *)0x1000)

Definition at line 10 of file adc.c.

Referenced by ADC_read_ch(), and ADC_start_conv().

Function Documentation

◆ LOG_MODULE_DEFINE()

LOG_MODULE_DEFINE ( "ADC" )