Skip to content

Commit

Permalink
Merge pull request #46 from stevenewald/echavemann/deprecate-timer
Browse files Browse the repository at this point in the history
Deprecate Old Timer
  • Loading branch information
stevenewald authored Dec 8, 2024
2 parents f11fc00 + a9e466e commit 26acd41
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 108 deletions.
77 changes: 0 additions & 77 deletions include/drivers/timer.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions include/drivers/virtual_timer_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class VirtualTimerController {
);
void virtual_timer_cancel(uint32_t timer_id);

uint32_t read_timer() const;

static VirtualTimerController& get();

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

void enqueue_next_timer() const;

uint32_t read_timer() const;

uint32_t timer_start(
uint32_t microseconds, ProcessCallbackPtr callback, ProcessId timer_creator
);
Expand Down
3 changes: 1 addition & 2 deletions src/drivers/driver_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "drivers/button_driver.hpp"
#include "drivers/driver_enums.hpp"
#include "drivers/led_display.hpp"
#include "drivers/timer.hpp"
#include "drivers/virtual_timer_controller.hpp"

#include <stdio.h>
Expand All @@ -23,7 +22,7 @@ etl::optional<int> handle_command(DriverCommand type, int arg1, int arg2, int ar
led_display.set_led(arg1, arg2, arg3);
break;
case DriverCommand::GET_TIME:
return timer4_controller.get_time_us();
return VirtualTimerController::get().read_timer();
case DriverCommand::TERMINAL_OUTPUT:
printf((char*)arg1);
break;
Expand Down
27 changes: 0 additions & 27 deletions src/drivers/timer.cpp

This file was deleted.

0 comments on commit 26acd41

Please sign in to comment.