Skip to content

Instantly share code, notes, and snippets.

@bwywb00
Created November 5, 2019 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwywb00/64ec488f45e2764be90ec173cf562ce8 to your computer and use it in GitHub Desktop.
Save bwywb00/64ec488f45e2764be90ec173cf562ce8 to your computer and use it in GitHub Desktop.
#include <stdint.h>
#include "stm32f4xx_hal.h"
typedef enum _ovenRunState_t
{
STOP_OVEN,
RUN_OVEN
}ovenRunState_t;
typedef enum _ovenRotateState_t
{
LEFT,
RIGHT
}ovenRotateState_t;
typedef enum _ovenTimerState_t
{
STOP_TIMER,
RUN_TIMER
}ovenTimerState_t;
typedef struct _ovenInterface
{
ovenRunState_t ovenRunState;
ovenRotateState_t ovenRotateState;
ovenTimerState_t ovenTimerState;
uint32_t ovenTimer;
uint16_t ovenTimerLimit;
void (*Excute)(void);
void (*TimerHandler)(void);
void (*Button1Handler)(void);
void (*ResetOven)(void);
void (*RunOven)(void);
void (*StopOven)(void);
}ovenInterface;
#include "Oven1.h"
#include "Oven2.h"
#include "Oven3.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment