mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
moved test macro to utils.h
This commit is contained in:
parent
945627e442
commit
97a34cd44c
@ -7,10 +7,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
// check if command complete event for given command
|
|
||||||
#define COMMAND_COMPLETE_EVENT(event,cmd) ( event[0] == HCI_EVENT_COMMAND_COMPLETE && READ_BT_16(event,3) == cmd.opcode)
|
|
||||||
|
|
||||||
// Events from host controller to host
|
// Events from host controller to host
|
||||||
#define HCI_EVENT_INQUIRY_COMPLETE 0x01
|
#define HCI_EVENT_INQUIRY_COMPLETE 0x01
|
||||||
|
@ -36,6 +36,9 @@ typedef uint8_t link_key_t[LINK_KEY_LEN];
|
|||||||
#define READ_CMD_OGF(buffer) (buffer[1] >> 2)
|
#define READ_CMD_OGF(buffer) (buffer[1] >> 2)
|
||||||
#define READ_CMD_OCF(buffer) ((buffer[1] & 0x03) << 8 | buffer[0])
|
#define READ_CMD_OCF(buffer) ((buffer[1] & 0x03) << 8 | buffer[0])
|
||||||
|
|
||||||
|
// check if command complete event for given command
|
||||||
|
#define COMMAND_COMPLETE_EVENT(event,cmd) ( event[0] == HCI_EVENT_COMMAND_COMPLETE && READ_BT_16(event,3) == cmd.opcode)
|
||||||
|
|
||||||
// ACL Packet
|
// ACL Packet
|
||||||
#define READ_ACL_CONNECTION_HANDLE( buffer ) ( READ_BT_16(buffer,0) & 0x0fff)
|
#define READ_ACL_CONNECTION_HANDLE( buffer ) ( READ_BT_16(buffer,0) & 0x0fff)
|
||||||
#define READ_ACL_FLAGS( buffer ) ( buffer[1] >> 4 )
|
#define READ_ACL_FLAGS( buffer ) ( buffer[1] >> 4 )
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
#include "l2cap_signaling.h"
|
#include "l2cap_signaling.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
static char *l2cap_signaling_commands_format[] = {
|
static char *l2cap_signaling_commands_format[] = {
|
||||||
"D", // 0x01 command reject: reason {cmd not understood (0), sig MTU exceeded (2:max sig MTU), invalid CID (4:req CID)}, data len, data
|
"D", // 0x01 command reject: reason {cmd not understood (0), sig MTU exceeded (2:max sig MTU), invalid CID (4:req CID)}, data len, data
|
||||||
"22", // 0x02 connection request: PSM, Source CID
|
"22", // 0x02 connection request: PSM, Source CID
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <btstack/utils.h>
|
#include <btstack/utils.h>
|
||||||
#include <btstack/hci_cmds.h>
|
#include <btstack/hci_cmds.h>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user