| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Merge remote-tracking branch 'james-e-mcxa/james/upstream' into james/upstream-mcxa
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Signed-off-by: Mathis Deroo <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* I2c Async
Signed-off-by: Felipe Balbi <[email protected]>
* Fix i2c read bug
Signed-off-by: Felipe Balbi <[email protected]>
* Introduce wait_for()
Signed-off-by: Felipe Balbi <[email protected]>
* Review comments
Signed-off-by: Felipe Balbi <[email protected]>
* more review comments
Signed-off-by: Felipe Balbi <[email protected]>
* review comments
Signed-off-by: Felipe Balbi <[email protected]>
* review comments
Signed-off-by: Felipe Balbi <[email protected]>
* convert async fn to impl Future
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Refactor LPUART driver constructors
- Add new_with_rtscts(), new_with_rts(), new_with_cts() methods
- Store RTS/CTS pins in TX/RX structs
- Remove enable_tx, enable_rx, enable_rx_rts, enable_tx_cts config fields
- Fix typo: msb_firs -> msb_first
- Fix write_byte() return type to Result<()>
* Update hello example for LPUART driver changes
* Refactor buffered LPUART initialization logic
- Split new_inner() into init_common() and separate helpers for full-duplex, TX-only, and RX-only
- Replace assert!() with proper Error::InvalidArgument returns for empty buffers
- Simplify constructor implementations by removing expect() calls
|
| | |
| |
| |
| |
| | |
* Don't set slew+strength for inputs
* Update example
|
| | |
| |
| | |
Fix LPI2C2 example
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add GPIO interrupt support and embedded-hal-async trait implementation
Signed-off-by: Mathis Deroo <[email protected]>
* Run cargo fmt
* Improve GPIO driver interrupt mechanism and example
- GPIO interrupt managed internally at the HAL level,
- Renamed and cleaned gpio_interrupt example; now button_async.rs,
- Use BitIter instead of simple for loop in the irq handler,
- Fix comments and add "rt" wrappen to GPIO IRQ handler.
Signed-off-by: Mathis Deroo <[email protected]>
* Modify INTERRUPT_DETECTED (AtomicBool to AtomicU32) to work with pin number and not only port number interrupt
Signed-off-by: Mathis Deroo <[email protected]>
* add embedded_hal_async::digital::* traits
Signed-off-by: Mathis Deroo <[email protected]>
* Update irq_handler with BitIter loop
Co-authored-by: Felipe Balbi <[email protected]>
* Add suggested changes
Signed-off-by: Mathis Deroo <[email protected]>
* cargo fmt
Signed-off-by: Felipe Balbi <[email protected]>
* WIP: Modify Wakers from AtomicWaker to WaitMap, with pin number (per PORT) as key
Signed-off-by: Mathis Deroo <[email protected]>
* Tweak maitake-sync usage
* Improve docs
* refactor a bit
* Move all of the async+interrupt stuff into a module
* Remove defmt debug traces
Signed-off-by: Mathis Deroo <[email protected]>
* cargo vet
* Move e-hal-async impls into the gated block
* "rt", begone!
---------
Signed-off-by: Mathis Deroo <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
Co-authored-by: James Munns <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* I2c Master
Signed-off-by: Felipe Balbi <[email protected]>
* Fix review comments
Signed-off-by: Felipe Balbi <[email protected]>
* More review comments
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
|
| | |
| |
| | |
Allow the HAL lpuart driver to correctly configure pins as requested on init.
|
| | |
| |
| |
| | |
There will be a follow up PR that removes the unsafe `init` functions,
but I wanted to squash this out first in case I don't get to it all today.
|
| | | |
|
| | |
| |
| |
| |
| | |
Introduces a ClockOut peripheral, allowing for ensuring that internal clocks are operating correctly.
Also fixes some incorrect PLL/Div4 usage.
|
| | |
| |
| |
| |
| | |
It adds a complete Mux enum
Co-authored-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Improve GPIO driver and add button example
- port and pcr registers are defined using paste!
- added pin configuration for slew rate, drive strength, mux function, etc...
- added button example to showcase input gpio feature
Signed-off-by: Mathis Deroo <[email protected]>
* Add pull-up pull-down config support for input gpio
Signed-off-by: Mathis Deroo <[email protected]>
* Replace GPIOs enum with existing ones in the PAC
Signed-off-by: Mathis Deroo <[email protected]>
* Remove init_gpio_pin function as it is done in hal init config
Signed-off-by: Mathis Deroo <[email protected]>
* Integrate feedback for the GPIO driver
- Add again missing IO peripherals
- Added function to configure separately slew rate, drive strength, pull.
- Revert comment changes
Signed-off-by: Mathis Deroo <[email protected]>
* Create user-readable field for the pin configuration
Signed-off-by: Mathis Deroo <[email protected]>
* examples: button: remove left-over OSTIMER initialization
While at that, also cargo fmt
* Fix warnings
* Add documentation for public functions
Signed-off-by: Mathis Deroo <[email protected]>
* Expose port and pcr registers to AnyPin implementation
Signed-off-by: Mathis Deroo <[email protected]>
* Remove unnecessary change
Signed-off-by: Mathis Deroo <[email protected]>
* Run cargo fmt
---------
Signed-off-by: Mathis Deroo <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Initialize OSTIMER0 during HAL initialization
Provide the user with a working time driver.
Signed-off-by: Felipe Balbi <[email protected]>
* Handle time_driver interrupt internally
Signed-off-by: Felipe Balbi <[email protected]>
* Gate `time-driver` impl behind a `time` flag
Also prevents creation of an `Ostimer` instance if the `time`
feature is active.
* Remove some dead code
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: James Munns <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Correct gpio driver
Signed-off-by: Felipe Balbi <[email protected]>
* Simplify blinky example
Make it look like every other HAL for consistency. While at that, also
rename the example to match the name used by other HALs.
Signed-off-by: Felipe Balbi <[email protected]>
* Add some documentation to GPIO driver
Signed-off-by: Felipe Balbi <[email protected]>
* Enable GPIO clocks during HAL initialization
Provide the user with working GPIO clocks.
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
Co-authored-by: Felipe Balbi <[email protected]>
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | | |
Turns out probe-rs works out of the box.
Signed-off-by: Felipe Balbi <[email protected]>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Revert "chore(deps): bump embedded-io-async from 0.6.1 to 0.7.0 (#17)"
This reverts commit 011c3b2de9361496faa0eea75ae19a77f2698f88.
* Let HAL build in isolation
while at that, also remove bogus dependency on embassy-executor.
Signed-off-by: Felipe Balbi <[email protected]>
* Certify syn 2.0.110
Signed-off-by: Felipe Balbi <[email protected]>
---------
Signed-off-by: Felipe Balbi <[email protected]>
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |\| |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Move examples to a package of their own
* cargo +nightly fmt
* Add missing safety doc
* cargo clippy examples
* fmt again
---------
Co-authored-by: Felipe Balbi <[email protected]>
|
| | | | |
|
| | |/ |
|
| | |
| |
| |
| |
| | |
No CI, but this can be checked with `cargo check --all --examples`,
which now succeeds.
|
| | |
| |
| |
| | |
Signed-off-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
We don't need features for drivers that always exist.
Signed-off-by: Felipe Balbi <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The uart_interrupt example was not echoing received characters because
the RX interrupt enable bit (RIE) was not being set in the LPUART
control register. The NVIC interrupt was configured and the handler
was installed, but the peripheral itself was not generating interrupts.
Added uart.enable_rx_interrupts() call to enable RX data interrupts
in the LPUART2 peripheral before entering the main loop.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Refactor GRTC peripheral splitting it into multiple channels
* Reserve channel 1 for time-driver if enabled
* Implement time-driver using GRTC (RTC peripheral is now removed).
* Add timer example to nrf54l15
|