SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
display.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2/*
3 * API for the hub built-in display.
4 *
5 * Copyright (c) 2022 Embedded and Real-Time Systems Laboratory,
6 * Graduate School of Information Science, Nagoya Univ., JAPAN
7 */
8
32#ifndef _HUB_DISPLAY_H_
33#define _HUB_DISPLAY_H_
34
35#include <stdint.h>
36#include <pbio/error.h>
37#include <pbio/light_matrix.h>
38
50pbio_error_t hub_display_orientation(uint8_t up);
51
63pbio_error_t hub_display_off(void);
64
80pbio_error_t hub_display_pixel(uint8_t row, uint8_t column, uint8_t brightness);
81
93pbio_error_t hub_display_image(uint8_t* image);
94
106pbio_error_t hub_display_number(const int8_t num);
107
119pbio_error_t hub_display_char(const char c);
120
136pbio_error_t hub_display_text(const char* text, uint32_t on, uint32_t off);
137
151pbio_error_t hub_display_text_scroll(const char* text, uint32_t delay);
152
153#endif // _HUB_DISPLAY_H_
154
pbio_error_t hub_display_text_scroll(const char *text, uint32_t delay)
Displays a text string in scroll mode.
Definition: display.c:136
pbio_error_t hub_display_text(const char *text, uint32_t on, uint32_t off)
Displays a text string, one character at a time, with a pause between each character....
Definition: display.c:107
pbio_error_t hub_display_number(const int8_t num)
Displays a number in the range -99 to 99. A minus sign (-) is shown as a faint dot in the center of t...
Definition: display.c:54
pbio_error_t hub_display_orientation(uint8_t up)
Sets the orientation of the light matrix display.
Definition: display.c:28
pbio_error_t hub_display_off(void)
Turns off all the pixels.
Definition: display.c:34
pbio_error_t hub_display_pixel(uint8_t row, uint8_t column, uint8_t brightness)
Turns on one pixel at the specified brightness.
Definition: display.c:40
pbio_error_t hub_display_image(uint8_t *image)
 Displays an image, represented by a matrix of brightness: % values.
Definition: display.c:47
pbio_error_t hub_display_char(const char c)
Displays a character or symbol on the light grid. This may be any letter (a–z), capital letter (A–Z) ...
Definition: display.c:101