mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
sys_time: specify duration in seconds instead of SYS_TIME_TICKS when registering or updating a timer
This commit is contained in:
@@ -18,7 +18,7 @@ int main( void ) {
|
||||
|
||||
static inline void main_init( void ) {
|
||||
mcu_init();
|
||||
sys_time_register_timer(PERIODIC_TASK_PERIOD, NULL);
|
||||
sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
|
||||
}
|
||||
|
||||
static inline void main_periodic_task( void ) {
|
||||
|
||||
@@ -20,7 +20,7 @@ int main( void ) {
|
||||
|
||||
static inline void main_init( void ) {
|
||||
mcu_init();
|
||||
sys_time_register_timer(PERIODIC_TASK_PERIOD, NULL);
|
||||
sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
|
||||
uart0_init_tx();
|
||||
mcu_int_enable();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ int main( void ) {
|
||||
|
||||
static inline void main_init( void ) {
|
||||
mcu_init();
|
||||
sys_time_register_timer(PERIODIC_TASK_PERIOD, NULL);
|
||||
sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
|
||||
uart0_init_tx();
|
||||
mcu_int_enable();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ int main( void ) {
|
||||
|
||||
static inline void main_init( void ) {
|
||||
mcu_init();
|
||||
sys_time_register_timer(PERIODIC_TASK_PERIOD, NULL);
|
||||
sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
|
||||
uart0_init_tx();
|
||||
mcu_int_enable();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ int main( void ) {
|
||||
|
||||
static inline void main_init( void ) {
|
||||
mcu_init();
|
||||
sys_time_register_timer(PERIODIC_TASK_PERIOD, NULL);
|
||||
sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
|
||||
usb_serial_init();
|
||||
mcu_int_enable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user