SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
button.h
[詳解]
1// SPDX-License-Identifier: MIT
2/*
3 * API for the hub built-in button.
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_BUTTON_H_
33#define _HUB_BUTTON_H_
34
35#include <stdint.h>
36#include <pbio/button.h>
37#include <pbio/error.h>
38
46typedef enum _hub_button_t {
47 HUB_BUTTON_LEFT = PBIO_BUTTON_LEFT,
48 HUB_BUTTON_CENTER = PBIO_BUTTON_CENTER,
49 HUB_BUTTON_RIGHT = PBIO_BUTTON_RIGHT,
50 HUB_BUTTON_BT = PBIO_BUTTON_RIGHT_UP,
52
64pbio_error_t hub_button_is_pressed(hub_button_t *pressed);
65
66#endif // _HUB_BUTTON_H_
67
enum _hub_button_t hub_button_t
各ハブ内蔵ボタンのビットマスク値
pbio_error_t hub_button_is_pressed(hub_button_t *pressed)
ハブ内蔵ボタンが押されているか調べる.
Definition: button.c:19
_hub_button_t
各ハブ内蔵ボタンのビットマスク値
Definition: button.h:46