Comments and refactoring

This commit is contained in:
id101010
2016-01-27 14:33:51 +01:00
parent 0e7f6a5924
commit 893ec39d32
7 changed files with 721 additions and 678 deletions

View File

@@ -5,9 +5,23 @@
#include <stm32f4xx.h>
/**
* @brief Initialize all used GPIOs and initialize their clock source.
*/
void io_init(void);
/**
* @brief Edge detection for the buttons which were initialized by io_init.
* Gets called by the systick timer.
*/
void io_process(void);
/**
* @brief Edge handler which clears the edge bit to make sure a button press gets only handled once per tick.
*
* @param btnnumber Button number
* @return True if the button has a positive edge.
*/
bool io_button_has_edge(uint8_t btnnumber);
#endif /* IO_H */