Skip to content

Commit

Permalink
added support for esp32 core v3
Browse files Browse the repository at this point in the history
Added reinterpret cast for TaskHandle_t which is used to
set the task name (char const *)
  • Loading branch information
vChavezB committed Oct 5, 2024
1 parent 6e837f1 commit f39021a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qf_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void QActive::start(QPrioSpec const prioSpec,

/* task name provided by the user in QF_setTaskName() or default name */
char const *taskName = (m_thread != nullptr)
? static_cast<char const *>(m_thread)
? reinterpret_cast<char const *>(m_thread)
: static_cast<char const *>("AO");

/* statically create the FreeRTOS task for the AO */
Expand All @@ -138,7 +138,7 @@ void QActive::setAttr(std::uint32_t attr1, void const *attr2) {
switch (attr1) {
case TASK_NAME_ATTR:
/* temporarily store the name */
m_thread = const_cast<void *>(attr2); /* cast 'const' away */
m_thread = reinterpret_cast<TaskHandle_t>(const_cast<void *>(attr2)); /* cast 'const' away */
break;
/* ... */
}
Expand Down

0 comments on commit f39021a

Please sign in to comment.