mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/semtech-loramac: allow pointer <-> function pointer cast
Building on native reveals error: ISO C forbids initialization between function pointer and ‘void *’ Let's disable that.
This commit is contained in:
parent
7e6fee8260
commit
e3fd43861c
@ -609,7 +609,7 @@ void *_semtech_loramac_event_loop(void *arg)
|
||||
case MSG_TYPE_MAC_TIMEOUT:
|
||||
{
|
||||
DEBUG("[semtech-loramac] MAC timer timeout\n");
|
||||
void (*callback)(void) = msg.content.ptr;
|
||||
void (*callback)(void) = (void (*)(void))(uintptr_t)msg.content.value;
|
||||
callback();
|
||||
break;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ void TimerStart(TimerEvent_t *obj)
|
||||
xtimer_t *timer = &(obj->dev);
|
||||
msg_t *msg = &(obj->msg);
|
||||
msg->type = MSG_TYPE_MAC_TIMEOUT;
|
||||
msg->content.ptr = obj->cb;
|
||||
msg->content.value = (uintptr_t)obj->cb;
|
||||
xtimer_set_msg(timer, obj->timeout, msg, semtech_loramac_pid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user