TTK4155 Ping-pong project
adc_driver.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int adc_init (void)
 brief Function to initialize adc. More...
 
uint8_t adc_read (int ch)
 Read adc value. More...
 

Detailed Description

Implementation of adc driver header file.

Function Documentation

◆ adc_init()

int adc_init ( void  )

brief Function to initialize adc.

brief Function to initialize adc.

<

Todo:
Need to init ADC before SRAM in main. They should not be dependent

<

Todo:
Change to bolean with <stdbool.h>

<

Todo:
Need to init ADC before SRAM in main. They should not be dependent

<

Todo:
Change to bolean with <stdbool.h>

◆ adc_read()

uint8_t adc_read ( int  ch)

Read adc value.

Parameters
chADC channel.

< Start address for the ADC

< Wait for ADC conversion to complete