@@ -32,7 +32,7 @@ enum { TASK_STACK_SIZE = 256 };
3232static stk::sync::PipeT<uint8_t , 1 > g_LedPipe[LED_MAX];
3333
3434template <stk::EAccessMode _AccessMode>
35- class HwLedTask : public stk ::Task<TASK_STACK_SIZE, _AccessMode>
35+ class HwLedTask final : public stk::Task<TASK_STACK_SIZE, _AccessMode>
3636{
3737 uint8_t m_task_id;
3838
@@ -41,7 +41,7 @@ class HwLedTask : public stk::Task<TASK_STACK_SIZE, _AccessMode>
4141 {}
4242
4343private:
44- void Run ()
44+ void Run () override
4545 {
4646 for (;;)
4747 {
@@ -69,10 +69,9 @@ class HwLedTask : public stk::Task<TASK_STACK_SIZE, _AccessMode>
6969};
7070
7171template <stk::EAccessMode _AccessMode>
72- class CtrlTask : public stk ::Task<TASK_STACK_SIZE, _AccessMode>
72+ class CtrlTask final : public stk::Task<TASK_STACK_SIZE, _AccessMode>
7373{
74- private:
75- void Run ()
74+ void Run () override
7675 {
7776 uint8_t led = 0 ;
7877 stk::time::PeriodicTrigger trigger (1000 , true );
@@ -104,17 +103,9 @@ class CtrlTask : public stk::Task<TASK_STACK_SIZE, _AccessMode>
104103};
105104
106105// optional: you can override sleep and hard fault default behaviors
107- class PlatformEventHandler : public stk ::IPlatform::IEventOverrider
106+ class PlatformEventHandler final : public stk::IPlatform::IEventOverrider
108107{
109- private:
110- bool OnSleep ()
111- {
112- // if handled inside this function then return true, otherwise event will be handled by the driver
113- // note: if returned false once this function will not be called again until Kernel is re-started
114- return false ;
115- }
116-
117- bool OnHardFault ()
108+ bool OnHardFault () override
118109 {
119110 // switch on Red LED as indication of the error
120111 Led::SwitchOnExclusive (Led::RED);
0 commit comments