1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc_lorawan: rename radio event functions

This commit is contained in:
Jose Alamos 2020-05-08 12:55:45 +02:00
parent 612d723d6c
commit 5146261f03
3 changed files with 9 additions and 9 deletions

View File

@ -180,14 +180,14 @@ typedef struct {
*
* @param[in] mac pointer to the MAC descriptor
*/
void gnrc_lorawan_event_timeout(gnrc_lorawan_t *mac);
void gnrc_lorawan_radio_rx_timeout_cb(gnrc_lorawan_t *mac);
/**
* @brief Indicate the MAC layer when the transmission finished
*
* @param[in] mac pointer to the MAC descriptor
*/
void gnrc_lorawan_event_tx_complete(gnrc_lorawan_t *mac);
void gnrc_lorawan_radio_tx_done_cb(gnrc_lorawan_t *mac);
/**
* @brief Init GNRC LoRaWAN
@ -231,7 +231,7 @@ void gnrc_lorawan_mcps_request(gnrc_lorawan_t *mac, const mcps_request_t *mcps_r
*
* @param[in] mac pointer to the MAC descriptor
*/
void gnrc_lorawan_recv(gnrc_lorawan_t *mac);
void gnrc_lorawan_radio_rx_done_cb(gnrc_lorawan_t *mac);
/**
* @brief MCPS indication callback

View File

@ -147,7 +147,7 @@ void gnrc_lorawan_open_rx_window(gnrc_lorawan_t *mac)
dev->driver->set(dev, NETOPT_STATE, &state, sizeof(state));
}
void gnrc_lorawan_event_tx_complete(gnrc_lorawan_t *mac)
void gnrc_lorawan_radio_tx_done_cb(gnrc_lorawan_t *mac)
{
mac->msg.type = MSG_TYPE_TIMEOUT;
mac->state = LORAWAN_STATE_RX_1;
@ -166,7 +166,7 @@ void gnrc_lorawan_event_tx_complete(gnrc_lorawan_t *mac)
_sleep_radio(mac);
}
void gnrc_lorawan_event_timeout(gnrc_lorawan_t *mac)
void gnrc_lorawan_radio_rx_timeout_cb(gnrc_lorawan_t *mac)
{
(void) mac;
switch (mac->state) {
@ -273,7 +273,7 @@ void gnrc_lorawan_process_pkt(gnrc_lorawan_t *mac, gnrc_pktsnip_t *pkt)
gnrc_lorawan_mac_release(mac);
}
void gnrc_lorawan_recv(gnrc_lorawan_t *mac)
void gnrc_lorawan_radio_rx_done_cb(gnrc_lorawan_t *mac)
{
netdev_t *dev = gnrc_lorawan_get_netdev(mac);
int bytes_expected = dev->driver->recv(dev, NULL, 0, 0);

View File

@ -125,13 +125,13 @@ static void _driver_cb(netdev_t *dev, netdev_event_t event)
DEBUG("gnrc_netif: event triggered -> %i\n", event);
switch (event) {
case NETDEV_EVENT_RX_COMPLETE:
gnrc_lorawan_recv(mac);
gnrc_lorawan_radio_rx_done_cb(mac);
break;
case NETDEV_EVENT_TX_COMPLETE:
gnrc_lorawan_event_tx_complete(mac);
gnrc_lorawan_radio_tx_done_cb(mac);
break;
case NETDEV_EVENT_RX_TIMEOUT:
gnrc_lorawan_event_timeout(mac);
gnrc_lorawan_radio_rx_timeout_cb(mac);
break;
default:
DEBUG("gnrc_netif: warning: unhandled event %u.\n", event);