Skip to content

Commit

Permalink
Merge pull request #11 from jucr-io/maxgr0/update-readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
maxgr0 authored Oct 8, 2024
2 parents d23720c + c955b40 commit 9ca7c7f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "firmware-controller"
description = "Controller to centralize interaction with HW in a firmware"
description = "Controller to decouple interactions between components in a no_std environment."
version = "0.1.0"
edition = "2021"
authors = ["JUCR GmbH <engineering@jucr.com>"]

[lib]
proc-macro = true
Expand All @@ -25,7 +26,7 @@ embassy-executor = { git = "https://github.com/jucr-io/embassy/", features = [
"defmt",
"integrated-timers",
] }
embassy-time = { git = "https://github.com/jucr-io/embassy/", features = [
embassy-time = { git = "https://github.com/jucr-io/embassy/", features = [
"defmt",
"defmt-timestamp-uptime",
"tick-hz-32_768",
Expand Down
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# firmware-controller
<div align="center">

This crate provides a macro named `controller` that makes it easy to write controller logic for firmware.
# Firmware Controller

The controller is responsible for control of all the peripherals based on commands it receives
from other parts of the code. It also notifies peers about state changes and events via signals.
This crate provides a macro named `controller` that makes it easy to decouple interactions between
components in a `no_std` environment.

[Intro](#-intro)
[Usage](#-usage)
[Details](#-details)

</div>

# Intro

This crate provides a macro named `controller` that makes it easy to write controller logic for
firmware.

The controller is responsible for control of all the peripherals based on commands it receives from
other parts of the code. It also notifies peers about state changes and events via signals.
This macro generates all the boilerplate code and client-side API for you.

It's best described by an example so let's take example of a very simple firmware that controls an
# Usage

It's best described by an example so let's take example of a very simple firmware that controls an
LED:

```rust,no_run
Expand Down Expand Up @@ -123,6 +139,8 @@ async fn client() {
}
```

# Details

The `controller` macro will generated the following for you:

* A `new` method that takes the fields of the struct as arguments and returns the struct.
Expand Down

0 comments on commit 9ca7c7f

Please sign in to comment.