opto2 2.0.0.0
main.c File Reference

Opto 2 Click example. More...

#include "board.h"
#include "log.h"
#include "opto2.h"

Functions

void opto2_set_logger (uint8_t sel_out1, uint8_t sel_out2, uint8_t sel_out3, uint8_t sel_out4)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Opto 2 Click example.

Description

This application used to provide an optical isolation of sensitive microcontroller.

The demo application is composed of two sections :

Application Init

Initializes device selects the outputs (OUT1 - OUT4) which state be checked.

Application Task

Performs the check procedure for selected outputs and logs the states from that outputs on USB UART. Repeat the check procedure every 2 seconds.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )

◆ opto2_set_logger()

void opto2_set_logger ( uint8_t sel_out1,
uint8_t sel_out2,
uint8_t sel_out3,
uint8_t sel_out4 )