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

2350 Commits

Author SHA1 Message Date
a25313e5b7 drivers/ph_oem: fix typos 2019-11-23 22:39:39 +01:00
04516d78c5 drivers/pcd8544: fix typos 2019-11-23 22:39:39 +01:00
a90a192648 drivers/pca9685: fix typos 2019-11-23 22:39:39 +01:00
541596c893 drivers/nrf24l01p: fix typos 2019-11-23 22:39:39 +01:00
2e94fc9253 drivers/mrf24j40: fix typos 2019-11-23 22:39:39 +01:00
17e0405a07 drivers/lsm6dsl: fix typos 2019-11-23 22:39:39 +01:00
12223c4e6e drivers/lpsxxx: fix typos 2019-11-23 22:39:39 +01:00
f81e5c552a drivers/enc28j60: fix typos 2019-11-23 22:39:39 +01:00
6f6ca90270 drivers/ccs811: fix typos 2019-11-23 22:39:39 +01:00
da4d5be21f drivers/bmx055: fix typos 2019-11-23 22:39:39 +01:00
5c4bf445bb drivers/apa102: fix typos 2019-11-23 22:39:39 +01:00
ec47a7542a drivers/ads101x: 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
Marian Buschsieweke
f0317c50f2
drivers/at86rf2xx: Updated address API
Changed the address getter and setter functions to avoid byte order
confusion.
2019-11-23 19:40:09 +01:00
Marian Buschsieweke
4347f720f5
drivers/at86rf2xx: Update to new ATmega API
Replace __enter_isr() with atmega_enter_isr() and __exit_isr() with
atmega_exit_isr()
2019-11-23 12:27:13 +01:00
Marian Buschsieweke
16ee7aed32
Merge pull request #11350 from maribu/ina2xx
drivers/ina220: Changed to comply with RIOT's driver design goals & SAUL adaption
2019-11-22 23:36:50 +01:00
benpicco
09f647eee2
Merge pull request #12693 from maribu/neopixel-atmega
drivers: Added WS281x RGB LED driver for ATmega platform
2019-11-22 22:36:36 +01:00
Marian Buschsieweke
f08df428fa
drivers/bmx280: Fix incorrect endian conversion
The binary shift operators in C are defined via the change of their values, not
the change of the memory representation of them. When reading a value from
little endian out of buffer `buf`, `((uint16_t)buf[1] << 8) | buf[0]` will
thus work regardless of the byte order of the host system.
2019-11-22 20:58:31 +01:00
Marian Buschsieweke
0a0c1697d7
drivers/ina2xx: Added SAUL integration 2019-11-22 20:29:53 +01:00
Marian Buschsieweke
3ebbec84c7
drivers/saul: Fixed documentation
There is no need to distinguish between sensors for electrical power or other
types of power.
2019-11-22 20:29:53 +01:00
Marian Buschsieweke
a6476bd813
drivers/ina2xx: Match RIOT's driver design goals
- Use standard RIOT style `ina2xx_params_t` on initialization as explained in
  [1] instead of a custom API
- Provided a default configuration via `ina2xx_params_t` as required by [1] that
  works fine for the INA219 breakout board and with an optimal resolution that
  still covers the whole range of USB high-power devices (500 mA @ 5V) with a
  comfortable safe margin.
- Changed initialization procedure to include a device reset and connectivity
  test, as required by [1]
- The calibration value is now calculated by the driver
    - This simplifies using the driver a lot
    - The user can still choose a trade-off between range and resolution that
      matches the application requirements, but now among predefined values
    - This allows the driver to easily convert the raw data into meaningful
      physical data, as the resolution of the raw data is known
- All measurements are provided as meaningful physical data as required by [1]

[1]: https://github.com/RIOT-OS/RIOT/wiki/Guide:-Writing-a-device-driver-in-RIOT
2019-11-22 20:28:57 +01:00
Marian Buschsieweke
f424421f79
drivers: Renamed ina220 --> ina2xx
The INA219 has the exact same interface as the INA220 (including values and
semantics of the configuration register). Thus, this driver can be used for
both. The ina220 has been renamed to ina2xx to reflect this and pseudo modules
for the ina220 and ina219 have been added.
2019-11-22 19:53:51 +01:00
Hauke Petersen
9f5f6f4215 drivers/bmx280: improved documentation 2019-11-22 14:04:38 +01:00
Hauke Petersen
b7f33bd84f drivers/bmx280: significant driver rework
bugs fixed:
- move global variables into device descriptor
- guard bus access (use acquire and release)

added functionality:
- enable SPI mode

structural improvements:
- reduce stack usage
- simplify the driver's structure
- centralize bus access code
- use assertions
- cleanup includes
- use shortcuts for bus access

