Archived
Template
1
0

initial commit

This commit is contained in:
2023-07-11 12:27:35 +02:00
commit b0e3d721e0
28 changed files with 2919 additions and 0 deletions

54
src/template.h Normal file
View File

@@ -0,0 +1,54 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date July 2023
* @file ${FILENAME}.h
*/
#ifndef ${FILENAME}_H
#define ${FILENAME}_H
#include "../xf/xf.h"
typedef enum{
ST${FN}_INIT,
{STATES}
} ${FILENAME}_STATES;
typedef enum{
ev${FN}init = 100, // TODO change this number
{EVENTS}
} ${FILENAME}_EVENTS;
typedef struct{
${FILENAME}_STATES state;
} ${FILENAME};
/**
* Initialize the ${FILENAME}
* @param me the ${FILENAME} itself
*/
void ${FILENAME}_init(${FILENAME}* me);
/**
* Start the ${FILENAME} state machine
* @param me the ${FILENAME} itself
*/
void ${FILENAME}_startBehaviour(${FILENAME}* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool ${FILENAME}_processEvent(Event* ev);
void ${FILENAME}_set{TIMEON}(${FILENAME}*me, uint16_t t);
/**
* Emit the ${EVENT} event
* @param me the ${FILENAME} itself
*/
void ${FILENAME}_emit${EVENT}(${FILENAME}*me);
#endif