You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/oled/frame/frame.c
+45-31Lines changed: 45 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -198,49 +198,63 @@ void frame_init(void)
198
198
/**
199
199
* @brief Renders a text string on the OLED display at a specified position.
200
200
*
201
-
* This function draws the given null-terminated string starting at the coordinates specified by `position`. It calculates affected display pages based on character height and handles multi-page rendering for characters that span page boundaries. For each character in the string, the corresponding font bitmap is fetched and individual bytes are combined with the optional background pattern (if enabled) to preserve display background beneath the text. Bit-shifting is applied to properly align the character pixels vertically on partial pages. The function outputs the composed columns of pixel data to the OLED display using the lower-level `oled_column` function.
201
+
* This function draws the given null-terminated string starting at the coordinates specified by `position`. It calculates affected display pages based on the character height and handles multi-page rendering for characters that span page boundaries. For each character in the string, the corresponding font bitmap is fetched and individual bytes are combined with the optional background pattern (if enabled) to preserve display background beneath the text. Bit-shifting is applied to properly align the character pixels vertically on partial pages. The function outputs the composed columns of pixel data to the OLED display using the lower-level `oled_column` function.
202
202
*
203
203
* @param text Pointer to the null-terminated string to be drawn.
204
204
* @param position The starting position (x, y) on the display for the text.
* @brief Renders a single character on the OLED display at a specified position.
221
+
*
222
+
* This function draws a character bitmap starting at the coordinates specified by `position`. It determines which display pages are affected based on the font height and divides the character rendering across multiple OLED memory pages if necessary. For each column of the character, the corresponding font data is fetched from the font table and optionally combined with a predefined background buffer (if enabled). Bit shifting is applied to align the character correctly on display pages that do not align with the character boundaries. The final pixel data for each column is sent to the OLED driver via the `oled_column` function.
223
+
*
224
+
* @param character The ASCII character to be drawn.
225
+
* @param position The starting position (x, y) on the display for the character.
0 commit comments