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

tests/driver_sx127x: handle RX started netdev event

This commit is contained in:
Alexandre Abadie 2019-03-08 08:45:42 +01:00
parent 433ccc9a11
commit 36affe13c2
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -326,6 +326,10 @@ static void _event_cb(netdev_t *dev, netdev_event_t event)
size_t len;
netdev_sx127x_lora_packet_info_t packet_info;
switch (event) {
case NETDEV_EVENT_RX_STARTED:
puts("Data reception started");
break;
case NETDEV_EVENT_RX_COMPLETE:
len = dev->driver->recv(dev, NULL, 0, 0);
dev->driver->recv(dev, message, len, &packet_info);