style changes:
- fix line length
- cleanup and improve doxygen
- unify pointer notation (char *var over char* var)
- unify (error) return messages
- use `#ifdef MODULE_BME280` instead of `#if defined(BME..)`
- unify debug messages -> using `[bmx28] x: msg` scheme
2019-11-22 14:04:37 +01:00
Michel Gerlach
2a14b6ceb8 Drivers/DCF77:First implementation 2019-11-22 10:27:01 +01:00
Gunar Schorcht
a05027cdba
Merge pull request #12523 from aabadie/pr/sys/arduino_pwm
sys/arduino: add implementation for analogWrite
2019-11-21 15:08:10 +01:00
benpicco
8836f225e6
Merge pull request #12586 from aabadie/pr/drivers/tmp00x_scan_build
drivers/tmp00x: cleanup return codes and fix potential use of uninitialized parameter
2019-11-20 20:10:17 +01:00
Marian Buschsieweke
1ed1906023
drivers/ws281x: Added driver for RGB LEDs
Added driver for the WS2812/SK6812 RGB LEDs often sold as NeoPixels, which due
to their integrated RGB controller can be chained to arbitrary length and
controlled with a single GPIO.
2019-11-18 22:45:24 +01:00
5eb5c3c42c
at86rf2xx: split out isr transmit complete handling 2019-11-16 22:26:58 +01:00
79943cb0de
drivers/pca9685: blacklist efm32 arch
The CPU doesn't support PWM_RIGHT
2019-11-16 14:08:49 +01:00
abfa73193f
drivers/periph_pwm: define mapping struct for arduino pins 2019-11-15 17:51:45 +01:00
Benjamin Valentin
528cb27395 drivers/at86rf2xx: enable Smart Reduced Power Consumption for AT86RFR2
"Smart Reduced Power Consumption Techniques" [0] are supported by AT86RF233,
ATmega2564/1284/644RFR2 and ATmega256/128/64RFR2 devices.

Functionality is the same as on AT86RF233, so we can just enable it.

[0] http://ww1.microchip.com/downloads/en/Appnotes/Atmel-42356-Smart-Reduced-Power-Consumption-Techniques_ApplicationNote_AT02594.pdf
2019-11-13 23:35:40 +01:00
Hauke Petersen
ca7578073a drivers: add support for QMC5883L mag sensors 2019-11-13 12:56:26 +01:00
Marian Buschsieweke
107b50ca04
drivers/net/netdev: Use consistent code formatting 2019-11-11 13:03:50 +01:00
c062d74b84
drivers/tmp00x: cleanup return codes
This also fixes a scan-build warning about a potential use of uninitialized parameter to the call of tmp0xx_read function
2019-11-08 22:17:44 +01:00
Benjamin Valentin
d213bbc6f5 Revert "drivers/hd44780: add short delay after each character"
This reverts commit cf01c743a8.

Adding an unexplained delay seemed wrong in the first place, but it fixed
the display on the MCB2388.

Turns out the display was erroneously operating in 8-bit mode due to the
uninitialized flag register.
Why the delay helped here I don't know.

But with #12634 fixing this, this hack is not needed anymore.
2019-11-07 22:40:01 +01:00
Martine Lenders
14a2f6bc18 gnrc: use gnrc_netif_default_init() for all implementations 2019-11-07 11:00:36 +01:00
62d299459f
drivers/hd44780: optimize detection of 4 and 8 bit modes
The driver can only be used with either 4 or 8 bit modes. Checking if the 5th pin is set in the configuration is enough the determine if 8bit mode should be used or not
2019-11-06 16:27:39 +01:00
6c56972dba
drivers/include/hd44780: avoid use of magic numbers 2019-11-06 16:25:27 +01:00
c7fac09d42
drivers/hd44780: fix potential hardfault on initialization
Co-authored-by Benjamin Valentin <benpicco@googlemail.com>
2019-11-06 16:14:39 +01:00
Marian Buschsieweke
4d279ae76e
Merge pull request #12055 from fabian18/driver-ina3221
Driver for INA3221 current and power and bus voltage monitor
2019-11-05 14:45:03 +01:00
Benjamin Valentin
513a3a7d59 periph_common/rtc: add rtc_tm_compare()
Add an easy way to compare two points in time.
2019-11-05 12:52:45 +01:00
fabian18
7e8cce875a drivers/ina3221: Added SAUL integration 2019-11-05 12:37:41 +01:00
fabian18
195379a9b8 drivers/ina3221: INA3221 driver implementation 2019-11-05 12:29:42 +01:00
Marian Buschsieweke
bf54c56420
Merge pull request #12501 from maribu/NETOPT_MAX_PACKET_SIZE
drivers: Replaced NETOPT_MAX_PACKET_SIZE by NETOPT_MAX_PDU_SIZE
2019-10-30 10:51:32 +01:00
Benjamin Valentin
cf01c743a8
drivers/hd44780: add short delay after each character
On the LCD display connected to the MCB2300 board, the
display would not light up.
Adding a 1µs delay after each byte of data seems to fix it.
2019-10-29 11:09:56 +01:00
bfe1a84991
drivers/hd44780: change default pin params
Remove the use of arduino dependent macros. The default pins are for the Arduino Zero board
2019-10-29 11:09:56 +01:00
8e70cfb2e4
driver/hd44780: cleanup param definition and HD44780_RW_OFF
There's already a macro for undefined gpios: GPIO_UNDEF
2019-10-29 10:58:26 +01:00
04dc65f6ad
drivers/hd44780: move params header at the right place 2019-10-29 10:58:26 +01:00
808e44243e
drivers/nrf24l01p: fix potentially undefined return value 2019-10-28 14:46:57 +01:00
Marian Buschsieweke
4cf2151248
Merge pull request #12537 from benpicco/at86rfmega
drivers/at86rf2xx: add support for ATmegaRF MCUs
2019-10-28 09:22:02 +01:00
Gunar Schorcht
f4a16e6b81
Merge pull request #12568 from aabadie/pr/drivers/bmp180_scan-build_fix
drivers/bmp180: fix potential use of uninitialized variable
2019-10-27 09:48:07 +01:00
Benjamin Valentin
8f1eaae353 drivers/at86rf2xx: add support for ATmegaRF MCUs
The ATmega128RFA1 and ATmega256RFR2 contain a version of this IP
on the MCU.

