Most timers are implemented this way already, and keeping (documenting)
it that way allows the generic timer_set implementation to stay as
simple as it is.
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.
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.
mock_rtt relies on setting mock values for RTT_MAX_VALUE and
RTT_FREQUENCY. Platforms with a rtt will already define these
values which leads to mock_rtt working with different values than
rtt_rtc.
This commit changes the ifdef logic so that when using mock_rtt
RTT_MAX_VALUE and RTT_FREQUENCY are redefined.
This adds the feature `periph_wdt_warning_period` that indicates that a
platform WDT driver implementation supports a configurable
CONFIG_WDT_WARNING_PERIOD.
It is often desireable to re-configure the pins of a bus back to GPIO mode,
either to save power when an external peripheral is turned off and current
would leak, or because a device may need a non-standard in-band signal to
be generated on the bus lines.
To serve those use cases, this patch introduces four new functions to the
I2C API:
- `i2c_init_pins()` equivalent to spi_init_pins(), restores I2C pin configuration
- `i2c_deinit_pins()` to switch the configuration of the I2C pins back to GPIO
mode and block access to the bus.
- `i2c_pin_sda()` to get the data pin for a given bus
- `i2c_pin_scl()` to get the clock pin for a given bus
Since it's unreasonable to expect having implementations for all platforms
already, those functions are only availiable when the periph_i2c_reconfigure
feature is availiable.
Applications should use FEATURES_REQUIRED += periph_i2c_reconfigure or
FEATURES_OPTIONAL if they want to make use of those functions.
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).
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()
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
This commit adds usbdev, a common API to interface USB peripheral
devices. The API is split into two parts, one for the USB device itself
and one for the USB endpoint.
Change description to reflect the configurability of the serial
interface.
Also, fix the uart_mode parameter description as the UART will be
configured and not initialized.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
As suggested in PR#5899 add a routine uart_mode() that will
setup data bits, stop bits and parity at runtime.
uart.h provides a set of enums defining these settings and each
platform will override them to specify values corresponding to
its configuration registers.
The idea behind the enums is to specify default settings i.e. 8N1
through the 0 value item. Invoking uart_mode(uart, 0, 0, 0) will
setup 8N1 mode.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
The write_reg/s states a repeated start write is used but that is not how the i2c is implemeneted.
Most devices also only use a continuous write so the API should be changed to match implementation and the majority of sensors.