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

174 Commits

Author SHA1 Message Date
Marian Buschsieweke
c3500eb6e0
tree wide: fix typos in comments found by codespell
This will not change generated binaries, only the Doxygen output and
source code will have less typos.
2023-05-02 09:52:06 +02:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +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
a7c979705a
drivers/cc110x: declare pseudomodules at driver level 2021-10-05 11:48:50 +02:00
Benjamin Valentin
67f737b5e0 drivers/cc110x: use pseudo-modules for band selection 2021-09-17 12:58:10 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
732cbd969c
drivers: update to new periph_spi API 2021-09-01 21:38:40 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
benpicco
8f9233f329
Merge pull request #16232 from maribu/drivers/cc110x
drivers/cc110x: add power off (sleep) functions
2021-07-06 12:24:26 +02:00
Marian Buschsieweke
462ea9aec0
drivers/cc110x: hook up cc110x_sleep into netdev 2021-07-06 10:12:26 +02:00
Marian Buschsieweke
3d76875f38
drivers/cc110x: style fixes 2021-07-06 10:12:21 +02:00
Francisco Acosta
0efc13602f
drivers/cc110x: add power off (sleep) functions 2021-07-06 10:11:55 +02:00
Fabian Hüßler
d8affca746 drivers/cc110x: add weak function cc1xxx_eui_get() 2021-04-08 10:38:16 +02:00
Fabian Hüßler
39adf908ce cc110x: make use of netdev_register()
Call netdev_register() in cc110x_setup()
and pass the index in auto_init_cc110x()
2020-12-01 12:11:20 +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
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
aa0e5e7afa drivers/cc110x: replace binary constants and use unsigned char
binary constants are a GCC extension
2020-07-31 13:38:03 +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
Martine S. Lenders
4c01c716fc
cc110x: remove NETOPT_IPV6_IID support
This option is handled in the `gnrc_netif`-layer without any access to
the driver's option since 7ae90564d9.
2020-06-25 13:40:30 +02:00
Akshai M
be097f8533 drivers/cc110x : Expose to Kconfig
Expose Configurations to Kconfig
2020-04-17 23:55:07 +05:30
Akshai M
01a8c64e39 drivers/cc110x : Add CONFIG_
Add Add CONFIG_ Prefix for CC110X_DEFAULT_CHANNEL
2020-04-17 23:27:01 +05:30
Marian Buschsieweke
02a425f114
drivers/cc110x: Handle lost IRQs more gracefully
When an IRQ is lost during cc110x_send(), the driver will remain locked until
another IRQ is triggered. This commit changes the behavior to wait for at most
an reasonable upper bound, which is chosen to not only allow the driver to
recover but also (at least in theory) complete the transmission correctly.
2020-03-08 12:49:57 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
Marian Buschsieweke
b98b51d082
drivers/cc110x: Add promiscuous mode support 2020-01-23 18:27:04 +01:00
Marian Buschsieweke
f7eb9233da
drivers/cc110x: Replaced some magic numbers 2020-01-23 18:27:03 +01:00
Marian Buschsieweke
cf9c84a00d
drivers/cc110x: Use NETOPT_MAX_PDU_SIZE
Replaced deprecated NETOPT_MAX_PACKET_SIZE by NETOPT_MAX_PDU_SIZE
2019-10-18 17:57:36 +02:00
Marian Buschsieweke
bb739907a2
drivers/cc110x: Allow setting the default channel
This (re-)introduces the `CC110X_DEFAULT_CHANNEL` preprocessor macro to set the
default channel of the `cc110x` at compile time. The same macro has been used
in the previous version of the driver, so some users might still expect it to
work.
2019-09-10 10:04:51 +02:00
Marian Buschsieweke
84acc746dc
drivers/cc110x: Added missing Doxygen comments
The current stable Doxygen release should no longer complain now
2019-09-06 09:10:38 +02:00
Marian Buschsieweke
b389a9c5fa
drivers/cc110x: Fixed broken Doxygen grouping
The header files of the CC110x contained two Doxygen "end of doc group" (@})
commands. This PR makes sure they are balanced again.
2019-09-06 08:53:40 +02:00
Marian Buschsieweke
3da3280930
driver/cc110x: Fixed indent/alignment in doc
The Doxygen documentation blocks have not been correctly aligned. This commit
fixes this.
2019-09-04 13:15:15 +02:00
Marian Buschsieweke
972367432a
drivers/cc110x: Rewrite of the cc110x driver
The cc110x driver has been re-written from scratch to overcome the limitations
of the old driver. The main motivation of the rewrite was to achieve better
maintainability by a detailed documentation, reduce the complexity and the
overhead of the SPI communication with the device, and to allow to
simultaneously use transceivers with different configuration regarding the used
base band, the channel bandwidth, the modulation rate, and the channel map.

Features of this driver include:

- Support for the CC1100, CC1101, and the CC1100e sub-gigahertz transceivers.
- Detailed documentation of every aspect of this driver.
- An easy to use configuration API that allows setting the transceiver
  configuration (modulation rate, channel bandwidth, base frequency) and the
  channel map.
- Fast channel hopping by pre-calibration of the channels during device
  configuration (so that no calibration is needed during hopping).
- Simplified SPI communication: Only during start-up the MCU has to wait
  for the transceiver to be ready (for the power regulators and the crystal
  to stabilize). The old driver did this for every SPI transfer, which
  resulted in complex communication code. This driver will wait on start up
  for the transceiver to power up and then use RIOT's SPI API like every other
  driver. (Not only the data sheet states that this is fine, it also proved to
  be reliable in practise.)
