c1wireswitch 2.1.0.0
main.c File Reference

1-Wire Switch Click Example. More...

#include "board.h"
#include "log.h"
#include "c1wireswitch.h"

Functions

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

Detailed Description

1-Wire Switch Click Example.

Description

This library contains API for 1-Wire Switch Click driver. The library initializes and defines the 1-Wire bus drivers to write and read data for state programmable I/O, as well as the default configuration.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs default configuration and sets the PIO A to OFF and PIO B to ON state.

Application Task

This example demonstrates the use of the 1-Wire Switch Click board by changing the PIO A state, which is controlling the LED, every time the state of PIO B changes. Change on the PIO B happens when the button is pushed.

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 )