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

73 Commits

Author SHA1 Message Date
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Marian Buschsieweke
c10b8838f1
drivers/mrf24j40: cleanup function
`_set_csma_params()` spends some time to prepare a value in
`uint8_t tmp`, which then is never used. Likely this is a leftover
of moving code to `mrf24j40_set_csma_max_retries()`. This drops the
leftover code.
2023-05-20 16:59:25 +02:00
Jose Alamos
91a299cb7d
drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL 2023-01-19 15:31:06 +01:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
Marian Buschsieweke
276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
Leandro Lanzieri
a2681a0f88
drivers/mrf24j40: model Kconfig 2022-07-28 09:32:25 +02:00
MrKevinWeiss
e3ec242ecf
drivers/mrf24j40: Fix missing .h file in params 2022-07-11 09:24:59 +02:00
Benjamin Valentin
9ea5e58774 drivers: drop NETOPT_RX_END_IRQ 2022-05-11 23:44:24 +02:00
Leandro Lanzieri
7ca22f7791
drivers/mrf24j40: move CFLAG to Makefile.include 2022-03-11 09:26:43 +01:00
003c472339
drivers/mrf24j40: declare pseudomodules at driver level 2021-10-05 11:48:51 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Jose Alamos
b1c86a9ae3
mrf24j40: avoid explicit cast to netdev 2021-07-09 10:08:45 +02:00
Marian Buschsieweke
a18ec987bf
drivers/mrf24j40: make TX/RX IRQs read only
This brings the implementation in sync with the API.
2021-03-22 08:15:54 +01:00
Benjamin Valentin
a2396111ee drivers: remove unused luid dependencies
Those drivers don't rely on luid anymore, we can drop the dependency.
2021-02-25 22:10:14 +01:00
Benjamin Valentin
7a7ebb1d5b drivers/mrf24j40: use byteorder_htols()
same as 374d032b82
2020-12-08 13:40:57 +01:00
Leandro Lanzieri
90d664e7fd
drivers/mrf24j40: remove unneeded GNRC header inclusion 2020-11-13 09:28:52 +01:00
Leandro Lanzieri
0e52e2747e
drivers: remove netif as dependency for network device drivers 2020-11-13 09:25:59 +01:00
Bas Stottelaar
92b1dfc703 drivers/*: realign ENABLE_DEBUG 2020-10-23 01:26:09 +02:00
Benjamin Valentin
a1d8c79a98 drivers/mrf24j40: pass long address via pointer 2020-10-07 16:39:39 +02:00
Benjamin Valentin
988ee1648f drivers/mrf24j40: register with netdev 2020-10-07 16:39:39 +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
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
Benjamin Valentin
baeb5134b7 drivers/mrf24j40: add Turbo Mode
MRF24J40 supports a proprietary turbo mode with a data rate of 625 kbit/s
instead of the standard 250 kbit/s.

It can be enabled through

    ifconfig 7 set high_rate 1
2020-05-09 16:10:46 +02:00
Leandro Lanzieri
a06d9bbb66
Merge pull request #13315 from jia200x/pr/kconfig/ieee802154
ieee802154: Expose configurations to Kconfig
2020-04-08 19:34:55 +02:00
Jose Alamos
77325b4cde ieee802154: add CONFIG_ prefix to config macros 2020-04-08 19:08:25 +02:00
Leandro Lanzieri
f89514e466
drivers/mrf24j40: Expose configurations to Kconfig 2020-04-08 18:49:31 +02:00
Leandro Lanzieri
ede9117a1e
drivers/mrf24j40: Turn MRF24J40_USE_EXT_PA_LNA into bool config
MRF24J40_USE_EXT_PA_LNA is moved to the 'CONFIG_' namespace and by
default is not set. Now it is checked in code using 'IS_ACTIVE'.
2020-04-08 18:49:30 +02:00
Leandro Lanzieri
655ce69903
drivers/mrf24j40: Turn MRF24J40_TEST_SPI_CONNECTION into bool config
MRF24J40_TEST_SPI_CONNECTION is moved to the 'CONFIG_' namespace and by
default is not set. Now it is checked in code using 'IS_ACTIVE'.
2020-04-08 18:49:27 +02:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
2e94fc9253 drivers/mrf24j40: fix typos 2019-11-23 22:39:39 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Leandro Lanzieri
bfd81c1d72
Merge pull request #12431 from benpicco/mrf24j40-fix_reset
drivers/mrf24j40: don't loop in mrf24j40_reset_state_machine()
2019-10-14 17:21:17 +02:00
Benjamin Valentin
38b35c513c drivers/mrf24j40: allow for basic self-test on init
During production it is often desirable for devices to perform
some kind of basic self-test to isolate defects.

For this it is necessary for the initialization not to hang if a
component is faulty / not connected.

This moves an already exising self-test that was previously enabled
as a debug option to an independent compile-time configurable.

It is necessary to call this in _init() before mrf24j40_hardware_reset()
as the reset function uses xtimer_usleep() which will cause another
thread to get scheduled.
If this thread (e.g. rpl or ipv6) then tries to access the netdev, RIOT
will crash.
2019-10-14 14:50:06 +02:00
Benjamin Valentin
853bbaf5a5 drivers/mrf24j40: don't loop in mrf24j40_reset_state_machine()
When hooking up the mrf24j40 to a bluepill board, the driver would
always get stuck on init.

Debugging revealed that it would get stuck in the mrf24j40_reset_state_machine()
function because it expects the RFSTATE to have a special value after reset.

However, the data sheet does not mention this in section 3.1 Reset.
Waiting 192µs should be enough - the value of the RFSTATE is not specified.

The Linux driver also does not wait for the RFSTATE register.

And even without the loop, the driver is functioning fine.
2019-10-11 23:01:54 +02:00
Carton
886a29311e drivers/mrf24j40 : support of NETOPT_LAST_ED_LEVEL 2019-05-23 15:45:03 +02:00
Benjamin Valentin
477938e46e drivers/mrf24j40: add external PA/LNA control on MC/MD/ME devices
The MRF24J40MC/MD/ME modules contain an external power amplifier &
low noise amplifier that has to be enabled manually by setting three bits
in the TESTMODE register.
On MRF24J40MC the power amplifier is powered by a separate voltage regualtor
that has to be enabled by setting GPIO3 to HIGH.

During Sleep and CCA the PA should be disabled.

Co-authored-by: Carton <joel.carron@eeproperty.ch>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2019-05-23 11:07:04 +02:00
1804730c0e
mrf24j40: don't load data if iol->iol_len == 0 2019-04-01 11:46:42 +02:00
smlng
6183d5f5c5 netdev: remove layer2 netstats from netdev drivers
Removing usage of netdev->stats in all net drivers, as it is
handled by gnrc_netif.
2019-02-01 11:25:27 +02:00
Sebastian Meiling
2fde8335c9
Merge pull request #10728 from keestux/memcpy-struct-copy
Do normal assignment instead of memcpy
2019-01-16 09:18:44 +01:00
a6e7882879
mrf24j40: use byteorder for address operations 2019-01-13 12:03:03 +01:00
38e5bd627b
mrf24j40: Don't propagate address to 802154 layer 2019-01-12 20:23:36 +01:00
e6ace9c05d
mrf24j40: Add NETOPT_ADDRESS{,_LONG} to getters 2019-01-12 20:23:36 +01:00
f7bf03073c
mrf24j40: read address from device
This change modifies the mrf24j40 driver to read the address directly
from the device instead of returning the netdev_ieee802154_t member
2019-01-12 20:23:27 +01:00
Kees Bakker
45a3d00552 drivers/mrf24j40: do normal assignment instead of memcpy 2019-01-10 19:43:44 +01:00
2abf86afb4
mrf24j40: Remove netdev access from set_pan
This write access is only required when a modification to the PAN ID
happened directly via this function and not via a netdev::set operation.
The only direct call was done in the reset function of the driver
2018-11-28 11:31:04 +01:00
03653ecd39
mrf24j40: Remove PAN ID initialization from reset 2018-11-28 11:31:03 +01:00
Semjon Kerner
5b0152f4f7 drivers/netdev_ieee802154: drop NETOPT_MAX_PKT_SIZE 2018-10-16 13:28:03 +02:00
71fac036e5
mrf24j40: Remove default event report settings 2018-07-16 14:43:45 +02:00