SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
Loading...
Searching...
No Matches
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#ifdef __cplusplus
36extern "C" {
37#endif
38
39#include <stdint.h>
40#include <pbio/error.h>
41#include <pbio/light_matrix.h>
42
54pbio_error_t hub_display_orientation(uint8_t up);
55
67pbio_error_t hub_display_off(void);
68
84pbio_error_t hub_display_pixel(uint8_t row, uint8_t column, uint8_t brightness);
85
97pbio_error_t hub_display_image(uint8_t* image);
98
110pbio_error_t hub_display_number(const int8_t num);
111
123pbio_error_t hub_display_char(const char c);
124
140pbio_error_t hub_display_text(const char* text, uint32_t on, uint32_t off);
141
155pbio_error_t hub_display_text_scroll(const char* text, uint32_t delay);
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif // _HUB_DISPLAY_H_
162
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