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
27
#ifndef __WF_LIBWS_KEYPAD_H__
28
#define __WF_LIBWS_KEYPAD_H__
29
30
#include <stdint.h>
31
42
__attribute__
((no_assume_ds_data, no_assume_ss_data))
43
uint16_t ws_keypad_scan(
void
);
44
45
#define KEY_Y4 0x0800
46
#define KEY_Y3 0x0400
47
#define KEY_Y2 0x0200
48
#define KEY_Y1 0x0100
49
#define KEY_X4 0x0080
50
#define KEY_X3 0x0040
51
#define KEY_X2 0x0020
52
#define KEY_X1 0x0010
53
#define KEY_B 0x0008
54
#define KEY_A 0x0004
55
#define KEY_START 0x0002
56
57
#define KEY_PCV2_PASS 0x0800
58
#define KEY_PCV2_CIRCLE 0x0400
59
#define KEY_PCV2_CLEAR 0x0100
60
#define KEY_PCV2_RIGHT 0x0080
61
#define KEY_PCV2_ESC 0x0040
62
#define KEY_PCV2_VIEW 0x0010
63
#define KEY_PCV2_UP 0x0008
64
#define KEY_PCV2_DOWN 0x0004
65
#define KEY_PCV2_LEFT 0x0001
66
69
#endif
/* __WF_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.12.0