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

109 Commits

Author SHA1 Message Date
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Frederik Haxel
ec7fe8d598 drivers: Use size_t print format specifier
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-12-21 12:02:28 +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
9225c4b80e
drivers/cc2420: model Kconfig 2022-07-28 09:32:24 +02:00
MrKevinWeiss
34d7c0def6
drivers/cc2420: Fix missing .h file in params 2022-07-11 09:24:58 +02:00
Benjamin Valentin
9ea5e58774 drivers: drop NETOPT_RX_END_IRQ 2022-05-11 23:44:24 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Jose Alamos
9aa832f077
cc2420: avoid explicit cast to netdev 2021-07-09 10:38:33 +02:00
Benjamin Valentin
d611a264fd drivers/cc2420: register with netdev 2021-04-27 17:37:52 +02:00
Marian Buschsieweke
3a378c24a2
drivers/cc2420: make TX/RX IRQs read only
This brings the implementation in sync with the API.
2021-03-22 08:15:54 +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
d8794d7c5a drivers/cc2420: fix bogus cc2420_set_state(dev, CC2420_GOTO_RX)
It doesn't compile, compiler complains that the enum type of
CC2420_GOTO_RX cannot be converted to netopt_state_t as required by the
function.
The numerical value of CC2420_GOTO_RX would be NETOPT_STATE_IDLE (2), which
makes sense as it puts the device into RX mode.
2020-08-04 13:56:49 +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
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
kYc0o
c6b424f4ff drivers/cc2420: don't append to FIFO if iol->iol_len == 0
This prevents SPI transfers with len == 0, which triggers
an assert failure.
2019-04-02 16:00:03 +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
Kees Bakker
d79350f2ab drivers/cc2420: do normal assignment instead of memcpy 2019-01-10 19:43:43 +01:00
Marian Buschsieweke
aac69c3a56
drivers/cc2420: Fixed behavior on too small buffer
As decided in https://github.com/RIOT-OS/RIOT/issues/10413 when
netdev_driver_t::recv() is called with a too small buffer the incoming frame
should be dropped and `-ENOBUFS` returned. This commit makes cc2420 compliant.
2019-01-08 23:45:06 +01:00
Marian Buschsieweke
078444902f
drivers/cc2420: Implemented missing drop feature
The netdev_driver_t::recv implementation of the cc2420 does not provide the drop
feature. This commit adds it.
2019-01-08 23:42:03 +01:00
Jose Alamos
87e9172643 drivers/cc2420: add datasheet documentation to duplicated strobe call 2019-01-08 13:46:32 +01:00
Jose Alamos
b965b47d9b drivers/cc2420: move flush sequence to inline function 2019-01-08 13:46:32 +01:00
bd4592a06b
cc2420: 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:03 +01:00
d2ddc4ef2e
cc2420: Remove PAN ID initialization from reset 2018-11-28 11:31:02 +01:00
Semjon Kerner
5b0152f4f7 drivers/netdev_ieee802154: drop NETOPT_MAX_PKT_SIZE 2018-10-16 13:28:03 +02:00
1dd4a46c90
Merge pull request #9584 from PeterKietzmann/pr_cc2420_max_pkt_size
drivers/cc2420: add netopt NETOPT_MAX_PACKET_SIZE
2018-07-17 14:12:10 +02:00
PeterKietzmann
838b18e8f9 drivers/cc2420: add netopt NETOPT_MAX_PACKET_SIZE 2018-07-17 12:00:12 +02:00
965cece510
cc2420: Remove default event report settings 2018-07-16 14:43:12 +02:00
327295a1e1
cc2420: use netdev reset function 2018-07-11 09:39:17 +02:00
0f07bccfc9
Merge pull request #8701 from aabadie/pr/drivers/params/cc2420
drivers/cc2420: apply unified driver params scheme
2018-03-21 07:27:50 +01:00
23b414b732 drivers: net: adapt to iolist-using netdev 2018-03-06 14:00:31 +01:00
eb81eae060 drivers/cc2420: use new driver params scheme 2018-03-01 14:30:35 +01:00
Martine Lenders
39c122155c
Merge pull request #7995 from smlng/make/fix/unused_params
make: fix unused-params error
2017-11-28 14:46:23 +01:00
smlng
7309171303 build: fix unused parameter errors
cpu, sam0_common: fix unused parameter in periph/spi
        cpu, kinetis_common: fix unused parameter in periph/spi
        cpu, cc2538: fix unused param in periph/i2c
        cpu, cc2538: fix unused param in periph/spi
        cpu, sam3: fix unused param in periph/spi
        cpu, stm32_common: fix unused param in periph/pm
        cpu, stm32f3: fix unused params in periph/i2c
        cpu, nrf5x_common: fix unused param in periph/gpio
        cpu, nrf5x_common: fix unused param in periph/spi
        cpu, lpc2387: fix unused params in periph/spi
        cpu, cc2538: fix unused params in radio/netdev
        cpu, cc2650: fix unused params in periph/uart
        cpu, lm4f120: fix unused param in periph/spi
        cpu, lm4f120: fix unused params in periph/timer
        cpu, lm4f120: fix unused params in periph/uart
        cpu, stm32_common: fix unused params in periph/dac
        cpu, stm32l0: fix unused params in periph/i2c
        cpu, msp430fxyz: fix unused params in periph/uart
        cpu, mips: fix unused params
        cpu, cc430: fix unused-params in periph/timer
        cpu, msp430fxyz: fix unused params in periph/spi
        drivers, cc2420: fix unused param
        cpu, mips32r2_common: fix unused params in periph/timer
        cpu, cc2538: fix unused-param in periph/i2c
        cpu, mips32r2_common: fix unused-param in periph/timer
        cpu, msp430fxyz: fix unused params in periph/timer
        cpu, atmega_common: fix unused params in periph/spi
        driver, nrfmin: fix unused params
        cpu, cc2538_rf: fix unused params
        driver, netdev_ieee802514: fix unused param
        cpu, mip_pic32m: fix unused params
        cpu, lpc2387: fix unused params in periph/pwm
        tests/driver_sdcard_spi: fix unused params
        cpu, sam3: fix unused param in periph/pwm
        tests/driver_dynamixel: fix unused params, and style issues
        cpu, cc430: fix unused param in periph/rtc
        cpu, atmega_common: fix unused params in periph/i2c
