0x1abin / multitimer Goto Github PK
View Code? Open in Web Editor NEWSoftware timers extend module for embedded
License: MIT License
Software timers extend module for embedded
License: MIT License
目前是使用静态分配的方式,一个timer在被stop之后,是不会释放ram的。
是否可以考虑使用动态分配方式?
为什么重复执行的定时器不在MultiTimerYield执行重新启动,在回调函数容易漏掉
增加排序功能很好,但是去掉了重复执行功能啊,单片机又很多都是要重复执行的定时器
增加可重复执行功能
struct MultiTimerHandle {
MultiTimer* next;
uint64_t deadline;
MultiTimerCallback_t callback;
void* userData;
uint64_t interval; //记录间隔
uint8_t repeat; //重复执行标记
};
//根据repeat标志重新启动定时器
if (entry->repeat) {
MultiTimerStart(entry, entry->interval, entry->callback, entry->userData, entry->repeat)
}
这个软定时器个人觉得很不错啊,但是带参函数的定时似乎没法做到,有办法解决吗
timer_ticks(const uint32_t out_tick)
如果作者允许的话,我可以为该工程实现以上需求,谢谢!
用的8位机不支持uint64_t,只支持uint32_t,用的ms定时器累加计时tick
uint32_t tick;
void Timer0_IRQHandler(void) interrupt TMR0_VECTOR
{
tick++;
TH0 =(65536-4000)>>8 ;
TL0 = 65536-4000;
}
请问tick溢出时,PlatformTicksGetFunc中需要做何种处理,
还是说我只需要将tick置0
如题,没看到main.c文件
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.