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

2698 Commits

Author SHA1 Message Date
Gunar Schorcht
147b79169c drivers/periph/gpio: add comparison functions
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 and other modules must first be changed so that they use the inline comparison functions.
2020-08-31 13:10:28 +02:00
benpicco
a0bae383d7
Merge pull request #14818 from Nishchay-sopho/drivers/sps30/add_sleep_mode
drivers/sps30: Add sleep mode
2020-08-25 23:49:32 +02:00
Nishchay-sopho
a368b0bc36 drivers/sps30: Add sleep mode 2020-08-25 16:20:18 +02:00
Benjamin Valentin
2aa2bf86a3 drivers/at86rf2xx: AES: don't use binary constant
This is a GCC extension. Use hex constant instead.
2020-08-25 14:06:40 +02:00
9b2aa40e03
Merge pull request #14038 from benpicco/mtd_pagewise
mtd: add page addressed operations to allow access > 4GiB on SD cards
2020-08-25 13:10:20 +02:00
Marian Buschsieweke
7b743cda13
drivers/at86rf2xx: Fix address generation
Do not generate address during reset, but during setup. Otherwise the device
will get a new address after every reset. Also: Use common IEEE 802.15.4
setup function for this.
2020-08-23 21:09:21 +02:00
Benjamin Valentin
0f4c5f5b10 drivers/at86rf2xx: fix assert
The assert is reversed. It must check if the config value does not
exceed the maximum address length, not the other way round.

previously this would lead to a crash when setting a short address:

2020-08-23 13:59:56,080 #  ifconfig 7 set addr_short 2
2020-08-23 13:59:56,081 # 0xdcad
2020-08-23 13:59:56,083 # *** RIOT kernel panic:
2020-08-23 13:59:56,085 # FAILED ASSERTION.

With this it works as expected

2020-08-23 14:05:07,988 #  ifconfig 7 set addr_short 2
2020-08-23 14:05:07,992 # success: set (short) address on interface 7 to 2
2020-08-23 14:05:52 +02:00
Marian Buschsieweke
92ae260617
Merge pull request #14778 from benpicco/sys/luid_netdev
sys/luid: add luid_netdev_get_eui48() & luid_netdev_get_eui64()
2020-08-21 21:30:14 +02:00
Benjamin Valentin
9823801cf6 drivers/at86rf215: use netdev_ieee802154_setup() 2020-08-21 15:33:19 +02:00
Benjamin Valentin
d29397cfd8 netdev_ieee802154: add netdev_ieee802154_setup() 2020-08-21 15:33:19 +02:00
6199ada6b5
drivers/sx127x: migrate to ztimer 2020-08-20 13:41:32 +02:00
Benjamin Valentin
02f37b998a drivers/at24cxxx: export page-wise write function
Export the _write_page() function so it can be used by the MTD subsystem.
2020-08-18 17:25:40 +02:00
Benjamin Valentin
7c8fe862ce drivers/at25xxx: export page-wise write function
Export the _write_page() function so it can be used by the MTD subsystem.
2020-08-18 17:25:40 +02:00
Benjamin Valentin
68a47b63e3 drivers/mtd_spi_nor: implement mtd_spi_nor_write_page() 2020-08-18 17:25:39 +02:00
Benjamin Valentin
7d291b5707 drivers/mtd_sdard: implement page-wise read() and write()
SD cards are usually larger than 4 GiB, so using 32 bit addressing will
break once they are filled to a certain extend.

Implement read_page() and write_page() which at a page size of 512
should work for SD cards of up to 2 TiB.

The read() and write() functions will ignore any offset that is not aligned
with the page boundary, so do the same for the new functions, but at least
report an error.
2020-08-18 17:25:39 +02:00
Benjamin Valentin
4034f96169 mtd: add page addressed operations
Currently read(), write() and erase() all use 32 bit addressing.
This is a problem when writing to media > 4 GiB, e.g. SD cards.

The current implementation would wrap around after 4 GiB and corrupt data.

To avoid this, add functions to the MTD subsystem that allow for page-wise
addressing. This is how most of the underling storage drivers and the
file-systems above work anyway.

In the future we should then deprecate the 32-bit functions if all drivers
are converted.
2020-08-18 17:25:39 +02:00
Benjamin Valentin
1582b105d3 drivers/at86rf2xx: fix typo 2020-08-17 22:53:51 +02:00
Benjamin Valentin
decadc41a0 drivers/dose: register driver with netdev 2020-08-17 22:53:51 +02:00
Benjamin Valentin
4f19b54b7b drivers/at86rf215: register driver with netdev 2020-08-17 22:53:51 +02:00
Benjamin Valentin
53eedc283b drivers/at86rf2xx: register driver with netdev 2020-08-17 22:53:51 +02:00
Benjamin Valentin
7ceb3f0a68 netdev: add netdev_register() to keep track if netdev IDs
It is desireable to have a way to identify network devices.
This should be independent from the type of netdev, so a common identifier is needed.

Base this on the driver ID and the index in the configuration struct.
This way we achive unique IDs that stay consistent for any firmware flashed on a board.
2020-08-17 22:50:18 +02:00
benpicco
22d3bf7c51
Merge pull request #14594 from maribu/stm32-eth-cleanup
cpu/stm32: Clean up / fix periph_eth
2020-08-17 21:16:27 +02:00
Marian Buschsieweke
8d8af31e39
driver/stm32_eth: Integrate into periph_eth
The stm32_eth driver was build on top of the internal API periph_eth, which
was unused anywhere. (Additionally, with two obscure exceptions, no functions
where declared in headers, making them pretty hard to use anyway.)