The radio core behaves mostly like a at86rf231, but all registers
are mapped to memory and radio states can directly generate interrupts
on the CPU.

The ATmega256RFR2 adds support for automatic retransmissions.
This has not been implemented yet.

Co-authored-by: Josua Arndt <jarndt@ias.rwth-aachen.de>
2019-10-26 23:10:18 +02:00
Francisco
f68ad2ae6c
Merge pull request #12569 from aabadie/pr/drivers/ata8520e_fix_scan_build
drivers/ata8520e: fix potentially unused variables
2019-10-25 10:16:41 +02:00
9eee6bc0a1
usbdev: Fix spelling mistakes 2019-10-23 10:36:49 +02:00
679a07833b
drivers/bmp180: fix potentially use of uninitialized variable
This was reported by scan-build
2019-10-22 19:30:12 +02:00
07a2696f5d
drivers/ata8520e: fix potentially unused variables
This was reported by scan-build
2019-10-22 19:19:36 +02:00
5db4310b45
Merge pull request #12481 from aabadie/pr/driver/rn2xx3_fix_sleep
drivers/rn2xx3: fix sleep function
2019-10-20 08:00:40 +02: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
Benjamin Valentin
d92e2b25ac drivers/nrf24l01p: rename CMD_NOP -> CMD_NOOP
This prevents a conflict with an unrelated Atmel header file.
2019-10-17 19:20:31 +02:00
Jannes
fdd34499ac drivers/mpu9x50: Correct read_temperature
Change msbiot Makefile.dep back to mpu9150
2019-10-17 14:04:43 +02:00
Jannes
2df5d6048d driver/mpu9x50: Rename mpu9150 to mpu9x50
Rename all files

Rename all variables, methods and methodcalls

Rename all folders

Add to the makefiles

Add to doc
2019-10-17 12:52:18 +02:00
76267bdfea
drivers/rn2xx3: cleanup sleep function 2019-10-17 10:02:11 +02:00
Kevin "Tristate Tom" Weiss
e20ffd7f7c
Merge pull request #11738 from OTAkeys/feat/add_cme_cms_error
driver/at: add return code for CME/CMS errors
2019-10-15 12:55:40 +02: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
Leandro Lanzieri
0e0b6f8231
Merge pull request #12221 from benpicco/mrf24j40-init_check
drivers/mrf24j40: allow for basic self-test on init
2019-10-14 15:36:52 +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
63a6bcd513
drivers/sx127x: skip reset sequence if pin is undefined 2019-10-09 15:07:23 +02:00
Peter Kietzmann
ed75d639d5
Merge pull request #12287 from Ilmu011/kw2xrf_tmr3_acktmout
drivers/kw2xrf: Use TMR3 instead TMR4 to detect ACK timeout
2019-10-02 23:10:11 +08:00
Adem-Can Agdas
d74570fae3 drivers/kw2xrf: use TMR3 instead TMR4 to detect ACK timeout 2019-10-02 15:09:18 +02:00
benpicco
0778774656
Merge pull request #12260 from JannesVolkens/opt3001
drivers/opt3001: Initial support for the Opt3001 sensor
2019-10-02 12:11:47 +02:00
benpicco
69d274d87b
Merge pull request #12290 from benpicco/opt_driver_lis2dh12i2c
drivers/lis2dh12: add I2C mode
2019-10-02 12:06:40 +02:00
Hauke Petersen
8a69e4ac69 drivers/lis2dh12: added I2C mode 2019-10-02 11:16:39 +02:00
Jannes
33a98100a9 drivers/opt3001: Initial support 2019-10-02 10:06:28 +02:00
Hauke Petersen
7f419f4381 periph/uart: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
0cd8bb47c8 periph/timer: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
4914e6484a periph/spi: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
44c54c2ae0 periph/rtt: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
bf5ad17b9d periph/rtc: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
711af7cc27 periph/hwrng.h: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
3e9ee01103 periph/gpio: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
e71f0bb0c6 periph/flashpage: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
8ef4f0d134 periph/dac.h: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
348b337023 periph/cpuid: add doc on low power implications 2019-10-01 23:09:23 +02:00
Hauke Petersen
f361ebc0bd periph/adc: add doc on low power implications 2019-10-01 23:09:23 +02:00
Gunar Schorcht
02d81b717e
Merge pull request #12063 from maribu/i2c_release
drivers/periph/i2c: Updated i2c_release() to return void
2019-10-01 19:50:38 +02:00
Benjamin Valentin
0bb04cfd27 drivers/mrf24j40: add pseudomodules for MRF24J40MA/C/D/E
Microchip offers ready-to-use modules with the mrf24j40 chip.
All but the MRF24J40MA integrate an external PA/LNA, they also come
with an RF shield.

