Skip to content

Commit f39021a

Browse files
committed
added support for esp32 core v3
Added reinterpret cast for TaskHandle_t which is used to set the task name (char const *)
1 parent 6e837f1 commit f39021a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qf_port.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void QActive::start(QPrioSpec const prioSpec,
113113

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

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

0 commit comments

Comments
 (0)