- Greatly reduced latency: The RTT on the old driver (@150 kbps data rate) was
  about 16ms, the new driver (@250 kbps data rate) has as RTT of ~3ms
  (depending on SPI clock and on CPU performance) (measured with ping6).
- Increased reliability: The preamble size and the sync word size have been
  doubled compared to the old driver (preamble: 8 bytes instead of 4,
  sync word: 4 byte instead of 2). The new values are the once recommended by
  the data sheet for reliable communication.
- Basic diagnostic during driver initialization to detect common issues as
  SPI communication issues and GDO pin configuration/wiring issues.
- TX power configuration with netdev_driver_t::set() API-integration
- Calls to netdev_driver_t::send() block until the transmission has completed
  to ease the use of the API (implemented without busy waiting, so that the
  MCU can enter lower power states or other threads can be executed).
2019-08-20 16:32:11 +02:00
Marian Buschsieweke
615e25f319
drivers: Removed driver for CC110x transceivers
- Removed cc110x driver
- Updated all makefiles
- Kept both board specific configurations and support for it in RIOT's
  upper layers, so re-implementations don't need to start from zero
2019-08-19 12:56:47 +02:00
Martine S. Lenders
d129382484 gnrc_cc110x: use gnrc_netif_hdr_set_netif() 2019-07-26 15:34:08 +02:00
Marian Buschsieweke
556a1e31ff
drivers/cc110x: Use NETOPT_MAX_DPU_SIZE
Updated cc110x to use NETOPT_MAX_DPU_SIZE instead of the deprecated
NETOPT_MAX_PACKET_SIZE
2019-02-18 20:18:54 +01:00
Marian Buschsieweke
fc1b7f1e35
drivers/cc110x: Fixed get NETOPT_MAX_PACKET_SIZE
netdev_driver_t::get(NETOPT_MAX_PACKET_SIZE) used to return the maximum frame
size instead of the maximum layer 2 PDU size.
2019-02-01 12:24:34 +01:00
Marian Buschsieweke
4183e16820
drivers/cc110x: Replaced magic number
Introduced CC110X_L2_HDR_SIZE to get rid of magic numbers.
2019-02-01 12:23:22 +01:00
Vincent Dupont
ffc6e4b65c drivers/cc110x: remove irq_disable/irq_restore around spi transfers 2018-12-28 09:35:14 +01:00
Marian Buschsieweke
ee33bd167a
drivers/cc110x: Made address format in debug output consistent 2018-05-29 15:57:30 +02:00
Marian Buschsieweke
2f3d811e99
drivers: Improved debug output in cc110x 2018-05-28 20:27:15 +02:00
Marian Buschsieweke
30c79a66d0
drivers: Replaced magic numbers in cc110x
Replaced magic undocumented numbers in the code by human readable preprocessor
macros.
2018-05-24 19:28:46 +02:00
Marian Buschsieweke
cbff3e6d3a
drivers: Implemented missing function in cc110x
Function cc110x_state_to_text is defined and (with ENABLE_DEBUG) referenced,
but implemented. This commit adds the missing implementation.
2018-05-24 19:17:59 +02:00
Marian Buschsieweke
a6f9a86597
drivers/cc110x: Moved cc110x_params.h from boards to driver
- Replaced magic numbers in the CC110X configuration of the MSBA2
   with SPI_DEV(x) and GPIO_PIN(x, y) macros
 - Adjusted implementation of `cc110x_params.h` to match the code of `at86rf2xx`
 - Made MSBA2's CC110X parameters the default configuration
2018-05-21 22:59:46 +02:00
Martine Lenders
247b1a0d8f cc110x: fix netdev get/set according to netopt_t doc 2018-04-13 00:29:26 +02:00
23b414b732 drivers: net: adapt to iolist-using netdev 2018-03-06 14:00:31 +01:00
smlng
b283b7784c make: fix various compile errors with Wextra
pkg, nordic_softdevice_ble: disable CFLAGS to omit compiler error
        sys, pm_layered: fix casting nonscalar to the same type
        cpu, stm32_common: fix type-limits, remove always true assert
        cpu, stm32f4: fix pointer arithmetic in periph/i2c
        drivers, at86rf2xx: fix type-limits where condition always true
        saul, gpio: fix if no gpio configured for saul
        cpu, saml21: add frequency check to periph/timer
        driver, cc110x: fix unused param and type-limts errors
        boards, wsn430-common: fix old-style-declaration
        make: fix old style definition
        drivers, sdcard_spi: fix old style typedef
        driver, at30tse: remove unnecessary check
        driver, nrf24: fix type-limit
        driver, pn532: change buffer from char to uint8_t
        tests/driver_sdcard: fix type limits
        boards, feather-m0: add missing field inits
        driver, tcs37727: fix type limits
        pkg, emb6: disable some compiler warnings
        tests/emb6: disable some compiler warings
        pkg, openthread: fix sign compare and unused params
        tests/trickle: fix struct init
        tests/pthread_cooperation: fix type limits
        board, mips-malta: remove feature periph_uart
        shell: fix var size for netif command
        gnrc, netif: fix sign-compare
        gnrc, nib: fix sign-compare
        shell: fix output in netif command
        posix: fix type-limits in pthread_cond
2017-11-28 18:31:43 +01:00
13e0239722 drivers/cc110x: cleanup + remove gnrc_netdev leftover 2017-11-28 11:25:33 +01:00
Martine Lenders
a63bb6d47b
Merge pull request #6895 from bergzand/drivers/radio-rssi-conv
drivers/radios Apply register to rssi dBm conversion to all radios
2017-11-27 23:52:15 +01:00