If the PA/LNA is not enabled, the signal off these modules is really
poor.

This adds pseudomodules so that the PA/LNA is automatically enabled
when the appropriate module is used.
2019-09-28 19:30:52 +02:00
Benjamin Valentin
c31e373214 shell_commands: gnrc_netif: only include LoRA options when LoRA PHY is present
If no LoRA module is used, there is no use in compiling in all the config options
for LoRA PHYs.

This saves about 1k of .text
2019-09-24 17:14:03 +02:00
benpicco
d5c272ed86
Merge pull request #12199 from smlng/fix_timer_returns
periph/timer: Fix return codes of timer API
2019-09-17 23:04:46 +02:00
benpicco
6c95081e42
Merge pull request #10556 from gschorcht/drivers_pca9685
drivers: support for NXP PCA9685 I2C 16-channel, 12-bit PWM controller
2019-09-15 19:20:29 +02:00
aed12b4853
Merge pull request #11252 from fjmolinas/pr_wdg_stm32
cpu/stm32_common: add watchdog for stm32
2019-09-13 09:16:18 +02:00
Dylan Laduranty
513b767694
Merge pull request #11944 from benpicco/spi_doc-fix
drivers/include/periph/spi: fix documentation
2019-09-12 21:28:21 +02:00
Schorcht
f93f9b7790 drivers: support for PCA9685 PWMs 2019-09-12 19:11:52 +02:00
Francisco Molina
8bd34c4ba3 drivers/periph_common: init wdt if HAS_WDT_INIT 2019-09-12 17:45:31 +02:00
Francisco Molina
cb876297a8 drivers/periph: include periph_cpu.h in wdt.h 2019-09-12 17:45:31 +02:00
Benjamin Valentin
fa9e9064cf periph_common/rtc: add rtc_tm_normalize() 2019-09-12 11:32:08 +02:00
Francisco Acosta
092f8e8d46
Merge pull request #8774 from OTAkeys/pr/flashpage_mtd
drivers: add mtd wrapper for periph_flashpage
2019-09-11 16:59:15 +02:00
Sebastian Meiling
ed5f085b30 periph/timer: always return 0 for success
Change documentation on return codes in periph/timer API to
return 0 on success and (-1) on error by default.
For timer_init this was already the case, but for timer_set,
timer_set_absolute, and timer_clear this is now changed
from 1 to 0 for success, while error remains (-1).
2019-09-11 13:31:13 +02:00
Marian Buschsieweke
b87ab96d17
Merge pull request #10661 from miri64/gnrc_netif_hdr/enh/netif_setter
gnrc_netif_hdr: add setter for netif
2019-09-10 16:14:28 +02:00
Vincent Dupont
7c8a3eae71 drivers/mtd: improve mtd API doc 2019-09-10 13:26:05 +02:00
Vincent Dupont
f3d2f53287 drivers: add mtd_flashpage driver
This is a MTD wrapper for flashpage internal flash
2019-09-10 13:26:05 +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
Leandro Lanzieri
563a053bc1
Merge pull request #10983 from skullbox305/driver_ph_oem
drivers/ph_oem: support for Atlas Scientific pH OEM sensor
2019-09-09 10:18:49 +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
Igor Knippenberg
61d0970939 drivers/saul: Added pH
- added device class SAUL_SENSE_PH in saul.h
- added stringification SAUL_SENSE_PH in saul_str.c
2019-09-05 12:47:10 +02:00
Igor Knippenberg
ead03d4a08 drivers/ph_oem: Initial implementation of the pH OEM sensor
The Atlas Scientific pH OEM sensor is a small circuit to be embedded in
end products to measure the pH value with any commercially available pH
electrode
2019-09-05 12:47:10 +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
fabian18
2edf153cf8 drivers/at86rf2xx: do not hang on no dev 2019-09-02 10:27:24 +02:00
Martine Lenders
69eb7069e9
gnrc_xbee: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:45 +02:00
Rotzbua
5a8bac399c
drivers/ccs811: sys/hashes: fix typo usefull -> useful 2019-08-25 21:27:55 +02:00
Kevin "Tristate Tom" Weiss
1b1c902dd3
Merge pull request #12022 from JannesVolkens/tmp00x
driver/tmp00x: make tmp006 more generic
2019-08-23 13:26:09 +02:00
Jannes
90c4ef04ef driver/tmp00x: Change tmp006 to tmp00x and add tmp007
Rename TMP006 to TMP00x
Add TMP007 sensor support to TMP00X
Change uint8_t reg to uint16_t
Add to doxygen documentation group
Expose compile time configurations
Move defines from .c to .h
Change double to float, because double is not needed
Add TMP007 register information
2019-08-23 12:11:16 +02:00
Marian Buschsieweke
5bba339a7c
drivers/periph/i2c: Fixed i2c_release() signature
i2c_release() should not have a return value, as:

