3 Commits

Author SHA1 Message Date
76b880915d async UART now works 2025-02-12 11:55:25 +01:00
beb56efca6 continue async uart example 2025-02-11 18:57:27 +01:00
4da270346e continue async uart tx 2025-02-11 18:57:26 +01:00
2 changed files with 1 additions and 32 deletions

View File

@@ -24,29 +24,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- I2C `TimingCfg` constructor now returns explicit error instead of generic Error. - I2C `TimingCfg` constructor now returns explicit error instead of generic Error.
Removed the timing configuration error type from the generic I2C error enumeration. Removed the timing configuration error type from the generic I2C error enumeration.
- `PinsA` and `PinsB` constructor do not expect an optional `pac::Ioconfig` argument anymore. - `PinsA` and `PinsB` constructor do not expect an optional `pac::Ioconfig` argument anymore.
- `IrqCfg` renamed to `InterruptConfig`, kept alias for old name.
- All library provided interrupt handlers now start with common prefix `on_interrupt_*`
- `RxWithIrq` renamed to `RxWithInterrupt`
- `Rx::into_rx_with_irq` does not expect any arguments any more.
- `filter_type` renamed to `configure_filter_type`.
- `level_irq` renamed to `configure_level_interrupt`.
- `edge_irq` renamed to `configure_edge_interrupt`.
- `PinsA` and `PinsB` constructor do not expect an optional IOCONFIG argument anymore.
- UART interrupt management is now handled by the main constructor instead of later stages to
statically ensure one interrupt vector for the UART peripheral. `Uart::new` expects an
optional `InterruptConfig` argument.
- `enable_interrupt` and `disable_interrupt` renamed to `enable_nvic_interrupt` and
`disable_nvic_interrupt` to distinguish them from peripheral interrupts more clearly.
- `port_mux` renamed to `port_function_select`
## Added ## Added
- Add `downgrade` method for `Pin` and `upgrade` method for `DynPin` as explicit conversion - Add `downgrade` method for `Pin` and `upgrade` method for `DynPin` as explicit conversion
methods. methods.
- Asynchronous GPIO support.
- Asynchronous UART TX support.
- Add new `get_tim_raw` unsafe method to retrieve TIM peripheral blocks. - Add new `get_tim_raw` unsafe method to retrieve TIM peripheral blocks.
- `Uart::with_with_interrupt` and `Uart::new_without_interrupt`
## [v0.8.0] 2024-09-30 ## [v0.8.0] 2024-09-30

View File

@@ -611,7 +611,6 @@ where
UartInstance: Instance, UartInstance: Instance,
PinsInstance: Pins<UartInstance>, PinsInstance: Pins<UartInstance>,
{ {
/// Calls [Self::new] with the interrupt configuration to some valid value.
pub fn new_with_interrupt( pub fn new_with_interrupt(
syscfg: &mut va108xx::Sysconfig, syscfg: &mut va108xx::Sysconfig,
sys_clk: impl Into<Hertz>, sys_clk: impl Into<Hertz>,
@@ -622,8 +621,6 @@ where
) -> Self { ) -> Self {
Self::new(syscfg, sys_clk, uart, pins, config, Some(irq_cfg)) Self::new(syscfg, sys_clk, uart, pins, config, Some(irq_cfg))
} }
/// Calls [Self::new] with the interrupt configuration to [None].
pub fn new_without_interrupt( pub fn new_without_interrupt(
syscfg: &mut va108xx::Sysconfig, syscfg: &mut va108xx::Sysconfig,
sys_clk: impl Into<Hertz>, sys_clk: impl Into<Hertz>,
@@ -634,18 +631,6 @@ where
Self::new(syscfg, sys_clk, uart, pins, config, None) Self::new(syscfg, sys_clk, uart, pins, config, None)
} }
/// Create a new UART peripheral with an interrupt configuration.
///
/// # Arguments
///
/// - `syscfg`: The system configuration register block
/// - `sys_clk`: The system clock frequency
/// - `uart`: The concrete UART peripheral instance.
/// - `pins`: UART TX and RX pin tuple.
/// - `config`: UART specific configuration parameters like baudrate.
/// - `irq_cfg`: Optional interrupt configuration. This should be a valid value if the plan
/// is to use TX or RX functionality relying on interrupts. If only the blocking API without
/// any interrupt support is used, this can be [None].
pub fn new( pub fn new(
syscfg: &mut va108xx::Sysconfig, syscfg: &mut va108xx::Sysconfig,
sys_clk: impl Into<Hertz>, sys_clk: impl Into<Hertz>,
@@ -757,6 +742,7 @@ where
/// Can be created by using the [Uart::split] or [UartBase::split] API. /// Can be created by using the [Uart::split] or [UartBase::split] API.
pub struct Rx<Uart> { pub struct Rx<Uart> {
uart: Uart, uart: Uart,
//opt_irq_id: Option<pac::Interrupt>,
} }
impl<Uart: Instance> Rx<Uart> { impl<Uart: Instance> Rx<Uart> {