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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.