36 lines
713 B
C
36 lines
713 B
C
|
|
#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_ */
|