mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Use shift operators for flags
This commit is contained in:
parent
4a1940b99b
commit
efb9bb73c5
1 changed files with 24 additions and 24 deletions
48
BTD.h
48
BTD.h
|
@ -58,15 +58,15 @@
|
|||
#define HCI_DISCONNECT_STATE 16
|
||||
|
||||
/* HCI event flags*/
|
||||
#define HCI_FLAG_CMD_COMPLETE 0x01
|
||||
#define HCI_FLAG_CONNECT_COMPLETE 0x02
|
||||
#define HCI_FLAG_DISCONNECT_COMPLETE 0x04
|
||||
#define HCI_FLAG_REMOTE_NAME_COMPLETE 0x08
|
||||
#define HCI_FLAG_INCOMING_REQUEST 0x10
|
||||
#define HCI_FLAG_READ_BDADDR 0x20
|
||||
#define HCI_FLAG_READ_VERSION 0x40
|
||||
#define HCI_FLAG_DEVICE_FOUND 0x80
|
||||
#define HCI_FLAG_CONNECT_EVENT 0x100
|
||||
#define HCI_FLAG_CMD_COMPLETE (1UL << 0)
|
||||
#define HCI_FLAG_CONNECT_COMPLETE (1UL << 1)
|
||||
#define HCI_FLAG_DISCONNECT_COMPLETE (1UL << 2)
|
||||
#define HCI_FLAG_REMOTE_NAME_COMPLETE (1UL << 3)
|
||||
#define HCI_FLAG_INCOMING_REQUEST (1UL << 4)
|
||||
#define HCI_FLAG_READ_BDADDR (1UL << 5)
|
||||
#define HCI_FLAG_READ_VERSION (1UL << 6)
|
||||
#define HCI_FLAG_DEVICE_FOUND (1UL << 7)
|
||||
#define HCI_FLAG_CONNECT_EVENT (1UL << 8)
|
||||
|
||||
/* Macros for HCI event flag tests */
|
||||
#define hci_check_flag(flag) (hci_event_flag & (flag))
|
||||
|
@ -131,28 +131,28 @@
|
|||
#define WII_INIT_MOTION_PLUS_STATE 21
|
||||
|
||||
/* L2CAP event flags for HID Control channel */
|
||||
#define L2CAP_FLAG_CONNECTION_CONTROL_REQUEST 0x00000001
|
||||
#define L2CAP_FLAG_CONFIG_CONTROL_SUCCESS 0x00000002
|
||||
#define L2CAP_FLAG_CONTROL_CONNECTED 0x00000004
|
||||
#define L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE 0x00000008
|
||||
#define L2CAP_FLAG_CONNECTION_CONTROL_REQUEST (1UL << 0)
|
||||
#define L2CAP_FLAG_CONFIG_CONTROL_SUCCESS (1UL << 1)
|
||||
#define L2CAP_FLAG_CONTROL_CONNECTED (1UL << 2)
|
||||
#define L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE (1UL << 3)
|
||||
|
||||
/* L2CAP event flags for HID Interrupt channel */
|
||||
#define L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST 0x00000010
|
||||
#define L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS 0x00000020
|
||||
#define L2CAP_FLAG_INTERRUPT_CONNECTED 0x00000040
|
||||
#define L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE 0x00000080
|
||||
#define L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST (1UL << 4)
|
||||
#define L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS (1UL << 5)
|
||||
#define L2CAP_FLAG_INTERRUPT_CONNECTED (1UL << 6)
|
||||
#define L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE (1UL << 7)
|
||||
|
||||
/* L2CAP event flags for SDP channel */
|
||||
#define L2CAP_FLAG_CONNECTION_SDP_REQUEST 0x00000100
|
||||
#define L2CAP_FLAG_CONFIG_SDP_SUCCESS 0x00000200
|
||||
#define L2CAP_FLAG_DISCONNECT_SDP_REQUEST 0x00000400
|
||||
#define L2CAP_FLAG_CONNECTION_SDP_REQUEST (1UL << 8)
|
||||
#define L2CAP_FLAG_CONFIG_SDP_SUCCESS (1UL << 9)
|
||||
#define L2CAP_FLAG_DISCONNECT_SDP_REQUEST (1UL << 10)
|
||||
|
||||
/* L2CAP event flags for RFCOMM channel */
|
||||
#define L2CAP_FLAG_CONNECTION_RFCOMM_REQUEST 0x00000800
|
||||
#define L2CAP_FLAG_CONFIG_RFCOMM_SUCCESS 0x00001000
|
||||
#define L2CAP_FLAG_DISCONNECT_RFCOMM_REQUEST 0x00002000
|
||||
#define L2CAP_FLAG_CONNECTION_RFCOMM_REQUEST (1UL << 11)
|
||||
#define L2CAP_FLAG_CONFIG_RFCOMM_SUCCESS (1UL << 12)
|
||||
#define L2CAP_FLAG_DISCONNECT_RFCOMM_REQUEST (1UL << 13)
|
||||
|
||||
#define L2CAP_FLAG_DISCONNECT_RESPONSE 0x00004000
|
||||
#define L2CAP_FLAG_DISCONNECT_RESPONSE (1UL << 14)
|
||||
|
||||
/* Macros for L2CAP event flag tests */
|
||||
#define l2cap_check_flag(flag) (l2cap_event_flag & (flag))
|
||||
|
|
Loading…
Reference in a new issue