- There is no reasonable error handling possible by the caller, so there is no
  value in indicating success/failure via the return value to the caller
- There is no legitimate reason to fail *unless* an invalid I2C bus was released
  or an I2C bus that was not previously acquired was released
    --> This would indicate a bug in the code and should be tackled by an
        assert()
2019-08-22 12:02:01 +02:00
Vincent Dupont
42c5c40da9 ncv7356: add driver for ncv7356 SW CAN transceiver 2019-08-21 11:05:51 +02:00
Marian Buschsieweke
ccf713c5ad
drivers/cc1xxx_common: L2 netstats & cleanups
- Added required logic to provide correct L2 netstats when the module
  netstats_l2 is used.
- Refactored code to use gnrc_netif_hdr_set_netif() over manually setting the
  pid to ease future refactoring.
2019-08-20 16:40:00 +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
fabian18
2c001f5a6c drivers/include/periph/eeprom: Changed uint8_t* to void* in API 2019-08-09 17:27:32 +02:00
Benjamin Valentin
9d6d93ef2f drivers: make use of ARRAY_SIZE macro 2019-08-06 19:43:54 +02:00
cf2228e23e
drivers/periph_wdt: cleanup normal mode inline example
Remove a useless blankline
2019-08-05 21:48:10 +02:00
bd1eb6e285
drivers/periph_wdt: fix inline callback example
Function was renamed to wdt_setup_reboot_with_callback
2019-08-05 21:47:25 +02:00
340c8e8236
drivers/sx127x: let sx127x driver manage spi pins GPIO modes 2019-08-05 16:46:41 +02:00
e42307188c
drivers/spi: extend API with updatable gpio mode on pins 2019-08-05 16:46:41 +02:00
Benjamin Valentin
870f5a5a0b drivers/include/periph/spi: fix documentation
spi_transfer_reg() will *always* send out a byte, even if the byte is '0'.

fixes #11763
2019-07-31 13:27:47 +02:00
Leandro Lanzieri
92a5f7cee3
Merge pull request #11658 from aabadie/pr/drivers/rn2xx3_fix_cmd_append
drivers/rn2xx3: fix incorrectly terminated hex strings when writing an array of bytes
2019-07-30 21:03:31 +02:00
Martine Lenders
007de266d3
Merge pull request #11926 from miri64/gnrc_cc110x/enh/use-netif-setter
gnrc_cc110x: use gnrc_netif_hdr_set_netif()
2019-07-30 19:57:30 +02:00
Marian Buschsieweke
8cbf636781
drivers/dht: Fixed magic numbers & missing doc
- Replaced magic number by preprocessor macros and documented them
- Added comment to explain why DHT21 is not part of the switch() expression
2019-07-29 10:39:50 +02:00
Marian Buschsieweke
579a67be03
drivers/dht: Move hold logic from SAUL to driver
The DHT11/DHT21/DHT22 cannot be sampled more than once a second. Previously,
a global cache was added to the SAUL adaption of the dht driver to answer with
stored values for one second after the last read. This however had two
disadvantages:

- The global cache was shared for all DHTXX devices connected. As a result
  incorrect values were delivered when reading out multiple sensors over SAUL
  with less than 1 second delay in between
- A user of the low level API will had to implement the same caching strategy,
  resulting in code duplication

