sys_time: specify duration in seconds instead of SYS_TIME_TICKS when registering or updating a timer

This commit is contained in:
Felix Ruess
2012-01-27 21:52:52 +01:00
parent 5f511e0eee
commit 7412e35a04
16 changed files with 46 additions and 28 deletions
+1 -1
View File
@@ -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 ) {
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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();
}