SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
display.h
[詳解]
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)
文字列をスクロールしながら表示する.
Definition: display.c:136
pbio_error_t hub_display_text(const char *text, uint32_t on, uint32_t off)
文字列を表示する.1文字ずつ表示し,各文字を表示する間で一定時間消灯する.最後の文字を表示した後は,すべてのピクセルを消灯する.
Definition: display.c:107
pbio_error_t hub_display_number(const int8_t num)
-99〜99の数値を表示する.負の符号(-)は,ディスプレイ中央に薄い点として表現される.
Definition: display.c:54
pbio_error_t hub_display_orientation(uint8_t up)
ハブ内蔵ディスプレイの表示方向を設定する.
Definition: display.c:28
pbio_error_t hub_display_off(void)
すべてのピクセルを消灯する.
Definition: display.c:34
pbio_error_t hub_display_pixel(uint8_t row, uint8_t column, uint8_t brightness)
指定した輝度で,指定したピクセルを点灯する.
Definition: display.c:40
pbio_error_t hub_display_image(uint8_t *image)
イメージ(輝度(0〜100)の行列によって表現)を表示する.
Definition: display.c:47
pbio_error_t hub_display_char(const char c)
1文字または記号を表示する.小文字(a-z),大文字(A-Z)または,!"#$%&'()*+,-./:;<=>?@[]^_`{|}である.
Definition: display.c:101