libws
libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
keypad.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Adrian "asie" Siekierka
3
*
4
* This software is provided 'as-is', without any express or implied
5
* warranty. In no event will the authors be held liable for any damages
6
* arising from the use of this software.
7
*
8
* Permission is granted to anyone to use this software for any purpose,
9
* including commercial applications, and to alter it and redistribute it
10
* freely, subject to the following restrictions:
11
*
12
* 1. The origin of this software must not be misrepresented; you must not
13
* claim that you wrote the original software. If you use this software
14
* in a product, an acknowledgment in the product documentation would be
15
* appreciated but is not required.
16
*
17
* 2. Altered source versions must be plainly marked as such, and must not be
18
* misrepresented as being the original software.
19
*
20
* 3. This notice may not be removed or altered from any source distribution.
21
*/
22
26
27
#ifndef LIBWS_KEYPAD_H_
28
#define LIBWS_KEYPAD_H_
29
34
35
#define WS_KEY_Y4 0x0800
36
#define WS_KEY_Y3 0x0400
37
#define WS_KEY_Y2 0x0200
38
#define WS_KEY_Y1 0x0100
39
#define WS_KEY_X4 0x0080
40
#define WS_KEY_X3 0x0040
41
#define WS_KEY_X2 0x0020
42
#define WS_KEY_X1 0x0010
43
#define WS_KEY_B 0x0008
44
#define WS_KEY_A 0x0004
45
#define WS_KEY_START 0x0002
46
47
#define WS_KEY_PCV2_PASS 0x0800
48
#define WS_KEY_PCV2_CIRCLE 0x0400
49
#define WS_KEY_PCV2_CLEAR 0x0100
50
#define WS_KEY_PCV2_RIGHT 0x0080
51
#define WS_KEY_PCV2_ESC 0x0040
52
#define WS_KEY_PCV2_VIEW 0x0010
53
#define WS_KEY_PCV2_UP 0x0008
54
#define WS_KEY_PCV2_DOWN 0x0004
55
#define WS_KEY_PCV2_LEFT 0x0001
56
57
#ifndef __ASSEMBLER__
58
59
#include <stdint.h>
60
66
__attribute__
((no_assume_ds_data, no_assume_ss_data))
67
uint16_t ws_keypad_scan(
void
);
68
70
71
#endif
/* __ASSEMBLER__ */
72
73
#endif
/* LIBWS_KEYPAD_H_ */
__attribute__
__attribute__((no_assume_ds_data, no_assume_ss_data)) uint16_t ws_keypad_scan(void)
Query the current state of the keypad.
include
ws
keypad.h
Generated by
1.14.0