powerreset 2.0.0.0
main.c File Reference

Power Reset Click example. More...

#include "board.h"
#include "log.h"
#include "powerreset.h"

Functions

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

Variables

powerreset_state_t pwr_state
 
powerreset_state_t rst_state
 
powerreset_state_t new_pwr_state
 
powerreset_state_t new_rst_state
 

Detailed Description

Power Reset Click example.

Description

Reads PWR and RST pin states and performs a control of the timer counter depending on the pressed button.

The demo application is composed of two sections :

Application Init

Initializes device and logger module, prints Initialization done message.

Application Task

Checks the states of the PWR and RST pins and logs every change.

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 )

Variable Documentation

◆ new_pwr_state

powerreset_state_t new_pwr_state

◆ new_rst_state

powerreset_state_t new_rst_state

◆ pwr_state

powerreset_state_t pwr_state

◆ rst_state

powerreset_state_t rst_state