libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Functions - Keypad

Macros

#define KEY_Y4   0x0800
 
#define KEY_Y3   0x0400
 
#define KEY_Y2   0x0200
 
#define KEY_Y1   0x0100
 
#define KEY_X4   0x0080
 
#define KEY_X3   0x0040
 
#define KEY_X2   0x0020
 
#define KEY_X1   0x0010
 
#define KEY_B   0x0008
 
#define KEY_A   0x0004
 
#define KEY_START   0x0002
 
#define KEY_PCV2_PASS   0x0800
 
#define KEY_PCV2_CIRCLE   0x0400
 
#define KEY_PCV2_CLEAR   0x0100
 
#define KEY_PCV2_RIGHT   0x0080
 
#define KEY_PCV2_ESC   0x0040
 
#define KEY_PCV2_VIEW   0x0010
 
#define KEY_PCV2_UP   0x0008
 
#define KEY_PCV2_DOWN   0x0004
 
#define KEY_PCV2_LEFT   0x0001
 

Functions

 __attribute__ ((no_assume_ds_data, no_assume_ss_data)) uint16_t ws_keypad_scan(void)
 Query the current state of the keypad.
 

Detailed Description

Macro Definition Documentation

◆ KEY_A

#define KEY_A   0x0004

Definition at line 54 of file keypad.h.

◆ KEY_B

#define KEY_B   0x0008

Definition at line 53 of file keypad.h.

◆ KEY_PCV2_CIRCLE

#define KEY_PCV2_CIRCLE   0x0400

Definition at line 58 of file keypad.h.

◆ KEY_PCV2_CLEAR

#define KEY_PCV2_CLEAR   0x0100

Definition at line 59 of file keypad.h.

◆ KEY_PCV2_DOWN

#define KEY_PCV2_DOWN   0x0004

Definition at line 64 of file keypad.h.

◆ KEY_PCV2_ESC

#define KEY_PCV2_ESC   0x0040

Definition at line 61 of file keypad.h.

◆ KEY_PCV2_LEFT

#define KEY_PCV2_LEFT   0x0001

Definition at line 65 of file keypad.h.

◆ KEY_PCV2_PASS

#define KEY_PCV2_PASS   0x0800

Definition at line 57 of file keypad.h.

◆ KEY_PCV2_RIGHT

#define KEY_PCV2_RIGHT   0x0080

Definition at line 60 of file keypad.h.

◆ KEY_PCV2_UP

#define KEY_PCV2_UP   0x0008

Definition at line 63 of file keypad.h.

◆ KEY_PCV2_VIEW

#define KEY_PCV2_VIEW   0x0010

Definition at line 62 of file keypad.h.

◆ KEY_START

#define KEY_START   0x0002

Definition at line 55 of file keypad.h.

◆ KEY_X1

#define KEY_X1   0x0010

Definition at line 52 of file keypad.h.

◆ KEY_X2

#define KEY_X2   0x0020

Definition at line 51 of file keypad.h.

◆ KEY_X3

#define KEY_X3   0x0040

Definition at line 50 of file keypad.h.

◆ KEY_X4

#define KEY_X4   0x0080

Definition at line 49 of file keypad.h.

◆ KEY_Y1

#define KEY_Y1   0x0100

Definition at line 48 of file keypad.h.

◆ KEY_Y2

#define KEY_Y2   0x0200

Definition at line 47 of file keypad.h.

◆ KEY_Y3

#define KEY_Y3   0x0400

Definition at line 46 of file keypad.h.

◆ KEY_Y4

#define KEY_Y4   0x0800

Definition at line 45 of file keypad.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (no_assume_ds_data, no_assume_ss_data) )

Query the current state of the keypad.

Returns
uint16_t A bitfield representing currently pressed keys.