1
This commit is contained in:
parent
978ddae947
commit
f246e59d3e
@ -5,12 +5,6 @@ use std::cmp;
|
|||||||
use r9_macro::SharedFromSelf;
|
use r9_macro::SharedFromSelf;
|
||||||
use r9_macro_derive::SharedFromSelf;
|
use r9_macro_derive::SharedFromSelf;
|
||||||
|
|
||||||
/*
|
|
||||||
use proc_macro::TokenStream;
|
|
||||||
use quote::quote;
|
|
||||||
use syn;
|
|
||||||
*/
|
|
||||||
|
|
||||||
const TVN_BITS: usize = 6;
|
const TVN_BITS: usize = 6;
|
||||||
const TVR_BITS: usize = 8;
|
const TVR_BITS: usize = 8;
|
||||||
const TVN_SIZE: usize = 1 << TVN_BITS;
|
const TVN_SIZE: usize = 1 << TVN_BITS;
|
||||||
@ -69,7 +63,7 @@ pub struct XTimer {
|
|||||||
free_timer_list: TimerListListHeadRp,
|
free_timer_list: TimerListListHeadRp,
|
||||||
running_timer: TimerListWp,
|
running_timer: TimerListWp,
|
||||||
timer_tick: i64,
|
timer_tick: i64,
|
||||||
get_tick_count: fn () -> i64,
|
get_tick_count: Box<dyn Fn () -> i64>,
|
||||||
cache_timer_num: i32,
|
cache_timer_num: i32,
|
||||||
work_list: TimerListListHeadRp,
|
work_list: TimerListListHeadRp,
|
||||||
tv1: [TimerListListHeadRp; TVR_SIZE],
|
tv1: [TimerListListHeadRp; TVR_SIZE],
|
||||||
@ -83,7 +77,7 @@ pub struct XTimer {
|
|||||||
impl XTimer {
|
impl XTimer {
|
||||||
|
|
||||||
pub fn init(mut self,
|
pub fn init(mut self,
|
||||||
get_tick_count: fn () -> i64,
|
get_tick_count: Box<dyn Fn () -> i64>,
|
||||||
gctime: i32,
|
gctime: i32,
|
||||||
cache_timer_num: i32) {
|
cache_timer_num: i32) {
|
||||||
self.get_tick_count = get_tick_count;
|
self.get_tick_count = get_tick_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user