Low-power demo with sleep and stop modes (STM32F407G-DISC1).
Definition in file low_power/example.cpp.
Definition at line 805 of file low_power/example.cpp.
806{
808
809
814
815
816
817
818
819
820
821
823
824
825
827
828
829
834
836
837
838
839
840
841
844
845
848 timer_host.
Start(adc_timer, adc_period, adc_period);
849
850
851
852
855
856
861
862
864
866}
#define STK_ASSERT(e)
Runtime assertion. Halts execution if the expression e evaluates to false.
Namespace of STK package.
@ ACCESS_PRIVILEGED
Privileged access mode (access to hardware is fully unrestricted).
static Ticks GetTicksFromMs(Time ms, uint32_t resolution)
Convert milliseconds to ticks.
@ KERNEL_TICKLESS
Tickless mode. To use this mode STK_TICKLESS_IDLE must be defined to 1 in stk_config....
@ KERNEL_SYNC
Synchronization support (see Event).
@ KERNEL_STATIC
All tasks are static and can not exit.
static void RtcWakeupInit()
Concrete implementation of IKernel.
void Start() override
Start the scheduler. This call does not return until all tasks have exited (KERNEL_DYNAMIC mode) or i...
EAddResult AddTask(ITask *user_task) override
Register task for a soft real-time (SRT) scheduling.
IPlatform * GetPlatform() override
Get platform driver instance owned by this kernel.
void Initialize(uint32_t resolution_us=PERIODICITY_DEFAULT) override
Initialize kernel.
virtual void SetEventOverrider(IEventOverrider *overrider, bool non_secure=false)=0
Set platform event overrider.
Software timer multiplexer that manages multiple Timer instances on top of a small fixed set of kerne...
EResult Start(Timer &tmr, uint32_t delay, uint32_t period=0)
Start timer.
EAddResult Initialize(IKernel *kernel, EAccessMode mode, const Config &cfg=Config())
Initialize timer host instance.
References stk::ACCESS_PRIVILEGED, Board::AdcInit(), stk::Kernel< TMode, TSize, TStrategy, TPlatform >::AddTask(), Board::ButtonInit(), stk::Kernel< TMode, TSize, TStrategy, TPlatform >::GetPlatform(), stk::GetTicksFromMs(), stk::Kernel< TMode, TSize, TStrategy, TPlatform >::Initialize(), stk::time::TimerHost::Initialize(), stk::KERNEL_STATIC, stk::KERNEL_SYNC, stk::KERNEL_TICKLESS, Board::LedInit(), Board::RtcWakeupInit(), stk::IPlatform::SetEventOverrider(), stk::Kernel< TMode, TSize, TStrategy, TPlatform >::Start(), stk::time::TimerHost::Start(), and STK_ASSERT.