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

317 Commits

Author SHA1 Message Date
Gunar Schorcht
0b1ef9abbb cpu/esp: assert removed in esp_now_recv_cb
assert was added intentionally for debugging purposes. For released version it is enough that function returns.
2019-01-10 11:38:03 +01:00
Gunar Schorcht
3bb28c989b cpu/esp: esp_now timer restart for peer-scan moved
Timer restart was moved from esp_now_scan_peers_done to esp_now_scan_peers_start to avoid that the scan for peers isn't triggered anymore if the esp_now_scan_peers_done callback isn't called because of errors.
2019-01-07 18:36:35 +01:00
Gunar Schorcht
26cec66be5 cpu/esp: _get_iid removed in esp_now_netdev 2019-01-07 18:27:24 +01:00
Gunar Schorcht
56b3643ad6 cpu/esp: buffer in esp_now_netdev removed
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context we can read directly from the `buf` and don't need a receive buffer anymmore.
2019-01-03 17:22:19 +01:00
Gunar Schorcht
3888c62f61 cpu/esp: ringbuffer removed from esp_now_netdev
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context we only need a buffer which contains one frame and its source mac address.
2019-01-03 16:01:02 +01:00
Gunar Schorcht
d8ee8020c6 cpu/esp: remove rx_lock mutex in esp_now_netdev
Since it is not possible to reenter the function `esp_now_recv_cb`, and the functions netif::_ recv and esp_now_netdev::_ recv are called directly in the same thread context, neither a mutual exclusion has to be realized nor have the interrupts to be deactivated.
2019-01-03 14:52:57 +01:00
Gunar Schorcht
00730b41e0 cpu/esp: direct call _recv in esp_now_recv_cb
Since the esp_now_recv_cb function is not called directly as an ISR through interrupts, it is not executed in the interrupt context. _recv can therefore be called directly. The treatment of the recv_event is no longer necessary.
2019-01-03 14:39:27 +01:00
Gunar Schorcht
a2f5c9d02f cpu/esp: avoid reentrance of esp_now_recv_cb
Although it should not be possible to reenter the function esp_now_recv_cb, this is avoided by an additional boolean variable. It can not be realized by mutex because it would reenter from same thread context.  If macro NDEBUG is not defined, an assertion is used.
2019-01-03 14:01:51 +01:00
Gunar Schorcht
9b5a77f1c4 cpu/esp: fix of lost esp_now_netdev ISR events 2019-01-03 13:36:21 +01:00
Gunar Schorcht
a36366f9a9 cpu/esp: api change in esp_now_netdev::_recv
Newest version of API requires to drop the frame when if parameter len is smaller than the received packet.
2019-01-03 13:35:09 +01:00
Gunar Schorcht
49c64c01a8 cpu/esp: simplified esp_now_netdev::_recv function
Simplifies the _recv receive function structure of esp_now_netdev according to the possible parameter values.
2019-01-03 13:33:25 +01:00
Timo Rothenpieler
6be81fbd93 esp_now: use custom netif instead of raw one
Avoids parsing IPv6 packets to determine destination address.
Allows using 6Lo over ESP-NOW, which is required due to the low MTU of
ESP-NOW.

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2018-12-29 13:15:44 +01:00
Timo Rothenpieler
34c42cbcc2 esp_now: code style amendments 2018-12-28 13:35:46 +01:00
Timo Rothenpieler
a46023a523 esp_now: remove unnecessary ifdef 2018-12-28 13:35:46 +01:00
Martine Lenders
9f0dfb5222 esp_now: fix doxygen groups 2018-12-28 12:14:16 +01:00
Gunar Schorcht
797a894e40 cpu/esp32: esp_now netdev moved to esp_common 2018-12-27 17:31:34 +01:00
Gunar Schorcht
a352500476 cpu/esp_common: added for common files for ESP SoC 2018-12-27 17:28:46 +01:00