diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-07-21 16:19:32 +0000 |
commit | 6bda628718f67c04ed43e8328f55bdce5319c504 (patch) | |
tree | efd08eefa90cef94440f880a70902f5803fb12a7 /Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h | |
parent | 83e293a6ec98c7faad1b76dd312b31b86cbeecc1 (diff) | |
download | lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.gz lufa-6bda628718f67c04ed43e8328f55bdce5319c504.tar.bz2 lufa-6bda628718f67c04ed43e8328f55bdce5319c504.zip |
Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
Diffstat (limited to 'Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h')
-rw-r--r-- | Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h b/Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h index 548f3d557..2df8c225d 100644 --- a/Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h +++ b/Demos/Host/Incomplete/BluetoothHost/Lib/SDP.h @@ -110,7 +110,8 @@ * \param[in, out] BufferPos Current position in the buffer where the data is to be written to * \param[in] Data Data to write to the buffer */ - static inline void SDP_WriteData8(void** BufferPos, uint8_t Data) + static inline void SDP_WriteData8(void** BufferPos, + const uint8_t Data) { *((uint8_t*)*BufferPos) = Data; *BufferPos += sizeof(uint8_t); @@ -121,7 +122,8 @@ * \param[in, out] BufferPos Current position in the buffer where the data is to be written to * \param[in] Data Data to write to the buffer */ - static inline void SDP_WriteData16(void** BufferPos, uint16_t Data) + static inline void SDP_WriteData16(void** BufferPos, + const uint16_t Data) { *((uint16_t*)*BufferPos) = SwapEndian_16(Data); *BufferPos += sizeof(uint16_t); @@ -132,7 +134,8 @@ * \param[in, out] BufferPos Current position in the buffer where the data is to be written to * \param[in] Data Data to write to the buffer */ - static inline void SDP_WriteData32(void** BufferPos, uint32_t Data) + static inline void SDP_WriteData32(void** BufferPos, + const uint32_t Data) { *((uint32_t*)*BufferPos) = SwapEndian_32(Data); *BufferPos += sizeof(uint32_t); @@ -203,28 +206,44 @@ } /* Function Prototypes: */ - void SDP_ProcessPacket(void* Data, Bluetooth_Channel_t* const Channel); + void SDP_ProcessPacket(void* Data, + Bluetooth_Channel_t* const Channel); #if defined(INCLUDE_FROM_SERVICEDISCOVERYPROTOCOL_C) - static void SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel); - static void SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel); - static void SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader, Bluetooth_Channel_t* const Channel); - - static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable, uint16_t AttributeList[][2], - const uint8_t TotalAttributes, void** const BufferPos); - static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID, const void* AttributeValue, void** ResponseBuffer); - static void* SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable, const uint16_t AttributeID); - - static bool SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs, + static void SDP_ProcessServiceSearch(const SDP_PDUHeader_t* const SDPHeader, + Bluetooth_Channel_t* const Channel); + static void SDP_ProcessServiceAttribute(const SDP_PDUHeader_t* const SDPHeader, + Bluetooth_Channel_t* const Channel); + static void SDP_ProcessServiceSearchAttribute(const SDP_PDUHeader_t* const SDPHeader, + Bluetooth_Channel_t* const Channel); + + static uint16_t SDP_AddListedAttributesToResponse(const ServiceAttributeTable_t* AttributeTable, + uint16_t AttributeList[][2], + const uint8_t TotalAttributes, + void** const BufferPos); + static uint16_t SDP_AddAttributeToResponse(const uint16_t AttributeID, + const void* AttributeValue, + void** ResponseBuffer); + static void* SDP_GetAttributeValue(const ServiceAttributeTable_t* AttributeTable, + const uint16_t AttributeID); + + static bool SDP_SearchServiceTable(uint8_t UUIDList[][UUID_SIZE_BYTES], + const uint8_t TotalUUIDs, const ServiceAttributeTable_t* CurrAttributeTable); - static void SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs, - uint16_t* const UUIDMatchFlags, const void* CurrAttribute); - - static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2], const void** const CurrentParameter); - static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void** const CurrentParameter); - - static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData, uint8_t* const HeaderSize); - static uint32_t SDP_GetDataElementSize(const void** const AttributeHeader, uint8_t* const ElementHeaderSize); + static void SDP_CheckUUIDMatch(uint8_t UUIDList[][UUID_SIZE_BYTES], + const uint8_t TotalUUIDs, + uint16_t* const UUIDMatchFlags, + const void* CurrAttribute); + + static uint8_t SDP_GetAttributeList(uint16_t AttributeList[][2], + const void** const CurrentParameter); + static uint8_t SDP_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], + const void** const CurrentParameter); + + static uint32_t SDP_GetLocalAttributeContainerSize(const void* const AttributeData, + uint8_t* const HeaderSize); + static uint32_t SDP_GetDataElementSize(const void** const AttributeHeader, + uint8_t* const ElementHeaderSize); #endif #endif |