PSG14a emulator V1.00
PSG14a emulator for stating GTD350 engine
|
Contains functions to check the button state in non-blocking mode. More...
#include <stdint.h>
#include "clock_and_timers.h"
#include "gpio_exti.h"
#include "main_outputs.h"
#include "buttons.h"
Data Structures | |
struct | Button_State_t |
holds the current switch (button) position (start/coldstart) and the timer how long it it is in the state More... | |
Functions | |
void | Buttons_Reset (void) |
State_t | Buttons_Get_State (void) |
Contains functions to check the button state in non-blocking mode.
State_t Buttons_Get_State | ( | void | ) |
Returns the current state selected by pressed button or switch
References Button_State_t::Button, BUTTON_COLD, BUTTON_NONE, BUTTON_START, BUTTON_WAIT_MS, IsExpiredTimer(), ResetTimer(), STATE_COLD, STATE_IDLE, STATE_START, and Button_State_t::Timer.
Referenced by main(), and mainCycleRun().
void Buttons_Reset | ( | void | ) |
Resets the button state machine. Needed after waking-up
References Button_State_t::Button, BUTTON_NONE, and Button_State_t::Timer.
Referenced by main().