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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! Rust `no_std`, `embedded_hal` board support package for the Electro-Smith Daisy platform.
//!
//! * [Documentation](https://zlosynth.com/daisy)
//! * [Crate (crates.io)](https://crates.io/crates/daisy)
//! * [Repository (github.com)](https://github.com/zlosynth/daisy)
//!
//! # Supported boards
//!
//! Currently this library supports following boards:
//!
//! * [Daisy Seed](https://www.electro-smith.com/daisy/daisy) (codec AK4556), `seed`
//! * [Daisy Seed 1.1](https://www.electro-smith.com/daisy/daisy) (codec WM8731), `seed_1_1`
//! * [Daisy Seed 1.2](https://www.electro-smith.com/daisy/daisy) (codec PCM3060), `seed_1_2`
//! * [Daisy Patch SM](https://www.electro-smith.com/daisy/patch-sm) (codec PCM3060), `patch_sm`
//!
//! Select the board by using its respective feature.
//!
//! # Sampling rate
//!
//! By default, the audio sampling rate is set to 48 kHz. This can be increased to
//! 96 kHz by enabling the `sampling_rate_96khz` feature.
//!
//! # Block length
//!
//! By default, the audio block length is 32 frames. This can be increased to 64
//! by enabling the `block_length_64` feature.
//!
//! # API stability
//!
//! I am still trying to figure out a good API for the project. Expect it to change.
//! To mitigate breakage of your code on library update, use macros defined under
//! `board.rs` to initialize resources whenever possible.
//!
//! # HAL compatibility
//!
//! This library is closely tied to [stm32h7xx-hal](https://github.com/stm32-rs/stm32h7xx-hal/).
//! Make sure to use compatible versions in your `Cargo.toml`.
//!
//! | **Daisy** | **HAL** |
//! |-------------|---------|
//! | `0.10` | `0.16` |
//! | `0.9` | `0.15` |
//! | `0.8` | `0.14` |
//! | `0.2`-`0.7` | `0.12` |
//! | `0.1` | `0.11` |
//!
//! # Usage
//!
//! See the [examples/](https://github.com/zlosynth/daisy/tree/main/examples)
//! directory to find usage examples:
//!
//! * [ADC](https://github.com/zlosynth/daisy/blob/main/examples/adc.rs)
//! * [Audio](https://github.com/zlosynth/daisy/blob/main/examples/audio.rs)
//! * [Audio with RTIC](https://github.com/zlosynth/daisy/blob/main/examples/audio_rtic.rs)
//! * [Blinky](https://github.com/zlosynth/daisy/blob/main/examples/blinky.rs)
//! * [Blinky with RTIC](https://github.com/zlosynth/daisy/blob/main/examples/blinky_rtic.rs)
//! * [Flash storage](https://github.com/zlosynth/daisy/blob/main/examples/flash.rs)
//! * [OLED display](https://github.com/zlosynth/daisy/blob/main/examples/oled.rs)
//! * [SDRAM memory](https://github.com/zlosynth/daisy/blob/main/examples/sdram.rs)
//! * [SD card](https://github.com/zlosynth/daisy/blob/main/examples/sdmmc.rs)
//!
//! ``` sh
//! make flash-dfu WHAT=blinky BOARD=seed_1_1
//! ```
compile_error!;
compile_error!;
compile_error!;
compile_error!;
compile_error!;
pub use Board;
pub use pac;
// Re-exported so it can be used from daisy macros.
pub use stm32h7xx_hal as hal;