moved test macro to utils.h

This commit is contained in:
matthias.ringwald 2009-09-29 20:13:43 +00:00
parent 945627e442
commit 97a34cd44c
4 changed files with 4 additions and 6 deletions

View File

@ -7,10 +7,6 @@
#pragma once
#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
#define HCI_EVENT_INQUIRY_COMPLETE 0x01

View File

@ -36,6 +36,9 @@ typedef uint8_t link_key_t[LINK_KEY_LEN];
#define READ_CMD_OGF(buffer) (buffer[1] >> 2)
#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
#define READ_ACL_CONNECTION_HANDLE( buffer ) ( READ_BT_16(buffer,0) & 0x0fff)
#define READ_ACL_FLAGS( buffer ) ( buffer[1] >> 4 )

View File

@ -6,8 +6,6 @@
#include "l2cap_signaling.h"
#include <stdarg.h>
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
"22", // 0x02 connection request: PSM, Source CID

View File

@ -7,6 +7,7 @@
#pragma once
#include <stdint.h>
#include <stdarg.h>
#include <btstack/utils.h>
#include <btstack/hci_cmds.h>