2017-11-28 14:36:01 +01:00
smlng
e381317fbf make: fix sign-compare errors
cpu, nrf5x_common: fix sign-compare in periph/flashpage
    drivers, periph_common: fix sign-compare in flashpage
    cpu, sam0_common: fix sign-compare error in periph/gpio
    cpu, cc2538: fix sign-compare in periph/timer
    cpu, sam3: fix sign-compare in periph/gpio
    cpu, stm32_common: fix sign-compare in periph/pwm
    cpu, stm32_common: fix sign-compare in periph/timer
    cpu, stm32_common: fix sign-compare in periph/flashpage
    cpu, nrf5x_common: fix sign-compare in radio/nrfmin
    cpu, samd21: fix sign-compare in periph/pwm
    cpu, ezr32wg: fix sign-compare in periph/gpio
    cpu, ezr32wg: fix sign-compare in periph/timer
    drivers, ethos: fix sign-compare
    sys, net: fix sign-compare
    cpu, atmega_common: fix sign-compare error
    cpu, msp430fxyz: fix sign-compare in periph/gpio
    boards, msb-430-common: fix sign-compare in board_init
    driver, cc2420: fix sign-compared
    sys/net: fix sign-compare in gnrc_tftp
    driver, pcd8544: fix sign-compare
    driver, pn532: fix sign-compare
    driver, sdcard_spi: fix sign-compare
    tests: fix sign_compare
    sys/net, lwmac: fix sign_compare
    pkg, lwip: fix sign-compare
    boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
    tests, sock_ip: fix sign compare
    tests, msg_avail: fix sign compare
    tests, sock_udp: fix sign compare
    boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
047b8172ae cc2420: Add RSSI dBm conversion 2017-11-27 21:49:15 +01:00
94c753c07a drivers: doxygen cleanup 2017-09-01 15:12:20 +02:00
Joakim Nohlgård
065bc62e0a netdev: Make set() value parameter const void * 2017-08-25 13:41:19 +02:00
Martine Lenders
29842bb5e4 netdev2: rename to netdev and remove gnrc_netdev
With some minor hand-edits I used the following chain of commands:

```sh
git rm sys/include/net/gnrc/netdev.h
git grep --name-only -i netdev2 | \
        xargs sed -i -e 's/^\(NETDEV\)2\(.*\)\( [("]\)/\1\2 \3/g' \
                     -e 's/\(netdev\)2\(.*\)\( \/\*\*<\)/\1\2 \3/I' \
                     -e 's/\(netdev\)2/\1/gI'
git add -p
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | xargs -I'{}' dirname '{}' | uniq | \
        grep "netdev2" | while read dir; do
                new_dir="$(echo "$dir" | sed "s/netdev2/netdev/g")"
                git mv -f "$dir" "$new_dir"
        done
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | while read file; do
                new_file="$(echo "$file" | sed "s/netdev2/netdev/g")"
                git mv -f "$file" "$new_file"
        done
git commit --amend
git grep --name-only "\<drivers_netdev_netdev\>" | \
        xargs sed -i "s/\<drivers_netdev_netdev\>/drivers_netdev_api/g"
git add -p
git commit --amend
```
2017-03-15 09:31:20 +01:00
Hauke Petersen
79a113d1ba sys/drivers: renamed uuid module to luid 2017-02-27 11:01:20 +01:00
Hauke Petersen
5639b1d52f drivers/cc2420: adapted to SPI API changes 2017-01-25 16:46:45 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Hauke Petersen
88636b6919 drivers/cc2420: use uuid module for addr gen 2017-01-19 11:09:29 +01:00
PeterKietzmann
6d4011a325 drivers/cc2420:improve send performance 2016-11-29 09:03:23 +01:00
Thomas Eichinger
103c426cdc drivers/cc2420: calculate CRC and check CRC_OK bit on packet reception
First start calculating the CRC in hardware when receiving a frame.

Then, other than the at86rf2xx transceivers the cc2420 don't consider the
CRC_OK flag when reporting a successful packet reception. This change
introduces a check for this bit and drops the packet else by flushing
the RX FIFO.
2016-11-08 23:28:09 -08:00
Thomas Eichinger
b57ce103a3 drivers/cc2420: adapt FIFO access to recent msp430 SPI changes
When redoing the SPI driver for the msp430 platforms an assert
statement was introduced to prohibit SPI access without any
buffers. Since in the existing code the FIFO pointer is incremented
through a dummy read this results in triggering aforementioned
assert.
2016-11-07 11:09:45 -08:00
Martine Lenders
bd2429f299 cpu: drivers: adapt devices for netdev2 parameter type change 2016-08-03 12:30:51 +02:00