opto 2.0.0.0
main.c File Reference

OPTO Click example. More...

#include "board.h"
#include "log.h"
#include "opto.h"

Functions

void opto_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)
 

Variables

uint8_t sel_output
 
uint8_t check_output
 
uint8_t cnt
 
uint8_t tmp
 

Detailed Description

OPTO Click example.

Description

This application checks the state of selected inputs and prints it.

The demo application is composed of two sections :

Application Init

Initialization driver enables GPIO and also starts write log.

Application Task

This example demonstrates the use of OPTO Click board by performing the check procedure for selected outputs and displays the results on USART terminal.

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 )

◆ opto_set_logger()

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

Variable Documentation

◆ check_output

uint8_t check_output

◆ cnt

uint8_t cnt

◆ sel_output

uint8_t sel_output

◆ tmp

uint8_t tmp