|
1 | | -# Supported Devices |
| 1 | +# Supported devices |
2 | 2 |
|
3 | 3 | This document outlines the supported display devices for the `mcu-renderer` library, including initialization instructions and configuration details for each. |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | 7 | The `mcu-renderer` library supports multiple display types, including SDL for PC-based testing and hardware displays like ST7789, ILI9341, and ST7565. Each display requires specific initialization functions and configurations, detailed below. Ensure you include the appropriate header file and define necessary preprocessor symbols for your target display. |
8 | 8 |
|
9 | | -## SDL (PC Testing) |
| 9 | +## SDL (PC testing) |
10 | 10 |
|
11 | 11 | The SDL backend is ideal for testing graphics output on a PC, simulating various display types. |
12 | 12 |
|
@@ -81,7 +81,7 @@ void mr_st7789_init(mr_t *mr, |
81 | 81 | - `send_callback`: Sends 8-bit data to the display. |
82 | 82 | - `send16_callback`: Sends 16-bit data to the display. |
83 | 83 |
|
84 | | -#### Post-Initialization |
| 84 | +#### Post-initialization |
85 | 85 | The initialization is minimal. Send a custom initialization sequence using `mr_send_sequence()` after calling `mr_st7789_init()`. |
86 | 86 |
|
87 | 87 | #### Example |
@@ -150,24 +150,24 @@ void mr_st7565_init(mr_t *mr, |
150 | 150 | - `set_command_callback`: Sets the command/data line (DCX, DC, or A0). |
151 | 151 | - `send_callback`: Sends 8-bit data to the display. |
152 | 152 |
|
153 | | -#### Post-Initialization |
| 153 | +#### Post-initialization |
154 | 154 | Send a custom initialization sequence using `mr_send_sequence()` after calling `mr_st7565_init()`. |
155 | 155 |
|
156 | 156 | #### Example |
157 | 157 | ```c |
158 | 158 | uint8_t framebuffer[1024]; // For 128x64 display |
159 | 159 | mr_st7565_init(&mr, 128, 64, MR_ROTATION_0, framebuffer, |
160 | 160 | sleep_ms, set_reset, set_cs, set_dc, send_8bit); |
161 | | -mr_send_sequence(&mr, st7565_init_sequence, sizeof(st7565_init_sequence)); |
| 161 | +mr_send_sequence(&mr, st7565_init_sequence); |
162 | 162 | ``` |
163 | 163 |
|
164 | 164 | ## Best Practices |
165 | | -- **Framebuffer Sizing**: Ensure framebuffers meet minimum size requirements to avoid rendering issues. |
166 | | -- **Custom Initialization**: Always follow initialization calls with `mr_send_sequence()` to configure the display properly. |
167 | | -- **Callback Implementation**: Implement callbacks carefully, ensuring they interact correctly with your hardware's GPIO and communication protocols. |
| 165 | +- **Framebuffer sizing**: Ensure framebuffers meet minimum size requirements to avoid rendering issues. |
| 166 | +- **Custom initialization**: Always follow initialization calls with `mr_send_sequence()` to configure the display properly. |
| 167 | +- **Callback implementation**: Implement callbacks carefully, ensuring they interact correctly with your hardware's GPIO and communication protocols. |
168 | 168 | - **Testing with SDL**: Use the SDL backend to validate rendering logic before deploying to hardware. |
169 | 169 |
|
170 | 170 | ## Troubleshooting |
171 | | -- **Text Not Rendering (ST7789/ILI9341)**: Verify that `textbuffer` is large enough. |
172 | | -- **Display Not Responding**: Check callback implementations and ensure the initialization sequence is correct. |
173 | | -- **SDL Window Issues**: Confirm the `MCURENDERER_SDL` symbol is defined and SDL libraries are linked. |
| 171 | +- **Text not rendering (ST7789/ILI9341)**: Verify that `textbuffer` is large enough. |
| 172 | +- **Display not responding**: Check callback implementations and ensure the initialization sequence is correct. |
| 173 | +- **SDL window issues**: Confirm the `MCURENDERER_SDL` symbol is defined and SDL libraries are linked. |
0 commit comments