代码拉取完成,页面将自动刷新
/*
* stimer.h
*
* Created on: 2021121
* Author: hello
*/
#ifndef STIMER_H_
#define STIMER_H_
#include <stdint.h>
typedef enum
{
STIMER_MODE_SINGLE = 1,
STIMER_MODE_REPEAT = 2,
}stimet_mode_t;
typedef struct _stimer
{
const char* name;
uint32_t timeout_ticks;
uint32_t startup_ticks;
void (*callback)(void* arg);
stimet_mode_t mode;
void* arg;
struct _stimer* next;
}stimer_t;
void stimer_init(stimer_t* timer, const char* name, void (*timeout_callback)(void* arg), void* arg, uint32_t ticks, stimet_mode_t mode);
void stimer_start(stimer_t* timer);
void stimer_stop(stimer_t* timer);
void stimer_restart(stimer_t* timer);
void stimer_poll(void);
void stimer_ticks(void);
uint32_t stimer_getticks(const stimer_t* timer);
#endif /* STIMER_H_ */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。