By moving the hold logic to the driver, both limitations can be overcome.
2019-07-29 10:39:50 +02:00
Martine S. Lenders
d129382484 gnrc_cc110x: use gnrc_netif_hdr_set_netif() 2019-07-26 15:34:08 +02:00
Marian Buschsieweke
d2d83c3bd0
drivers/dht: Fixed assert on uninitialized data
Instead of asserting that parameters are valid, dht_init() contained an assert
on uninitialized data. This commit fixes that assert
2019-07-19 16:14:29 +02:00
Marian Buschsieweke
c75bacceba
drivers/dht: Added error handling
Previously the DHT11/DHT21/DHT22 driver ended up in an infinite loop locking up
RIOT when a communication error occurred. This commit adds a simple timeout to
the communication in order to prevent these lock ups.
2019-07-19 15:57:49 +02:00
f8128844b7
Merge pull request #11527 from fjmolinas/pr_wdg_hdr
drivers/include: add header definition for wdt
2019-07-16 14:25:40 +02:00
fjmolinas
541f9ddd20 drivers/include: add header definition for wdt 2019-07-16 13:53:28 +02:00
Leandro Lanzieri
cb57c6ff1a
Merge pull request #11798 from jia200x/pr/remove_sx127x_multi
sx127x: remove MULTIDIO and fix missing interrupt handling
2019-07-05 11:33:42 +02:00
Jose Alamos
2e7683b5e2 sx127x_netdev: remove switch-case from ISR handler
Some LoRa modules don't provide all ISR lines. Thus, there are
cases where different interrupts appear simultaneously in the ISR flags.
It's required to use an AND/OR pattern to check which interrupts were triggered.
2019-07-05 10:52:43 +02:00
9e6d558596
stm32_eth: Code cleanup and some fixes
cpu/stm32_common: cleanup periph eth
boards/nucleo-f767zi: cleanup dependencies
boards/nucleo-f767zi: fix dma configuration attribute for eth
examples/default: add nucleo-767zi in boards with netif
drivers/stm_32_eth: Add header guard for eth_config

Co-authored-By: Robin <robin@chilio.net>
2019-07-04 15:27:50 +02:00
Robin
4729bea46e
stm32_eth: Multiple Improvements of the original codebase
stm32eth: Move to stm32_common periph
cpu/stm32_periph_eth: Rebase to current master branch

- Update DMA to use new vendor headers
- Update send to use iolist. It looks like the packet headers are now transfered as seperate iolist entries which results in the eth periph sending each header as own packet. To fix this a rather ugly workaround is used where the whole iolist content is first copied to a static buffer. This will be fixed soon in another commit
- If MAC is set to zero use luid to generate one
- Small code style fixes

cpu/stm312f7: Add periph config for on-board ethernet
boards/nucleo-f767zi: Add config for on board ethernet
tests/stm32_eth_lwip: Remove board restriction
boards/common/nucleo: Add luid module if stm32 ethernet is used
tests/stm32_eth_gnrc: Add Testcase for gnrc using the stm32 eth periph
stm32_eth: Rework netdev driver layour
tests/stm32_eth_*: Use netdev driver header file for prototypes
stm32_eth: Add auto init for stm32 eth netdev driver
boards/stm32: Enable ethernet conf for nucleo boards
stm32_eth_auto_init: Add dont be pendantic flag
stm32_eth: Remove dma specific stuff from periph_cpu.h

Looks like this was implemented in PR #9171 and 021697ae94 with the same interface.

stm32_eth: Remove eth feature from stm32f4discovery boards
stm32_eth: Migrate to stm32 DMA API
stm32_eth: Add iolist to module deps
stm32_eth: Rework send function to use iolist
stm32_eth: Fix ci build warnings
stm32_eth: Fix bug introduced with iolist usage
stm32_eth: Remove redundant static buffer
stm32_eth: Fix feature dependencies
stm32_eth: Fix wrong header guard name
stm32_eth: Implement correct l2 netstats interface
stm32_eth: Rename public functions to stm32_eth_*
stm32_eth: Fix doccheck
stm32_eth: Move register DEFINE to appropriate header file
stm32_eth: remove untested configuration for f446ze boards
stm32_eth: Move periph configuration struct to stm32_common
stm32_eth: Fix naming of eth_phy_read and eth_phy_write
stm32_eth: Remove obsolete test applications
2019-07-04 15:27:26 +02:00
Victor Arino
e206087d65
stm32_eth: Initial implementation by Victor Arino
drivers/eth-phy: add generic Ethernet PHY iface
cpu/stm32f4: implement eth driver peripheral

This implements the ethernet (MAC) peripheral of the stm32f4 as a
netdev driver.
boards/stm32f4discovery: add eth configuration
boards/stm32f4discovery: add feature stm32_eth
tests/stm32_eth_lwip: add test application
2019-07-04 15:04:01 +02:00
Jose Alamos
d94d587e5e sx127x: remove DIOMULTI 2019-07-04 14:23:48 +02:00
Sebastian Meiling
f6207871a9
Merge pull request #11678 from MichelRottleuthner/pr_fix_sx127x_reset
drivers/sx127x: fix device reset
2019-07-03 17:07:50 +02:00
Michel Rottleuthner
6e4214843a drivers/sx127x: fix reset for sx1272 devices.
- The previous implementation wrongly assumes that sx1272 and 1276
  use the same logic level for triggering a reset.
- The timeout values were to short to guarantee proper reset when
  coming from POR.
