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
//! HAL for the RP2040 microcontroller
//!
//! This is an implementation of the [`embedded-hal`](https://crates.io/crates/embedded-hal)
//! traits for the RP2040 microcontroller
//!
//! NOTE This HAL is still under active development. This API will remain volatile until 1.0.0
//!
//! # Crate features
//!
//! * **chrono** -
//! Modifies some RTC access functions to use chrono types instead of a rp2040-hal specific
//! DateTime type
//! * **critical-section-impl** -
//! critical section that is safe for multicore use
//! * **defmt** -
//! Implement `defmt::Format` for several types.
//! * **disable-intrinsics** -
//! Disable automatic mapping of language features (like floating point math) to ROM functions
//! * **eh1_0_alpha** -
//! Support alpha release of embedded-hal
//! * **rom-func-cache** -
//! Memoize(cache) ROM function pointers on first use to improve performance
//! * **rt** -
//! Minimal startup / runtime for Cortex-M microcontrollers
//! * **rom-v2-intrinsics** -
//! This enables ROM functions for f64 math that were not present in the earliest RP2040s
//! * **rp2040-e5** -
//! This enables a fix for USB errata 5: USB device fails to exit RESET state on busy USB bus.
//! Only required for RP2040 B0 and RP2040 B1, but it also works for RP2040 B2 and above
//! * **rtic-monotonic** -
//! Implement
//! `rtic_monotonic::Monotonic` based on the RP2040 timer peripheral
extern crate cortex_m;
extern crate embedded_hal as hal;
extern crate nb;
pub use paste;
pub extern crate rp2040_pac as pac;
pub
// Provide access to common datastructures to avoid repeating ourselves
pub use Adc;
pub use Clock;
pub use I2C;
/// Attribute to declare the entry point of the program
///
/// This is based on and can be used like the [entry attribute from
/// cortex-m-rt](https://docs.rs/cortex-m-rt/latest/cortex_m_rt/attr.entry.html).
///
/// It extends that macro with code to unlock all spinlocks at the beginning
/// of `main`. As spinlocks are not automatically unlocked on software resets,
/// this can prevent unexpected deadlocks when running from a debugger.
pub use entry;
pub use Sio;
pub use Spi;
pub use Timer;
pub use Watchdog;