1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #12855 from miri64/gnrc_gomach/fix/i12853

gnrc_gomac: don't use constant as argument for RTT callback
This commit is contained in:
benpicco 2019-12-02 15:10:40 +01:00 committed by GitHub
commit 900c6994af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,8 @@ static void _gomach_rtt_cb(void *arg)
{
msg_t msg;
msg.content.value = ((uint32_t) arg) & 0xffff;
(void)arg;
msg.content.value = GNRC_GOMACH_EVENT_RTT_NEW_CYCLE;
msg.type = GNRC_GOMACH_EVENT_RTT_TYPE;
msg_send(&msg, gomach_pid);
@ -194,7 +195,7 @@ static void _gomach_rtt_handler(uint32_t event, gnrc_netif_t *netif)
/* Set next cycle's starting time. */
uint32_t alarm = netif->mac.prot.gomach.last_wakeup +
RTT_US_TO_TICKS(GNRC_GOMACH_SUPERFRAME_DURATION_US);
rtt_set_alarm(alarm, _gomach_rtt_cb, (void *) GNRC_GOMACH_EVENT_RTT_NEW_CYCLE);
rtt_set_alarm(alarm, _gomach_rtt_cb, NULL);
/* Update neighbors' public channel phases. */
gnrc_gomach_update_neighbor_pubchan(netif);
@ -1451,7 +1452,7 @@ static void _gomach_phase_backoff(gnrc_netif_t *netif)
uint32_t alarm = netif->mac.prot.gomach.last_wakeup +
RTT_US_TO_TICKS(GNRC_GOMACH_SUPERFRAME_DURATION_US);
rtt_set_alarm(alarm, _gomach_rtt_cb, (void *) GNRC_GOMACH_EVENT_RTT_NEW_CYCLE);
rtt_set_alarm(alarm, _gomach_rtt_cb, NULL);
gnrc_gomach_update_neighbor_phase(netif);