Skip to content

Commit 26acd41

Browse files
authored
Merge pull request #46 from stevenewald/echavemann/deprecate-timer
Deprecate Old Timer
2 parents f11fc00 + a9e466e commit 26acd41

File tree

4 files changed

+3
-108
lines changed

4 files changed

+3
-108
lines changed

include/drivers/timer.hpp

Lines changed: 0 additions & 77 deletions
This file was deleted.

include/drivers/virtual_timer_controller.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class VirtualTimerController {
4040
);
4141
void virtual_timer_cancel(uint32_t timer_id);
4242

43+
uint32_t read_timer() const;
44+
4345
static VirtualTimerController& get();
4446

4547
VirtualTimerController(VirtualTimerController&) = delete;
@@ -56,8 +58,6 @@ class VirtualTimerController {
5658

5759
void enqueue_next_timer() const;
5860

59-
uint32_t read_timer() const;
60-
6161
uint32_t timer_start(
6262
uint32_t microseconds, ProcessCallbackPtr callback, ProcessId timer_creator
6363
);

src/drivers/driver_commands.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "drivers/button_driver.hpp"
44
#include "drivers/driver_enums.hpp"
55
#include "drivers/led_display.hpp"
6-
#include "drivers/timer.hpp"
76
#include "drivers/virtual_timer_controller.hpp"
87

98
#include <stdio.h>
@@ -23,7 +22,7 @@ etl::optional<int> handle_command(DriverCommand type, int arg1, int arg2, int ar
2322
led_display.set_led(arg1, arg2, arg3);
2423
break;
2524
case DriverCommand::GET_TIME:
26-
return timer4_controller.get_time_us();
25+
return VirtualTimerController::get().read_timer();
2726
case DriverCommand::TERMINAL_OUTPUT:
2827
printf((char*)arg1);
2928
break;

src/drivers/timer.cpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)