PSG14a emulator V1.00
PSG14a emulator for stating GTD350 engine
buttons.h File Reference

Contains functions prototypes to check the button state in non-blocking mode. More...

#include "main_outputs.h"
Include dependency graph for buttons.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BUTTON_WAIT_MS   500
 

Functions

void Buttons_Reset (void)
 
State_t Buttons_Get_State (void)
 

Detailed Description

Contains functions prototypes to check the button state in non-blocking mode.

Date
27-04-2019
Author
Mykhaylo Shcherbak mikl7.nosp@m.4@ya.nosp@m.hoo.c.nosp@m.om

Macro Definition Documentation

◆ BUTTON_WAIT_MS

#define BUTTON_WAIT_MS   500

Time the button (switch) must be in On state to recognize it's really turned on to prevent accidental start

Referenced by Buttons_Get_State(), and main().

Function Documentation

◆ Buttons_Get_State()

State_t Buttons_Get_State ( void )

Returns the current state selected by pressed button or switch

Returns
the state

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().

Here is the call graph for this function:

◆ Buttons_Reset()

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().