Page MenuHomec4science

button.h
No OneTemporary

File Metadata

Created
Sat, Jun 22, 08:14

button.h

#ifndef __BUTTON_H
#define __BUTTON_H
#include "../main.h"
/** @defgroup Button Driver / Button
* @brief Driver to access a button
*
* Call but_Init() first in the initialization code. Then, call but_GetState()
* to read the current state of the button.
*
* It is also possible to pass a function pointer to the but_Init() function.
* Then, the given function will be called automatically when the button state
* changes (pressed or released).
*
* @addtogroup Button
* @{
*/
void but_Init(void (*stateChangedCallback)(bool));
bool but_GetState(void);
/**
* @}
*/
#endif

Event Timeline