0% found this document useful (0 votes)
47 views1 page

Startbuttonh Final

This header file defines functions and data types for a start button component based on an event-driven architecture. It includes header files related to events, types, GPIO and other hardware for a TM4C123GH6PM microcontroller. Event and state typedefs are defined to support a state machine for the start button. Prototypes are provided for initializing the button, posting events, running the state machine, and checking for button events.

Uploaded by

api-340769184
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views1 page

Startbuttonh Final

This header file defines functions and data types for a start button component based on an event-driven architecture. It includes header files related to events, types, GPIO and other hardware for a TM4C123GH6PM microcontroller. Event and state typedefs are defined to support a state machine for the start button. Prototypes are provided for initializing the button, posting events, running the state machine, and checking for button events.

Uploaded by

api-340769184
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

/****************************************************************************

Header file for StartButton


based on the Gen 2 Events and Services Framework
****************************************************************************/
#ifndef StartButton_H
#define StartButton_H
// Event Definitions
#include "ES_Configure.h" /* gets us event definitions */
#include "ES_Types.h"
/* gets bool type for returns */
#include
#include
#include
#include
#include
#include
#include

"inc/hw_memmap.h"
"inc/hw_types.h"
"inc/hw_gpio.h"
"inc/hw_sysctl.h"
"driverlib/sysctl.h"
"driverlib/pin_map.h"
"driverlib/gpio.h"

// Define PART_TM4C123GH6PM in project

#include "BITDEFS.H"
#ifndef ALL_BITS
#define ALL_BITS (0xff<<2)
#endif
// typedefs for the states
// State definitions for use with the query function
typedef enum { ButtonInit, DebouncingStart,
DebouncingWeather, WaitingForStart,
WaitingToReset, WaitingForWeather,
} SBState_t ;
// Public Function Prototypes
bool InitializeStartButton ( uint8_t Priority );
bool PostStartButton( ES_Event ThisEvent );
ES_Event RunStartButtonSM( ES_Event ThisEvent );
bool CheckButtonEvents(void);
#endif // StartButton_H

You might also like