adc20 2.1.0.0
main.c File Reference

ADC 20 Click example. More...

#include "board.h"
#include "log.h"
#include "adc20.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

ADC 20 Click example.

Description

This example demonstrates the use of ADC 20 click board by displaying the state of 8 channels configured as analog inputs (CH2-CH5), digital inputs (CH0-CH1) and digital outputs (CH6-CH7).

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration.

Application Task

Starts the auto sequence mode, reads the 12bit ADC value from analog input channels (CH2-CH5) and displays the values converted to voltage on the USB UART. After that, stops auto sequence mode and toggles the state of digital output pins (CH6-CH7), then reads and displays the state of all GPIO pins.

Author
Stefan Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )