2021-05-15 02:27:33 -07:00
|
|
|
#define THD_WORKING_AREA(name, size) uint8_t name[size];
|
2021-05-15 13:21:24 -07:00
|
|
|
#define NORMALPRIO 1
|
|
|
|
#define CH_CFG_ST_FREQUENCY 1000000
|
2021-05-15 02:27:33 -07:00
|
|
|
|
2021-05-15 13:21:24 -07:00
|
|
|
typedef void (*tfunc_t)(void *p);
|
2021-05-15 02:27:33 -07:00
|
|
|
typedef int tprio_t;
|
2021-05-15 13:21:24 -07:00
|
|
|
typedef uint32_t systime_t;
|
2021-05-15 02:27:33 -07:00
|
|
|
|
|
|
|
class thread_t {
|
2021-05-15 13:21:24 -07:00
|
|
|
public:
|
2021-05-23 15:49:48 -07:00
|
|
|
const char *name;
|
2021-05-15 13:21:24 -07:00
|
|
|
tfunc_t funcp;
|
|
|
|
void *arg;
|
2021-05-15 02:27:33 -07:00
|
|
|
|
|
|
|
};
|
2021-05-15 13:21:24 -07:00
|
|
|
|
2021-06-24 17:18:23 -07:00
|
|
|
bool chThdShouldTerminateX(void);
|
2021-05-15 13:21:24 -07:00
|
|
|
systime_t chVTGetSystemTime(void);
|
|
|
|
systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next);
|
|
|
|
|
|
|
|
thread_t *chThdCreateStatic(void *wsp, size_t size,
|
|
|
|
tprio_t prio, tfunc_t pf, void *arg);
|