aboutsummaryrefslogtreecommitdiff
path: root/embassy-macros/src
Commit message (Collapse)AuthorAgeFilesLines
* Allow arbitrary expressions as pool_sizeDániel Buga2023-06-251-9/+9
|
* Update darlingDániel Buga2023-06-253-16/+35
|
* 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
|
* 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-232-50/+129
| | | | | Export all main macro per target architecture from embassy-macros, and select the appropriate macro in embassy-executor.
* Merge #1054bors[bot]2022-11-231-2/+13
|\ | | | | | | | | | | | | | | | | | | 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-101-2/+13
| |
* | doc: add README to embassy-macroUlf Lilleengen2022-11-221-0/+49
|/ | | | Documents the main and task macros.
* Ensure interrupt::take works without embassy-executorUlf Lilleengen2022-08-251-6/+21
| | | | | | 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-195-117/+24
|\
| * Split embassy-time from embassy-executor.Dario Nieuwenhuis2022-08-182-6/+6
| |
| * Remove HAL initialization from #[embassy::main] macro.Dario Nieuwenhuis2022-08-171-49/+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
|
* 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
|
* 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.
* time: replace dyn clock/alarm with a global Driver traitDario Nieuwenhuis2021-08-053-38/+0
|