mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
move packet types to btstack.h or hci_cmds.h
This commit is contained in:
parent
c6100ee887
commit
93ed97b351
6
TODO.txt
6
TODO.txt
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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)();
|
||||
|
Loading…
x
Reference in New Issue
Block a user