move packet types to btstack.h or hci_cmds.h

This commit is contained in:
matthias.ringwald 2009-10-05 20:59:24 +00:00
parent c6100ee887
commit 93ed97b351
3 changed files with 23 additions and 28 deletions

View File

@ -1,11 +1,15 @@
/* new todo file for BTstack */
Last milestone reached: create script to build APT package for BTdeamon, Resources, and BTstack client library
Last change: status bar icon updates
Last change: move packet types to hci_cmds.h
NEXT:
- use single packet handler on client side
- add packet type to callback type
- change API
- don't dispatch on type in btstack.c
- support Cocoa CFRunLoop in addition to POSIX select run loop
- define struct run_loop_t
- run_loop_posix.c: run_loop_t * BTstack_run_loop = run_loop_posix;

View File

@ -8,6 +8,24 @@
#include <stdint.h>
/**
* packet types - used in BTstack and over the H4 UART interface
*/
#define HCI_COMMAND_DATA_PACKET 0x01
#define HCI_ACL_DATA_PACKET 0x02
#define HCI_SCO_DATA_PACKET 0x03
#define HCI_EVENT_PACKET 0x04
// extension for client/server communication
#define DAEMON_EVENT_PACKET 0x05
// L2CAP data
#define L2CAP_DATA_PACKET 0x06
// RFCOMM data
#define RFCOMM_DATA_PACKET 0x07
// Events from host controller to host
#define HCI_EVENT_INQUIRY_COMPLETE 0x01
#define HCI_EVENT_INQUIRY_RESULT 0x02

View File

@ -12,33 +12,6 @@
#include <btstack/run_loop.h>
/* HCI packet types */
/**
* Indicates (first byte) that this pkt to the bluetooth module is a command pkt. The
* module will send a #HCI_EVENT_PACKET for response.
*/
#define HCI_COMMAND_DATA_PACKET 0x01
/**
* Indicates (first byte) that this pkt is a acl pkt. Will be sent to and from the module.
*/
#define HCI_ACL_DATA_PACKET 0x02
/**
* Indicates (first byte) that this pkt is a sco pkt. Will be sent to and from the module.
*/
#define HCI_SCO_DATA_PACKET 0x03
/**
* Indicates (first byte) that this pkt is an event pkt. Only sent by the bluetooth module.
*/
#define HCI_EVENT_PACKET 0x04
// extension for client/server communication
#define L2CAP_DATA_PACKET 0x05
#define DAEMON_EVENT_PACKET 0x06
typedef struct {
int (*open)(void *transport_config);
int (*close)();