2019-07-03 11:26:23 +02:00
Jose Alamos
ca8c78116f drivers/sx127x: add NETOPT_RX_SYMBOL_TIMEOUT setter 2019-06-27 15:43:50 +02:00
Jose Alamos
268e6df950 drivers/sx127x: add NETOPT_RANDOM option handling 2019-06-27 15:43:50 +02:00
Jose Alamos
77162b8c6f drivers/sx127x: add NETOPT_SYNCWORD option handling 2019-06-27 15:43:50 +02:00
Toon Stegen
331c0db5cf driver/at: add return code for CME/CMS errors
in case of CME or CMS errors, the error codes or human readable strings
are in the response buffer. We want to indicate to the AT driver user
that when tihs case occurrs so he can extract the error codes.
2019-06-25 09:59:27 +02:00
f52d5ebde7
drivers: sys: replace USE_ETHOS_FOR_STDIO macro by MODULE_STDIO_ETHOS 2019-06-23 22:16:03 +02:00
Martine Lenders
abf4d60286
Merge pull request #11718 from jia200x/pr/netdev_ieee802154_pib
netdev_ieee802154: add txpower and page
2019-06-19 18:24:13 +02:00
Jose Alamos
302fa1467f netdev_ieee802154: add txpower to descriptor 2019-06-18 13:51:31 +02:00
Jose Alamos
c33d5f744b netdev_ieee802154: add channel page to descriptor 2019-06-18 13:51:31 +02:00
Michel Rottleuthner
f337f42738 drivers/sx127x: add define for logic level of POR indication by the reset pin 2019-06-11 19:24:07 +02:00
44f9c3fa28
enc28j60: use ethernet address helper functions 2019-06-10 21:07:02 +02:00
1f6895d0f7
drivers/rn2xx3: fix incorrectly terminated hex strings
When writing an array of bytes, each byte is converted on the fly to 2 hex characters and sent to the rn2xx3 module. This change ensures each string is correctly terminated, with null character, when written to the module
2019-06-07 10:39:31 +02:00
Martine Lenders
82278e808e
Merge pull request #11637 from miri64/isrpipe/fix/change-api-types
isrpipe: change API to be in line with `tsrb`
2019-06-06 12:49:24 +02:00
Martine Lenders
f3ab285362 slipdev: make rxmem buffer uint8_t
`tsrb` changed to that type, so there is no reason for us, to keep the
internally used buffer as a `char` (especially since the rest of the
driver already uses `uint8_t`)
2019-06-05 21:24:38 +02:00
Martine Lenders
8cf4bc178c at: adapt for isrpipe API type change 2019-06-05 18:16:32 +02:00
9b47dcb542
Merge pull request #11634 from miri64/tsrb/fix/change-api-types
tsrb: change input type to `uint8_t`
2019-06-05 17:50:16 +02:00
Martine Lenders
5dafce71be slipdev: adapt for tsrb API type change 2019-06-05 17:10:27 +02:00
Martine Lenders
31c49c58f1 ethos: adapt for tsrb API type change 2019-06-05 17:10:27 +02:00
20b94e9c56
usbdev: fix usbopt argument for getter/setter wrappers 2019-06-05 12:06:10 +02:00
Kevin "Bear Puncher" Weiss
4922321f1f
Merge pull request #11585 from fedepell/i2c_reg_endianess_2
periph/i2c: handle i2c register write/read helper function correctly in big endian
2019-05-29 11:54:24 +02:00
Kevin "Bear Puncher" Weiss
772dcd189b
Merge pull request #11532 from leandrolanzieri/pr/drivers/at_rcv-functions
drivers/at: Add 'at_recv_bytes_until_string' function
2019-05-29 09:55:33 +02:00
Federico Pellegrin
1779abafb5 periph/i2c: make sure i2c registers is big-endian on all archs 2019-05-29 05:15:23 +02:00
Peter Kietzmann
a66693d111
Merge pull request #11501 from leandrolanzieri/pr/drivers/adcxxc1_config_group
drivers/adcxxc1: Expose compile configuration via config group
2019-05-28 22:17: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
a7f8182249
drivers: sys: add SAUL support for ds75lx sensor 2019-05-22 16:54:20 +02:00
35a3c4ddfe
drivers/ds75lx: add basic driver 2019-05-22 16:54:19 +02:00
Guillaume Gonnet
1783b3da55 drivers/ds18: fix ds18_read with negative temperatures
When DS18 returns 0xFE6F (corresponding to -25.0625 °C), `ds18_read` returns
13877 whereas it should return -2506. This commit fixes this issue.
2019-05-16 20:12:22 +02:00
Leandro Lanzieri
b5171f4d48 tests/driver_at: Add receive until string test 2019-05-16 14:45:53 +02:00
Leandro Lanzieri
5b04fb1713 drivers/at: Add function to receive until string 2019-05-16 14:45:53 +02:00
Leandro Lanzieri
ef6207da06 drivers/adcxxc1: expose configuration via config group 2019-05-08 15:22:41 +02:00
MichelRottleuthner
c754f3c4c7
Merge pull request #11451 from fhessel/pcd8544
drivers/pcd8544: Use uint8_t instead of char for byte represenatation
2019-04-30 21:47:50 +02:00
Frank Hessel
70ac451a2b
drivers/sdcard_spi: Use uint8_t for byte values 2019-04-29 19:25:34 +02:00
Frank Hessel
827868a7a0
drivers/pcd8544: replace char by uint8_t for bytes 2019-04-25 23:42:30 +02:00
Frank Hessel
4fa954c1e3
drivers/adt7310: Replace binary representation 2019-04-25 21:18:36 +02:00
ac60154157
Merge pull request #9771 from Citrullin/advanced_io
drivers/periph/gpio_util: add gpio_util_shiftin()
2019-04-24 11:15:20 +02:00
Philipp Blum
9f2ef5e367 drivers/periph_common/gpio_util: introduce gpio_util_shiftin() 2019-04-18 07:09:32 +02:00
Gilles DOFFE
3a83648f2a drivers: add licence to motor_driver source files
Related to PR #10290, add missing licence to some source files.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-04-13 00:29:58 +02:00
c1547efb3a
Merge pull request #11316 from fjmolinas/pr_sx127x_switch
drivers/sx127x: add support for rx and tx switch pin
2019-04-10 18:40:37 +02:00
francisco
c62d9feff7 drivers/sx127x: add support for rx and tx switch pin 2019-04-10 08:18:01 +02:00
MrKevinWeiss
3ed9060527 drivers: adcxx1c, ads101x, ad7746: Change I2C macro to DEV
Due to a name clash the helper macro I2C should be change.
Helper macros in other drivers are called DEV.
Changing to DEV fixes the naming conflict.
2019-04-08 14:08:07 +02:00
Sebastian Meiling
4dd09eaa06
Merge pull request #6178 from OTAkeys/pr/can_stm32
can stm32: add a driver for STM32 bxCAN peripheral
2019-04-08 08:50:08 +02:00
Dylan Laduranty
a81dbf0037
Merge pull request #11152 from ibr-cm/petersen/l3g4200d-fix-pr
l3g4200d: Fixes conversion bug
2019-04-05 15:49:13 +02:00
Vincent Dupont
74ddf56171 tests/conn_can: build stm32 CAN drivers
Build can_stm32 module on boards which have a stm32 CAN controller.
2019-04-03 11:12:46 +02:00
Martine Lenders
a1e2dc0810
Merge pull request #11332 from kYc0o/pr/xbee/prevent_0_len_uart
drivers/xbee: prevent 0 length packet sent to UART
2019-04-02 17:33:29 +02:00
kYc0o
f673d5af1e drivers/xbee: prevent 0 length packet sent to UART
Since the API doc doesn't specify what to do with 0
len writings into UART, we cannot assume that is
safe to do it, so this commit prevents it by checking
the length prior to the `uart_write()` operation.
2019-04-02 16:47:13 +02:00
Martine Lenders
4e464bdbc6
Merge pull request #11331 from kYc0o/pr/cc2420/fix_0_len_pkt
drivers/cc2420: don't append to FIFO if iol->iol_len == 0
2019-04-02 16:29:24 +02: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
200ce49638
Merge pull request #11325 from maribu/encx24j600
drivers/encx24j600: Allow empty iolist elements
2019-04-01 17:10:16 +02:00
MichelRottleuthner
d77b8e1f52
Merge pull request #11321 from bergzand/pr/mrf24j40/fix_empty_element
drivers/mrf24j40: don't load data if iol->iol_len == 0
2019-04-01 17:09:15 +02:00
Marian Buschsieweke
99db8e8717
drivers/encx24j600: Allow empty iolist elements
This commits allows using netdev_driver_t::send() to be called with one or more
empty iolist elements. This fixes issue
https://github.com/RIOT-OS/RIOT/issues/11163
2019-04-01 16:51:39 +02:00
1804730c0e
mrf24j40: don't load data if iol->iol_len == 0 2019-04-01 11:46:42 +02:00
Martine Lenders
299a1903e6
Merge pull request #11215 from jia200x/pr/sx127x_fix
sx127x: ignore empty iolist element
2019-04-01 11:37:37 +02:00
Martine Lenders
85276fb7a0
Merge pull request #11214 from maribu/enc28j60
drivers/enc28j60: Allow sending with empty chunks
2019-03-30 18:08:01 +01:00
Torben Petersen
506e208ffd drivers/l3g4200d: fixes driver conversion 2019-03-30 10:32:43 +01:00
Vincent Dupont
ae95137f95 can stm32: add a driver for STM32 bxCAN peripheral
This driver is compliant with the candev interface. It has been tested
with STM32F0 and STM32F2 and STM32F413 ONLY at this time but should be
compliant with other STM32Fx devices
2019-03-29 12:03:43 +01:00
14f47bf220
Merge pull request #10695 from aabadie/pr/drivers/lpsxxx
drivers/lpsxxx: refactor lps331ap and add support for lps25hb + lps22hb
2019-03-29 10:54:08 +01:00
Dylan Laduranty
ccf12c57a8
Merge pull request #10884 from fedepell/sam_rwee_support
sam0 flashpage RWWEE flash support
2019-03-28 11:00:25 +01:00