diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-06-15 11:28:15 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-06-15 11:28:15 +0000 |
commit | 13ea700b35aa8ee9f89cf1cb06d41109d065bfcf (patch) | |
tree | 65dce334679d553f5aa466d489cddbd56511a6ad /Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h | |
parent | f5d079462dd975b9e7ae3f39423a64b6516f5dbd (diff) | |
download | lufa-13ea700b35aa8ee9f89cf1cb06d41109d065bfcf.tar.gz lufa-13ea700b35aa8ee9f89cf1cb06d41109d065bfcf.tar.bz2 lufa-13ea700b35aa8ee9f89cf1cb06d41109d065bfcf.zip |
Rename RFCOMM_GetFrameDataLength() to RFCOMM_GetVariableFieldValue() as it is multi-purpose, and modify it to move the buffer pointer itself rather than relying on the caller.
Make RFCOMM_GetChannelData() return NULL if the required channel DLCI is found, but the channel is closed.
Add modem signals (BREAK, DCD, etc.) to the channel state array, and add in a handler for the Modem Status RFCOMM control command.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h')
-rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h b/Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h index e12c74c76..8cefa51c7 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/RFCOMMControl.h @@ -50,7 +50,11 @@ #include "RFCOMM.h"
/* Macros: */
- #define RFCOMM_
+ #define RFCOMM_STATUSFLAG_FC (1 << 1)
+ #define RFCOMM_STATUSFLAG_RTC (1 << 2)
+ #define RFCOMM_STATUSFLAG_RTR (1 << 3)
+ #define RFCOMM_STATUSFLAG_IC (1 << 6)
+ #define RFCOMM_STATUSFLAG_DV (1 << 7)
/* Enums: */
enum RFCOMM_Control_Commands_t
@@ -97,6 +101,13 @@ uint8_t MaxRetransmissions;
uint8_t RecoveryWindowSize;
} RFCOMM_DPN_Parameters_t;
+
+ typedef struct
+ {
+ RFCOMM_Address_t Channel;
+ uint8_t Signals;
+ uint8_t BreakSignals;
+ } RFCOMM_MS_Parameters_t;
/* Function Prototypes: */
void RFCOMM_ProcessControlCommand(const uint8_t* Command, Bluetooth_Channel_t* const Channel);
@@ -108,8 +119,8 @@ Bluetooth_Channel_t* const Channel);
static void RFCOMM_ProcessFCDCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
Bluetooth_Channel_t* const Channel);
- static void RFCOMM_ProcessMSCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
- Bluetooth_Channel_t* const Channel);
+ static void RFCOMM_ProcessMSCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t CommandDataLen,
+ const uint8_t* CommandData, Bluetooth_Channel_t* const Channel);
static void RFCOMM_ProcessRPNCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
Bluetooth_Channel_t* const Channel);
static void RFCOMM_ProcessRLSCommand(const RFCOMM_Command_t* const CommandHeader, const uint8_t* CommandData,
|