aboutsummaryrefslogtreecommitdiff
path: root/embassy-macros/src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* 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.
* rp/timer: addDario Nieuwenhuis2021-07-121-0/+6
|
* STM: Change embassy main to use TIM3 instead of TIM2Thales Fragoso2021-07-041-2/+2
|
* Provide a way for a peripheral to query its clock frequencyUlf Lilleengen2021-06-141-3/+1
| | | | | | Currently this looks up the frequency in the global singleton that must be initialized by the per-chip RCC implementation. At present, this is only done for the L0 family of chips.
* Enable timer clock in RCC on timer startUlf Lilleengen2021-06-101-1/+4
| | | | | | | | | * Moves the tim2-specific code into macro which always uses TIM2 * For peripherals without clock specified, attempt to locate enable and reset registers in the RCC block matching the peripheral name. This could be useful for peripherals where deducing the clock name might not be feasible, but it remains to be tested with more chip families to see if it is sufficiently accurate.
* Assume tim2 in macro and remove clock setup in chip specific rcc initUlf Lilleengen2021-05-261-2/+6
| | | | | Add temporary start_tim2() fn to Clock to assist macro in starting embassy clock
* Remove debug codeUlf Lilleengen2021-05-261-7/+0
|
* Enable clock by default for stm32l0Ulf Lilleengen2021-05-262-9/+13
| | | | | | | | | | Modify init function to return a Clock instance defined by a per-chip SystemClock type and use this in macro setup A proof of concept implementation for STM32 L0 chips. This allows using embassy::main macros for STM32 devices that have the clock setup logic.
* Re-adds embassy macros for stm32Ulf Lilleengen2021-05-252-1/+31
| | | | | | * 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-173-5/+5
| |
* | Remove stm32.Dario Nieuwenhuis2021-05-172-33/+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-224-119/+42
|/ | | | | | | | | | | | | 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-145-29/+122
| | | | | | | 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-292-9/+4
|
* rp: add initial versionDario Nieuwenhuis2021-03-294-5/+26
|
* stm32: use embassy::main in more placesxoviat2021-03-291-0/+6
|
* Reexport macros at root, use eveywhere as `#[embassy::task]`Dario Nieuwenhuis2021-03-291-1/+1
|
* nrf: add main macro supportDario Nieuwenhuis2021-03-293-43/+130
|
* 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)
* Fix IRQ numbersTimo Kröger2021-01-171-1/+3
| | | | | The raw enum values are not always equal to the interrupt number fixes #23
* Add "context" pointer to owned interrupt handlers.Dario Nieuwenhuis2021-01-041-7/+8
|
* Fix warnings for tasks that take mutable parametersTimo Kröger2020-12-311-4/+7
| | | | | | | #[task] pub async fn run(mut param: Param) {} warning: variable does not need to be mutable
* Remove use of deprecated compare_and_swap.Dario Nieuwenhuis2020-12-301-1/+1
|
* WIP owned irqsDario Nieuwenhuis2020-12-291-0/+62
|
* Allow spawning tasks with non-copy args.Dario Nieuwenhuis2020-11-031-1/+1
|
* task codegen: use local items instead of non-locals with prefixed names.Dario Nieuwenhuis2020-10-311-19/+5
|
* integrate static-executor, cleanup time module.Dario Nieuwenhuis2020-10-191-0/+114