Skip to content

Commit

Permalink
fixup! pkg/semtech-loramac: allow pointer <-> function pointer cast
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jul 31, 2020
1 parent f675ecc commit f64f2e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/semtech-loramac/contrib/semtech_loramac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) = (void (*)(void))(uintptr_t)msg.content.ptr;
void (*callback)(void) = (void (*)(void))(uintptr_t)msg.content.value;
callback();
break;
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/semtech-loramac/contrib/semtech_loramac_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (void*)(uintptr_t)obj->cb;
msg->content.value = (uintptr_t)obj->cb;
xtimer_set_msg(timer, obj->timeout, msg, semtech_loramac_pid);
}

Expand Down

0 comments on commit f64f2e8

Please sign in to comment.