Routine infrastructure
This commit is contained in:
parent
979b906f4f
commit
17b3f0a89f
11 changed files with 527 additions and 30 deletions
36
core/routine.h
Normal file
36
core/routine.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef _ROUTINE_H_
|
||||
#define _ROUTINE_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "includes/routine.h"
|
||||
|
||||
#define ROUTINE_INDEX_NONE (-1)
|
||||
|
||||
/**
|
||||
* @brief Initialize the routine state
|
||||
*/
|
||||
void routine_init(void);
|
||||
|
||||
/**
|
||||
* @brief Execute the routine, intended to be called from main. Does not return.
|
||||
*/
|
||||
void routine_exec(void);
|
||||
|
||||
/**
|
||||
* @brief Select a new routine to be active
|
||||
*/
|
||||
int routine_select(uint8_t index);
|
||||
|
||||
/**
|
||||
* @brief Fill out a buffer with a human readable list of routines
|
||||
*/
|
||||
void routine_get_listing(char *buf, uint16_t buf_len);
|
||||
|
||||
/**
|
||||
* @brief Get the index of the current running routine
|
||||
*/
|
||||
int8_t routine_get_current(void);
|
||||
|
||||
#endif /* _ROUTINE_H_ */
|
||||
Loading…
Reference in a new issue