2023-06-10 15:51:41 +00:00
|
|
|
/*
|
|
|
|
* button.h
|
|
|
|
*
|
|
|
|
* Handles presses of buttons on ParaTNC or ParaMETEO pcb. IO pins
|
|
|
|
* initialization is implemented in io.c and io.h
|
|
|
|
*
|
|
|
|
* Created on: Jun 10, 2023
|
|
|
|
* Author: mateusz
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BUTTON_H_
|
|
|
|
#define BUTTON_H_
|
|
|
|
|
2023-06-12 19:30:57 +00:00
|
|
|
#include "configuration_handler.h"
|
2023-06-10 15:51:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Should be called from main for loop or in quite short interval, like
|
|
|
|
* 10 to 100 milliseconds. It reads a state of input pins coming from
|
|
|
|
* connected push buttons and then, depending on configuration, takes
|
|
|
|
* an appropriate action.
|
|
|
|
*/
|
2023-06-12 19:30:57 +00:00
|
|
|
void button_check_all(configuration_button_function_t left, configuration_button_function_t right);
|
2023-06-10 15:51:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Resets debouncing inhibiter which enables button key presses back
|
|
|
|
*/
|
|
|
|
void button_debounce(void);
|
|
|
|
|
|
|
|
#endif /* BUTTON_H_ */
|