This makes use of the `periph_timer_query_freqs` feature:
1. It does choose the closest frequency supported before calling
timer_init() in the ztimer_periph_timer backend.
2. It does make use of the actually chosen frequency when using
`ztimer_convert_frac`.
3. It does `assert()` the frequency is within 5% of the specified when
no frequency conversion is performed or `ztimer_convert_shift_up`
is used.
This patch adds a hint to users for how to set
CONFIG_ZTIMER_USEC_ADJUST_SLEEP. The doc for
CONFIG_ZTIMER_USEC_ADJUST_SET already contained a similar hint.
This patch makes the requirement on buffer size more prominent.
Additionally, it adds the missing argument to the doxygen block of the
static initializer.
This patch makes the requirement on buffer size more prominent.
Additionally, it adds the missing argument to the doxygen block of the
static initializer. Finally, it chanes the argument name passed to the
static intializer to decouble the API from the implmentation details.
The mutex used to sync the reader and writer of the pipe is initialized
as unlocked. This results in a bit of wasted CPU cycles the first time a
read blocks. This patch inits the mutex in a locked state so that the
first blocking read blocks immediately.
This makes the header a lot more readable and `clang -Wdocumentation`
happy, which does not like HTML tags (`<a href="...">...</a>`) to
contain random line breaks.
- The responsibility for handling matching CoAP No-Response Options
has been split:
- `coap_build_reply()` only needs to report this and return
`-ECANCLED`
- `coap_handle_req()` does generate the empty ACK is needed.
==> As a result, writing CoAP request handlers correctly becomes a
lost easier. Correct error handling to be present is now
sufficient for correct handling of No-Response options.
==> This change is backward compatible with existing code.
- The API doc has been cleaned up and straightened
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
For in-band signalling that a content format is not valid / present,
the magic number `COAP_FORMAT_NONE` was introduced and the type
`uint16_t` was used. Some APIs however used different in-band signalling
values and types:
- coap_reply_simple(): No signal available, `unsigned int`
- coap_build_reply_header(): negative values, `int`
(Using `int` would prevent using larger content format numbers on
8-bit and 16-bit archs, where `int` and `int16_t` have the same
range.)
This changes the behavior to consistently use `COAP_FORMAT_NONE` as
"no content format" signal and `uint16_t` as type.