|
47 | 47 | //! The [`Render`] trait defines the interface that an image-like type needs
|
48 | 48 | //! to provide in order to be displayed.
|
49 | 49 | //!
|
50 |
| -//! It contains a single function: [`brightness_at(x, |
51 |
| -//! y)`][display::Render::brightness_at], returning a brightness level. |
| 50 | +//! It contains a single function: [`brightness_at(x, y)`](Render::brightness_at), |
| 51 | +//! returning a brightness level. |
52 | 52 | //!
|
53 | 53 | //! The [`image`] submodule provides two static image types implementing
|
54 | 54 | //! `Render`:
|
|
77 | 77 | //!
|
78 | 78 | //! # Timer integration
|
79 | 79 | //!
|
80 |
| -//! The `Display` expects to control a single timer. It can use the |
| 80 | +//! The [`Display`] expects to control a single timer. It can use the |
81 | 81 | //! micro:bit's `TIMER0`, `TIMER1`, or `TIMER2`.
|
82 | 82 | //!
|
83 | 83 | //! This uses a 6ms period to light each of the three internal LED rows, so
|
|
100 | 100 | //! When your program starts:
|
101 | 101 | //! * create a [`MicrobitDisplayTimer`] struct, passing the timer you chose to
|
102 | 102 | //! [`MicrobitDisplayTimer::new()`]
|
103 |
| -//! * call [`initialise_display()`], passing it the `MicrobitDisplayTimer` and |
104 |
| -//! the gpio peripheral |
| 103 | +//! * call [`initialise_display()`], passing it the `MicrobitDisplayTimer` and the |
| 104 | +//! [`crate::led::Pins`] |
105 | 105 | //! * create a [`Display`] struct (a `Display<MicrobitFrame>`).
|
106 | 106 | //!
|
107 | 107 | //! In an interrupt handler for the timer, call [`handle_display_event()`].
|
108 | 108 | //!
|
109 | 109 | //! To change what's displayed: create a [`MicrobitFrame`] instance, use
|
110 |
| -//! [`.set()`](`display::Frame::set()`) to put an image (something implementing |
| 110 | +//! [`.set()`](`Frame::set()`) to put an image (something implementing |
111 | 111 | //! [`Render`]) in it, then call [`Display::set_frame()`]. Note you'll have to
|
112 | 112 | //! `use microbit::display::Frame` to make `set()` available.
|
113 | 113 | //!
|
|
121 | 121 | //!
|
122 | 122 | //! [dal]: https://lancaster-university.github.io/microbit-docs/
|
123 | 123 | //! [micropython]: https://microbit-micropython.readthedocs.io/
|
124 |
| -//! |
125 |
| -//! [`BitImage`]: display::image::BitImage |
126 |
| -//! [`Display`]: display::Display |
127 |
| -//! [`Display::set_frame()`]: display::Display::set_frame |
128 |
| -//! [`Frame`]: display::Frame |
129 |
| -//! [`Matrix`]: display::Matrix |
130 |
| -//! [`MicrobitFrame`]: display::MicrobitFrame |
131 |
| -//! [`MicrobitDisplayTimer`]: display::MicrobitDisplayTimer |
132 |
| -//! [`MicrobitDisplayTimer::new()`]: display::MicrobitDisplayTimer::new |
133 |
| -//! [`Render`]: display::Render |
134 |
| -//! [`image`]: display::image |
135 |
| -//! [`handle_display_event()`]: display::handle_display_event |
136 |
| -//! [`initialise_display()`]: display::initialise_display |
137 |
| -//! [`DisplayTimer`]: tiny_led_matrix::DisplayTimer |
138 |
| -//! [`GreyscaleImage`]: display::image::GreyscaleImage |
139 |
| -//! |
140 | 124 |
|
141 | 125 | #[doc(no_inline)]
|
142 | 126 | pub use tiny_led_matrix::{Display, Frame, Render, MAX_BRIGHTNESS};
|
|
0 commit comments