More elegant fsl::Task implementation
This commit is contained in:
parent
7eedbfdf9b
commit
0111f3d210
9 changed files with 301 additions and 19 deletions
|
@ -53,15 +53,15 @@ uint16_t ReadTouch(SPI_TypeDef *spi, bool x)
|
|||
|
||||
Application::Application()
|
||||
: GlobalsInitializer(&m_console)
|
||||
, Task(3)
|
||||
, Task(3, &Application::Loop)
|
||||
, m_console(USART1, DMA2, LL_DMA_STREAM_2, LL_DMA_STREAM_7, this, nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
void Application::TaskFn(void *taskObj)
|
||||
{
|
||||
static_cast<Application*>(reinterpret_cast<fsl::Task<Application, APPLICATION_STACK_SIZE>*>(taskObj))->Loop();
|
||||
}
|
||||
//void Application::TaskFn(void *taskObj)
|
||||
//{
|
||||
// static_cast<Application*>(reinterpret_cast<fsl::Task<Application, APPLICATION_STACK_SIZE>*>(taskObj))->Loop();
|
||||
//}
|
||||
|
||||
void Application::Loop()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue