embassy/examples
bors[bot] 0aa2a9ac27
Merge #1093 #1127
1093: Add random example r=Dirbaio a=miathedev

Thanks Lulf for the help!

This should be added as example so other people can look it up easily.

With love,
Mia



1127: clean up doc comment generation r=Dirbaio a=Weshnaw

I noticed that when I created doc comments for my tasks that the doc comments got included on the inner function but not the outer functions, I personally prefer keeping the documentation as clean as possible so this PR aims to hide the inner function and then add doc comments to the outer function.

The actual changes include:
* adding #[doc(hidden)] onto the `task_inner` function
  * I flip flopped on this one because I could imagine someone may want this in their docs, but decided to include but I think arguments could be made either way
* copy the attributes from `task_inner` to `task_outer`
  * I don't work with proc_macros often so I am not entirely sure if the way I went about it is correct but it seems to work fine
    * specifically: using `parse_quote` to create the `task_outer` as a `ItemFn` then duplicating the attributes from `task_inner` to `task_outer`
  * I also am not sure if it's a good idea to duplicate all attributes over, but I honestly wasn't sure how to just get the just doc comment attributes

![OLD doc](https://user-images.githubusercontent.com/3748858/209456006-bfa6d40d-d3bf-4c1d-a2de-cf40828b58e5.png)
![NEW doc](https://user-images.githubusercontent.com/3748858/209456011-995363a3-f5b1-4ea3-9db9-1c566643efcb.png)


Co-authored-by: miathedev <mia@metzler.systems>
Co-authored-by: Brendon Fallquist <bfallquist@gmail.com>
2023-01-02 23:13:41 +00:00
..
boot feat: embassy-boot for rp2040 2022-12-02 11:28:33 +01:00
nrf net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
nrf-rtos-trace all Cargo.toml: Add license to all crate Cargo.toml files 2022-10-07 12:41:56 +02:00
rp rp: switch to released 0.2.1 pio crate. 2022-12-26 22:30:22 +01:00
std net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
stm32f0 enabled interrupt feature 2022-12-21 11:56:30 +05:30
stm32f1 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32f2 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32f3 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32f4 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32f7 net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
stm32g0 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32g4 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32h7 net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
stm32l0 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32l1 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32l4 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32l5 net: split driver trait to a separate crate. 2022-12-26 04:49:08 +01:00
stm32u5 Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32wb Bump defmt-rtt to 0.4 2022-11-29 21:15:24 +01:00
stm32wl Add random example 2022-12-04 09:38:57 +01:00
wasm all Cargo.toml: Add license to all crate Cargo.toml files 2022-10-07 12:41:56 +02:00