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

37 Commits

Author SHA1 Message Date
Benjamin Valentin
e6d2ff668b drivers/dose: only disable watchdog when transiting from RECV state
The DOSE watchdog should only run if at least one interface is in RECV
state.

That means it must be enabled when entering RECV state and disabled
when leaving RECV state.

The watchdog was *always* disabled on a transition to IDLE.
This is wrong: If there are two interfaces and one is in RECV state
but the other did just SEND something and transitions to IDLE state
from SEND state, it would still disable the watchdog.

Fix this by only disabling the watchdog if the current state is RECV.
2022-02-28 17:22:48 +01:00
Benjamin Valentin
0695a7e40e drivers/dose: include board.h
`DOSE_TIMER_DEV` is defined in `board.h`, so we have to include it.
It's not included by the header (and should not), so move the check
to the .c file.
2022-02-02 15:38:57 +01:00
Francisco Molina
dc27c080ea drivers/dose: migrate to ztimer_usec 2022-01-25 08:43:33 +01:00
Benjamin Valentin
a8ad618a71 drivers/dose: make use of ringbuffer for RX 2022-01-19 11:43:35 +01:00
Benjamin Valentin
3e1076e3b9 drivers/dose: set backoff timer before send 2022-01-18 15:41:38 +01:00
Benjamin Valentin
ddf80a8bdb drivers/dose: introduce watchdog timer 2022-01-18 15:41:38 +01:00
benpicco
e8cbf1ea90
Merge pull request #16681 from benpicco/drivers/dose-collision
drivers/dose: make use of UART collision detection feature
2021-12-08 20:48:28 +01:00
Benjamin Valentin
0c5631bd52 drivers/dose: make use of periph_uart_collision feature 2021-12-08 17:35:00 +01:00
Benjamin Valentin
965fa3ef10 drivers/dose: clarify timeout calculation 2021-11-11 14:43:07 +01:00
Benjamin Valentin
32c29bf062 drivers/dose: fix standby mode
Previously we would not disable the sense pin, this meant that
a node could still wake up if the standby pin is not connected.

Properly disable sensing when in standby and wait for a state
transition to IDLE to avoid aborting a reception and messing up the
DOSE internal state.
2021-11-11 14:33:55 +01:00
benpicco
026d6cfba1
Merge pull request #16768 from benpicco/drivers/dose-timeout_bytes
drivers/dose: calculate timeout based on symbol rate
2021-11-10 12:40:13 +01:00
Benjamin Valentin
6c1481b6ee drivers/dose: enable standby pin
Some CAN transceivers have a standby pin that has to be pulled low
in order to use it.
If the interface is disabled we can set it to high again to save some
power.
2021-11-09 15:19:35 +01:00
Benjamin Valentin
3399a6476a drivers/dose: calculate timeout based on symbol rate
A fixed timeout is either too long for high symbol rates or too short
for low symbol rates.

To fix this, calculate the timeout based on the symbol rate.

For this, the old 5ms timeout is equivalent to 58 bytes being transmitted
at 115200 baud (8 data bit + start & stop bit).

I rounded this to 50 bytes which should yield 4340 µs.
2021-08-25 20:48:54 +02:00
benpicco
feac187d54
Merge pull request #16506 from benpicco/drivers/dose-rx_start
drivers/dose: make use of start condition received interrupt
2021-07-28 17:21:29 +02:00
Benjamin Valentin
d48f673597 drivers/dose: make use of periph_uart_rx_start feature 2021-07-28 16:19:04 +02:00
Jose Alamos
d4052805f9
drivers/dose: avoid explicit cast to netdev 2021-07-09 11:35:21 +02:00
Benjamin Valentin
5b959364fc drivers/dose: return -EBUSY if medium is busy
If there was a collision, return -EBUSY so the frame can be put into
the packet queue and we can attempt to send it again.
2021-07-06 16:12:31 +02:00
Bas Stottelaar
92b1dfc703 drivers/*: realign ENABLE_DEBUG 2020-10-23 01:26:09 +02:00
Bas Stottelaar
4bdfe9a254 drivers/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Benjamin Valentin
08db12be3b drivers/dose: don't default to UART0
The first UART is usually used for the shell, so don't default
DOSE on it.
2020-09-03 20:20:16 +02:00
Benjamin Valentin
f4f1114ead drivers/dose: use EUI provider 2020-09-03 20:16:32 +02:00
Cenk Gündoğan
538155c344
Merge pull request #14904 from leandrolanzieri/pr/kconfig/change_prefix_convention
treewide: modify Kconfig symbol prefixes
2020-09-01 15:57:06 +02:00
Gunar Schorcht
6d61381d2a drivers: use inline functions for GPIO comparisons
The expandable GPIO API requires the comparison of structured GPIO types. This means that inline functions must be used instead of direct comparisons. For the migration process, drivers must first be changed so that they use the inline comparison functions.
2020-08-31 13:10:28 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Benjamin Valentin
decadc41a0 drivers/dose: register driver with netdev 2020-08-17 22:53:51 +02:00
304bce3724
drivers: configure per driver dependency resolution 2020-07-20 14:32:16 +02:00
490126cfa0
drivers: move USEMODULE_INCLUDES in each driver directories 2020-07-15 20:36:27 +02:00
Akshai M
3a65d163f6 drivers/dose : Expose to Kconfig
Expose Configurations to Kconfig

Co-Authored-By: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2020-04-21 16:00:25 +05:30
Akshai M
0784190c9c drivers/dose : Add CONFIG_
Add CONFIG_ Prefix for DOSE_TIMEOUT_USEC
2020-04-21 16:00:25 +05:30
Benjamin Valentin
c4f248d51c drivers/dose: fix declaration of signal() 2020-03-23 20:35:54 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
Jue
9cb8e2c941 drivers/dose: made the sense pin optional 2020-02-16 17:58:58 +01:00
Jue
cc184ca65b drivers/dose: fixed misspelled OCTET 2020-02-16 17:58:57 +01:00
benpicco
88f9d5870d
Merge pull request #13029 from jue89/feature/dose-optional-set-addr
drivers/dose: add setter for MAC address
2020-01-23 12:57:05 +01:00
Hyungsin
6eed5b9d43 remove XTIMER_OVERHEAD 2020-01-10 13:22:11 -08:00
Jue
2482eec07c drivers/dose: add setter for MAC address 2020-01-05 23:01:24 +01:00
Jue
bc46c7478f drivers: add Differentially Operated Serial Ethernet driver 2019-12-16 10:43:13 +01:00