joycon-slave/const.h

31 lines
650 B
C

#ifndef CONST_H
#define CONST_H
#define PROTOCOL_HEADER 0x01
// device selection
#define DEVICE_SPECIAL_PROTOCOL 0x00
#define DEVICE_NUM_MAX 0x08
#define DEVICE_NUM_MIN 0x02
// key selection
#define KEY_TEST_CONNECTION 0x00
#define KEY_REGISTER_SLAVE 0x01
#define KEY1 0x01
#define KEY2 0x02
#define KEY3 0x03
#define KEY_UP 0x04
#define KEY_DOWN 0x05
#define KEY_LEFT 0x06
#define KEY_RIGHT 0x07
#define KEY_OK 0x08
// key action
#define KEY_ACTION_REQUIRE_TEST 0x00
#define KEY_ACTION_CONNECTION_OK 0x01
#define KEY_ACTION_SLAVE_REQUEST 0x00
#define KEY_ACTION_SLAVE_OK 0x01
#define KEY_ACTION_PRESS 0x01
#define KEY_ACTION_RELEASE 0x02
#endif