expand15 2.1.0.0
main.c File Reference

Expand 15 Click example. More...

#include "board.h"
#include "log.h"
#include "expand15.h"

Functions

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

Detailed Description

Expand 15 Click example.

Description

This example demonstrates the use of Expand 15 click board by setting and reading the ports state.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration which sets half of the port 0 and port 1 pins as output ( P00, P02, P04, P06, P10, P12, P14 and P16) and the half of the port 0 and port 1 pins as inputs ( P01, P03, P05, P07, P11, P13, P15 and P17).

Application Task

Sets the state of the output pins of one port and then reads the status of input pins of that port and displays the results on the USB UART approximately 2 seconds.

Note
In order for this example to work as intended it is necessary to connect the input and output pins eg. P00 and P01, P02 and P03 etc. Floating input pins will be shown as a high state.
Author
Stefan Ilic

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 )