aboutsummaryrefslogtreecommitdiff
path: root/embassy-macros/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* executor: rename macro crate to embassy-executor-macros, bump it.Dario Nieuwenhuis2023-12-071-175/+0
|
* Update darlingDániel Buga2023-06-251-10/+27
|
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-081-13/+0
| | | | | | | | | | | | - Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`. - Reexport the PAC interrupt enum in `embassy_xx::interrupt`. This has a few advantages: - The `embassy_xx::interrupt` module is now more "standard". - It works with `cortex-m` functions for manipulating interrupts, for example. - It works with RTIC. - the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs. - When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
* cortex-m: remove owned interrupts.Dario Nieuwenhuis2023-06-011-11/+0
|
* Allow for an optional user-defined entry macro when targeting RISC-VJesse Braham2023-05-161-1/+13
|
* refactor: autodetect macro variantUlf Lilleengen2022-11-231-3/+78
| | | | | Export all main macro per target architecture from embassy-macros, and select the appropriate macro in embassy-executor.
* doc: add README to embassy-macroUlf Lilleengen2022-11-221-0/+49
| | | | Documents the main and task macros.
* Run rustfmt.Dario Nieuwenhuis2022-06-121-9/+3
|
* Add embassy-cortex-m crate.Dario Nieuwenhuis2022-06-121-6/+12
| | | | | | - Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`. - Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore) - Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
* macros: cleanup, make work in stable.Dario Nieuwenhuis2022-02-121-515/+19
|
* macros: initialize chip before executor.Dario Nieuwenhuis2022-01-051-4/+2
| | | | | The executor will call into the chip's time-driver, which may need the chip to be initialized.
* Update rust-toolchainUlf Lilleengen2021-12-161-0/+1
|
* Fix interrupt_take macro by specifying path to panic macro.Matous Hybl2021-11-231-2/+6
|
* Fix warning for field never used.Wilfried Chauveau2021-11-211-0/+7
|
* Clippy fixesDario Nieuwenhuis2021-10-181-0/+1
|
* Add WASM support for executorUlf Lilleengen2021-09-131-0/+79
| | | | | | | * Adds an executor for WASM runtimes based on wasm_bindgen. * Add time driver based on JS time handling. * Add example that can run in browser locally. * Update to critical-section version that supports 'std' flag
* Fix embassy::main macros for std targetUlf Lilleengen2021-09-021-3/+1
|
* Improve executor naming. Add docs.Dario Nieuwenhuis2021-08-311-4/+4
|
* embassy-macros: Use `defmt::unwrap!` when spawning `embassy::main`Ben Gamari2021-08-051-1/+1
| | | | But only when `defmt` feature is enabled.
* Forward attributes to generated task functionLiam Murphy2021-08-051-0/+3
| | | | | | | Fixes #18 Syn considers doc comments to be attributes, so forwarding those fixes the issue. It's probably a good idea to forward most attributes anyway.
* Re-adds embassy macros for stm32Ulf Lilleengen2021-05-251-1/+5
| | | | | | * Hook RCC config into chip config and use chip-specific RCC init function * RTC/clock setup is ignored for now
* Mark Unborrow as unsafe to implementDario Nieuwenhuis2021-05-191-1/+1
|
* impl Unborrow for &'a mut TDario Nieuwenhuis2021-05-191-7/+0
| | | | This plays nicer with user code that's generic over peripheral traits like `Instance` or `Pin`.
* Merge branch 'stm32-neo'Dario Nieuwenhuis2021-05-171-1/+1
|\
| * stm32: codegen interruptsDario Nieuwenhuis2021-05-011-5/+68
| |
| * Add Priority enums to embassy-extrasDario Nieuwenhuis2021-05-011-2/+2
| |
* | Add `init` fn. Initializes hw and returns Peripherals.Dario Nieuwenhuis2021-05-171-3/+3
| |
* | Remove stm32.Dario Nieuwenhuis2021-05-171-5/+1
| | | | | | | | stm32 developemnt continues in the `stm32-neo` branch for now.
* | Add `#[interrupt]` macro to register static interrupts.Dario Nieuwenhuis2021-05-171-5/+68
| |
* | nrf: add support for nrf52805, nrf52811, nrf52820Dario Nieuwenhuis2021-05-171-1/+1
| |
* | Pass config directly to chip specific configure functionUlf Lilleengen2021-04-221-13/+25
|/ | | | | | | | | | | | | This removes the need to duplicate the configuration for each individual chip, but will instead pass on the configuration specified in the config attribute. Update nrf, stm32, rp macros with passing the config to a per-chip configure function which assumes the appropriate configuration to be passed to it. To demonstrate this feature, the stm32l0xx clock setup and RTC is added which exposes clock configuration different from stm32f4xx (and has a different set of timers and HAL APIs).
* Rename PeripheralBorrow to UnborrowDario Nieuwenhuis2021-04-141-2/+2
|
* Add embassy_prefix attribute parameter to task and main macrosUlf Lilleengen2021-04-141-10/+45
| | | | | | | This allows crates depending on embassy that wants to use a different module path to do so for the 'task' and 'main' macros, by passing the parameter 'embassy_prefix'. The prefix defaults to '::', which will retain the existing behavior.
* Add std version of embassy::mainUlf Lilleengen2021-04-121-0/+66
|
* Fix unused import warningsDario Nieuwenhuis2021-03-291-6/+2
|
* rp: add initial versionDario Nieuwenhuis2021-03-291-5/+8
|
* Reexport macros at root, use eveywhere as `#[embassy::task]`Dario Nieuwenhuis2021-03-291-1/+1
|
* nrf: add main macro supportDario Nieuwenhuis2021-03-291-43/+17
|
* Code size optimizations.Dario Nieuwenhuis2021-03-291-6/+4
|
* Implement PeripheralBorrow for interrupts.Dario Nieuwenhuis2021-03-291-0/+14
|
* add embassy::main and implement for stm32f4xoviat2021-03-271-0/+117
|
* Add spawn/spawn_pool APIs to TaskDario Nieuwenhuis2021-03-181-1/+1
|
* Move Task into rawDario Nieuwenhuis2021-03-181-3/+4
|
* Do not reexport atomic-polyfillDario Nieuwenhuis2021-03-171-4/+4
|
* thumbv6m support with emulated atomicsDario Nieuwenhuis2021-03-041-4/+4
|
* Cleanup interrupt package naming. Fixes #40Dario Nieuwenhuis2021-02-261-5/+5
| | | | | | | | | The `interrupt` package previously tried to be drop-in compatible with the `interrupt` package from PACs. THis meant that there was both a PAC-style enum value `UARTE0` and an embassy-style owned `UARTE0Interrupt` type. This made things VERY confusing. This drops compatibility with the PAC, improving the names for embassy interrupts.
* Fix macro if user crate is not using feature(const_in_array_repeat_expressions)Dario Nieuwenhuis2021-02-231-1/+2
|
* Update to cortex-m 0.7Dario Nieuwenhuis2021-02-141-3/+3
|
* Get rid of some warningsThales Fragoso2021-02-131-2/+2
|
* Executor API V2.Dario Nieuwenhuis2021-02-021-5/+15
| | | | | - It's no longer possible to call run() reentrantly from within a task (soundness issue) - it's now possible to spawn Send tasks across threads (SendSpawner, #37)