aboutsummaryrefslogtreecommitdiff
path: root/embassy-macros
Commit message (Collapse)AuthorAgeFilesLines
* executor: rename macro crate to embassy-executor-macros, bump it.Dario Nieuwenhuis2023-12-078-548/+0
|
* executor: add support for main/task macros in stable (allocates tasks in an ↵Dario Nieuwenhuis2023-11-242-1/+11
| | | | arena)
* executor: Remove non-functional rtos-trace-interrupt.Dario Nieuwenhuis2023-11-241-3/+1
|
* Upgrade static-cell to v2.0Dario Nieuwenhuis2023-11-021-2/+1
|
* Prepare executor and macros for release (#1825)Dániel Buga2023-08-251-1/+1
| | | | | * Set release date, bump macros version * Add pool_size change to changelog
* Allow arbitrary expressions as pool_sizeDániel Buga2023-06-251-9/+9
|
* Update darlingDániel Buga2023-06-254-18/+37
|
* Make interrupt module more standard.Dario Nieuwenhuis2023-06-084-102/+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-014-86/+4
|
* Allow for an optional user-defined entry macro when targeting RISC-VJesse Braham2023-05-162-5/+31
|
* Bump versions preparing for -macros and -executor releaseUlf Lilleengen2023-04-271-1/+1
|
* executor: unify export mod.Dario Nieuwenhuis2023-04-031-2/+2
|
* macros/main: copy fn return to task.Dario Nieuwenhuis2023-03-081-1/+2
| | | | | | | | | | This prevents this bad code from compiling. ```rust async fn main(_spawner: Spawner) -> ! { // not really noreturn! } ```
* macros: better validation of function signatures.Dario Nieuwenhuis2023-03-082-1/+43
| | | | Fixes #1266
* cortex-m: rename Handler to DynHandler.Dario Nieuwenhuis2023-03-062-3/+3
| | | | I want to use the name Handler for the new interrupt binding macro.
* nrf: docs.Dario Nieuwenhuis2023-02-011-0/+3
|
* Hide doc comments from inner function include doc comments on outer functionBrendon Fallquist2022-12-241-5/+13
|
* refactor: autodetect macro variantUlf Lilleengen2022-11-233-54/+129
| | | | | Export all main macro per target architecture from embassy-macros, and select the appropriate macro in embassy-executor.
* Merge #1054bors[bot]2022-11-232-2/+14
|\ | | | | | | | | | | | | | | | | | | 1054: riscv fixes r=lulf a=swolix With these changes I can run embassy on our RISC-V processor, please consider merging this, feedback is very welcome. I don't fully understand the code in the executor, but I have implemented a critical section by globally disabling interrupts, which means the wfi inside the critical section will hang the whole thing. Co-authored-by: Sijmen Woutersen <[email protected]>
| * riscv supportSijmen Woutersen2022-11-102-2/+14
| |
* | doc: update cargo manifests with keywordsUlf Lilleengen2022-11-221-0/+7
| |
* | doc: add README to embassy-macroUlf Lilleengen2022-11-222-0/+70
|/ | | | Documents the main and task macros.
* all Cargo.toml: Add license to all crate Cargo.toml fileschrysn2022-10-071-0/+1
| | | | Closes: https://github.com/embassy-rs/embassy/issues/1002
* Ensure interrupt::take works without embassy-executorUlf Lilleengen2022-08-252-6/+24
| | | | | | Add "rtos-trace-interrupt" feature flag on embassy-macros and enable it for embassy-executor, to ensure that the interrupt::take! macro can be used without depending on embassy-executor.
* Remove Forever, switch to static_cell.Dario Nieuwenhuis2022-08-221-2/+2
|
* Merge branch 'master' of https://github.com/embassy-rs/embassy into rtos-traceQuentin Smith2022-08-196-120/+24
|\
| * Split embassy-time from embassy-executor.Dario Nieuwenhuis2022-08-182-6/+6
| |
| * Remove HAL initialization from #[embassy::main] macro.Dario Nieuwenhuis2022-08-172-52/+13
| |
| * macros: remove embassy_prefix attr.Dario Nieuwenhuis2022-08-174-83/+26
| | | | | | | | | | | | | | This was used in the past for reexporting the macros from drogue-device, which is no longer using it. Also, it is a pain to support, so we don't want it.
| * macros/interrupt_take: do not assume embassy-executor is a dependency of the ↵Dario Nieuwenhuis2022-08-171-4/+4
| | | | | | | | user crate.
* | Add separate feature flag to enable interrupt tracingQuentin Smith2022-08-161-2/+2
| |
* | Add support for rtos-trace behind a feature flagQuentin Smith2022-08-101-1/+7
|/
* Split embassy crate into embassy-executor, embassy-util.Dario Nieuwenhuis2022-07-293-7/+7
|
* Rename Unborrowed -> PeripheralRef, Unborrow -> PeripheralDario Nieuwenhuis2022-07-231-1/+1
|
* Rename unsafe_impl_unborrow to impl_unborrowDario Nieuwenhuis2022-07-231-1/+1
|
* Reuse unsafe_impl_unborrow in other macros.Dario Nieuwenhuis2022-07-231-9/+1
|
* WIP: Make unborrow safe to useGrant Miller2022-07-231-2/+5
|
* Remove the authors field from Cargo.tomlsDario Nieuwenhuis2022-06-181-1/+0
| | | | | | | | | | | It currently contains whoever was first to write some code for the crate, even if many more people have contributed to it later. The field is "sort of" deprecated, it was made optional recently: https://rust-lang.github.io/rfcs/3052-optional-authors-field.html Due the the reasons listed there I believe removing it is better than setting it to generic fluff like "The Embassy contributors".
* Update to 2021 edition. (#820)Dario Nieuwenhuis2022-06-181-1/+1
|
* Run rustfmt.Dario Nieuwenhuis2022-06-125-26/+15
|
* Add embassy-cortex-m crate.Dario Nieuwenhuis2022-06-125-15/+20
| | | | | | - 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`.
* Merge #742bors[bot]2022-04-291-1/+1
|\ | | | | | | | | | | | | | | 742: Only 1 argument in embassy::main when there is no HAL r=Dirbaio a=jbeaurivage There is a slight mistake in an error message from `[embassy::main]` macro. When there is no HAL specified, `main` should take only one argument. Co-authored-by: Justin Beaurivage <[email protected]>
| * Require 1 argument in embassy::main without HALJustin Beaurivage2022-04-291-1/+1
| |
* | executor: "send-spawn is OK if the args are Send" only holds for async fn ↵Dario Nieuwenhuis2022-04-271-1/+1
| | | | | | | | | | | | | | | | futures. The normal `spawn()` methods can be called directly by the user, with arbitrary hand-implemented futures. We can't enforce they're only called with `async fn` futures. Therefore, make these require `F: Send`, and add a "private" one only for use in the macro, which can enforce it.
* | executor: make send-spawning only require the task args to be Send, not the ↵Dario Nieuwenhuis2022-04-271-17/+4
| | | | | | | | whole future.
* | executor: add raw::TaskPool.Dario Nieuwenhuis2022-04-271-6/+3
| | | | | | | | This simplifies the macro code a bit.
* | macros: simplify task macro using "TAIT laundering".Dario Nieuwenhuis2022-04-261-17/+14
| |
* | macros: isolate the TAIT into its own mod.Dario Nieuwenhuis2022-04-251-34/+33
|/ | | | | This fixes type inference issues due to the TAIT's defining scope being the whole parent mod.
* Update Rust nightly.Dario Nieuwenhuis2022-04-241-8/+22
| | | | | | | | | Fixes a new opaque type error in the task macro. Full error is "opaque type's hidden type cannot be another opaque type from the same scope". This got disallwed by the lazy-TAIT PR: https://github.com/rust-lang/rust/pull/94081 Sadly there's now some weird type inference errors with pre-lazy-TAIT nightlies, so support for those is dropped.
* macros: cleanup, make work in stable.Dario Nieuwenhuis2022-02-1213-547/+462
|