The separation of the driver into two layers incurs overhead, but does not
result in cleaner structure or reuse of code. Thus, this artificial separation
was dropped.
2020-08-17 20:29:33 +02:00
Marian Buschsieweke
28ed07d6e3
cpu/stm32/periph_eth: zero-copy TX (-6 KiB RAM)
The Ethernet DMA is capable of collecting a frame from multiple chunks, just
like the send function of the netdev interface passes. The send function was
rewritten to just set up the Ethernet DMA up to collect the outgoing frame
while sending. As a result, the send function blocks until the frame is
sent to keep control over the buffers.

This frees 6 KiB of RAM previously used for TX buffers.
2020-08-17 20:29:33 +02:00
Marian Buschsieweke
932c311ee2
cpu/stm32/periph_eth: Fix RX logic
If any incoming frame is bigger than a single DMA buffer, the Ethernet DMA will
split the content and use multiple DMA buffers instead. But only the DMA
descriptor of the last Ethernet frame segment will contain the frame length.

Previously, the frame length calculation, reassembly of the frame, and the
freeing of DMA descriptors was completely broken and only worked in case the
received frame was small enough to fit into one DMA buffer. This is now fixed,
so that smaller DMA buffers can safely be used now.

Additionally the interface was simplified: Previously two receive flavors were
implemented, with only one ever being used. None of those function was
public due to missing declarations in headers. The unused interface was
dropped and the remaining was streamlined to better fit the use case.
2020-08-17 20:28:49 +02:00
Cenk Gündoğan
f64511ddb5
Merge pull request #14626 from leandrolanzieri/pr/kconfig/test_modules_kconfig
kconfig: introduce migration test in CI
2020-08-13 14:11:00 +02:00
fabian18
1fca10c486 drivers/at86rf2xx: SPI AES security module 2020-08-12 17:18:00 +02:00
Nishchay-sopho
3245dee8d8 drivers/sps30: Update units of measurement 2020-08-12 12:50:35 +02:00
Leandro Lanzieri
14499e3b7e
drivers/periph_common: Add modules to Kconfig 2020-08-12 12:22:40 +02:00
Leandro Lanzieri
4ad2180f81
kconfig: Add default modules' symbols 2020-08-12 12:22:38 +02:00
Francisco
ad3568be87
Merge pull request #14712 from benpicco/gpio_init_int-clarify
periph/gpio: clarify behavior of gpio_irq_enable()
2020-08-11 11:30:05 +02:00
Benjamin Valentin
7543e714c1 drivers/periph_common: RTC: move RIOT_EPOCH to header, document it. 2020-08-07 13:22:19 +02:00
Benjamin Valentin
8c95198cbb periph/gpio: clarify behavior of gpio_irq_enable()
What happens with events that occured after `gpio_irq_disable()` is
currently not defined.
If they are not cleared, they will generate an interrupt on `gpio_irq_enable()`.

This does not seem like the intended behavior, so make the documentation more
explicit.
2020-08-05 17:41:27 +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
José Alamos
7967066f51
Merge pull request #14657 from maribu/netdev_doc
drivers/net: Fix netdev_driver_t doc
2020-08-04 10:49:24 +02:00
Marian Buschsieweke
f48147b585
Merge pull request #14663 from benpicco/native-fixes
treewide: compile fixes for native
2020-07-31 14:57:41 +02:00
Benjamin Valentin
492283898e pkg/driver_atwinc15x0: don't be pedantic 2020-07-31 13:38:03 +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
Benjamin Valentin
110609195f drivers/encx24j600: use unsigned char 2020-07-31 13:38:03 +02:00
Benjamin Valentin
2e34298265 drivers/nrf24l01p: use unsigned char 2020-07-31 13:38:03 +02:00
Benjamin Valentin
a81c0a544c drivers/kw2xrf: use unsigned char 2020-07-31 13:38:03 +02:00
benpicco
7e4b3d0f40
Merge pull request #14653 from Nishchay-sopho/drivers/sdp3x_#14603
driver/sdp3x: Resolved irq pin code used even if irq pin not connected
2020-07-31 01:22:02 +02:00
Marian Buschsieweke
86513dc97a
drivers/net: Fix netdev_driver_t doc
- Fix indent
- Use @reval instead of @return when referring to a single return value
- Use term "frame" instead of "packet"
2020-07-30 20:22:17 +02:00
nagrawal
7cc4f2b79b driver/sdp3x: Resolved irq pin code used even if irq pin not connected
irq_pin check when multiple sensors connected with or without irq pin
2020-07-30 16:35:35 +02:00
f7882f4f2a
drivers/stmpe811: return touch_dev position relative to top left corner 2020-07-29 14:49:17 +02:00
4b4e9830b0
drivers/touch_dev: clarify touch position coordinates origin 2020-07-29 14:49:17 +02:00
388bbfa008
drivers: add generic screen wrapper around display and touch devices 2020-07-29 14:30:03 +02:00
benpicco
38f62f9678
Merge pull request #14643 from Nishchay-sopho/drivers/sdp3x_#14601
driver/sdp3x: Resolved init condition fail
2020-07-29 13:08:57 +02:00
Leandro Lanzieri
224e2c977d
Merge pull request #14509 from jia200x/pr/lora_implicit_mode
sx127x: add support for implicit header mode
2020-07-29 12:52:00 +02:00
Jose Alamos
84eb2dc30c sx127x: implement NETOPT_PDU_SIZE 2020-07-29 11:57:52 +02:00