1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Board support for the **M5Stack Cardputer ADV** (ESP32-S3FN8, Stamp-S3A).
//!
//! ```ignore
//! #[esp_rtos::main]
//! async fn main(_spawner: Spawner) -> ! {
//! let board = oxstack_cardputer::init(oxstack_cardputer::default_config());
//! let i2c = board.sys_i2c.into_bus();
//! let mut keyboard = board.keyboard.init(i2c).await.unwrap();
//! let mut display = board.display.init().await.unwrap();
//! let fb = oxstack_cardputer::display::framebuffer();
//! loop {
//! let ev = keyboard.next_event().await.unwrap();
//! // draw into `fb`, then:
//! display.flush(fb).await.unwrap();
//! }
//! }
//! ```
//!
//! # Model
//!
//! [`Board`] splits the chip's peripherals into one resource group per
//! board function, such as `display`, `keyboard` or `sd`. Each group owns
//! exactly the pins and peripherals that function is wired to, so ownership
//! rules out two drivers fighting over a pin. Every group has an `init`
//! that returns a ready driver; groups you never `init` cost nothing, and
//! you can always destructure a group and drive the raw pins yourself.
pub use *;
pub use oxstack_audio as dsp;
pub use oxstack_gfx as gfx;
pub use oxstack_input as input;
/// Initialises the chip, starts the `esp-rtos` scheduler (required for
/// Embassy timers), and returns the board. With the `radio` feature it also
/// adds the reclaimed-RAM heap that `esp-radio` needs.
///
/// Use [`Board::new`] instead to keep control of the timer and software
/// interrupt the scheduler would otherwise claim.
/// The configuration [`init`] should normally be given: CPU at 240 MHz.