}\r
\r
/** Bluetooth stack callback event for a non-signal ACL packet reception. This callback fires once a connection\r
- * to a remote Bluetooth device has been made, and the remote device has sent a non-signalling ACL packet.\r
+ * to a remote Bluetooth device has been made, and the remote device has sent a non-signaling ACL packet.\r
*\r
* \param[in] Data Pointer to a buffer where the received data is stored\r
* \param[in] DataLen Length of the packet data, in bytes\r
DevControlError = 1, /**< A control request to the device failed to complete successfully */
DescriptorTooLarge = 2, /**< The device's Configuration Descriptor is too large to process */
InvalidConfigDataReturned = 3, /**< The device returned an invalid Configuration Descriptor */
- NoBTInterfaceFound = 4, /**< A compatible Blutooth interface was not found in the device's Configuration Descriptor */
+ NoBTInterfaceFound = 4, /**< A compatible Bluetooth interface was not found in the device's Configuration Descriptor */
NoEndpointFound = 5, /**< A compatible set of Bluetooth endpoints were not found in the
* device's Bluetooth interface
*/
*/
void Bluetooth_ACLTask(void)
{
- /* Process incomming ACL packets, if any */
- Bluetooth_ProcessIncommingACLPackets();
+ /* Process incoming ACL packets, if any */
+ Bluetooth_ProcessIncomingACLPackets();
/* Check for any half-open channels, send configuration details to the remote device if found */
for (uint8_t i = 0; i < BLUETOOTH_MAX_OPEN_CHANNELS; i++)
/* Fill out the Signal Command header in the response packet */
PacketData.SignalCommandHeader.Code = BT_SIGNAL_CONFIGURATION_REQUEST;
- PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignallingIdentifier;
+ PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignalingIdentifier;
PacketData.SignalCommandHeader.Length = sizeof(PacketData.ConfigurationRequest) +
sizeof(PacketData.Option_LocalMTU);
}
}
-/** Incomming ACL packet processing task. This task is called by the main ACL processing task to read in and process
- * any incomming ACL packets to the device, handling signal requests as they are received or passing along channel
+/** Incoming ACL packet processing task. This task is called by the main ACL processing task to read in and process
+ * any incoming ACL packets to the device, handling signal requests as they are received or passing along channel
* data to the user application.
*/
-static void Bluetooth_ProcessIncommingACLPackets(void)
+static void Bluetooth_ProcessIncomingACLPackets(void)
{
BT_ACL_Header_t ACLPacketHeader;
BT_DataPacket_Header_t DataHeader;
BT_ACL_DEBUG(2, "-- Destination Channel: 0x%04X", DataHeader.DestinationChannel);
BT_ACL_DEBUG(2, "-- Payload Length: 0x%04X", DataHeader.PayloadLength);
- /* Check the packet's destination channel - signalling channel should be processed by the stack internally */
+ /* Check the packet's destination channel - signaling channel should be processed by the stack internally */
if (DataHeader.DestinationChannel == BT_CHANNEL_SIGNALING)
{
- /* Read in the Signal Command header of the incomming packet */
+ /* Read in the Signal Command header of the incoming packet */
BT_Signal_Header_t SignalCommandHeader;
Pipe_Read_Stream_LE(&SignalCommandHeader, sizeof(SignalCommandHeader));
}
else
{
- /* Non-signalling packet received, read in the packet contents and pass to the user application */
+ /* Non-signaling packet received, read in the packet contents and pass to the user application */
uint8_t PacketData[DataHeader.PayloadLength];
Pipe_Read_Stream_LE(PacketData, DataHeader.PayloadLength);
Pipe_ClearIN();
* \param[in] Data Pointer to a buffer where the data is to be sourced from
* \param[in] DataLen Length of the data to send
* \param[in] ACLChannel ACL channel information structure containing the destination channel's information, NULL
- * to send to the remote device's signalling channel
+ * to send to the remote device's signaling channel
*
* \return A value from the \ref BT_SendPacket_ErrorCodes_t enum
*/
if (!(Bluetooth_Connection.IsConnected))
return BT_SENDPACKET_NotConnected;
- /* If the destination channel is not the signalling channel and it is not currently fully open, abort */
+ /* If the destination channel is not the signaling channel and it is not currently fully open, abort */
if ((ACLChannel != NULL) && (ACLChannel->State != BT_Channel_Open))
return BT_SENDPACKET_ChannelNotOpen;
/* Fill out the Signal Command header in the response packet */
PacketData.SignalCommandHeader.Code = BT_SIGNAL_CONNECTION_REQUEST;
- PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignallingIdentifier;
+ PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignalingIdentifier;
PacketData.SignalCommandHeader.Length = sizeof(PacketData.ConnectionRequest);
/* Fill out the Connection Request in the response packet */
/* Fill out the Signal Command header in the response packet */
PacketData.SignalCommandHeader.Code = BT_SIGNAL_DISCONNECTION_REQUEST;
- PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignallingIdentifier;
+ PacketData.SignalCommandHeader.Identifier = ++Bluetooth_Connection.SignalingIdentifier;
PacketData.SignalCommandHeader.Length = sizeof(PacketData.DisconnectionRequest);
/* Fill out the Disconnection Request in the response packet */
/* Only update the channel's state if it was found in the channel list */
if (ChannelData != NULL)
{
- /* Check if the channel configuration completed successfuly */
+ /* Check if the channel configuration completed successfully */
if (ConfigurationResponse.Result == BT_CONFIGURATION_SUCCESSFUL)
{
switch (ChannelData->State)
/** Lowest possible channel number for L2CAP data channels. */
#define BT_CHANNELNUMBER_BASEOFFSET 0x0040
- /** Bluetooth specification defined channel number for signalling commands. */
+ /** Bluetooth specification defined channel number for signaling commands. */
#define BT_CHANNEL_SIGNALING 0x0001
/** Bluetooth specification defined channel number for connectionless data. */
uint16_t DestinationChannel; /**< Destination channel in the device the data is directed to */
} BT_DataPacket_Header_t;
- /** Bluetooth signalling command header structure, for all ACL packets containing a signalling command. */
+ /** Bluetooth signaling command header structure, for all ACL packets containing a signaling command. */
typedef struct
{
uint8_t Code; /**< Signal code, a BT_SIGNAL_* mask value */
uint8_t Identifier; /**< Unique signal command identifier to link requests and responses */
- uint16_t Length; /**< Length of the signalling command data, in bytes */
+ uint16_t Length; /**< Length of the signaling command data, in bytes */
} BT_Signal_Header_t;
- /** Connection Request signalling command structure, for channel connection requests. */
+ /** Connection Request signaling command structure, for channel connection requests. */
typedef struct
{
uint16_t PSM; /**< Type of data the channel will carry, a CHANNEL_PSM_* mask value */
uint16_t SourceChannel; /**< Channel source on the sending device this channel will link to */
} BT_Signal_ConnectionReq_t;
- /** Connection response signalling command structure, for responses to channel connection requests. */
+ /** Connection response signaling command structure, for responses to channel connection requests. */
typedef struct
{
uint16_t DestinationChannel; /**< Destination device channel that the connection request was processed on */
uint16_t Status; /**< Status of the request if the result was set to the Pending value */
} BT_Signal_ConnectionResp_t;
- /** Disconnection request signalling command structure, for channel disconnection requests. */
+ /** Disconnection request signaling command structure, for channel disconnection requests. */
typedef struct
{
uint16_t DestinationChannel; /**< Destination channel address which is to be disconnected */
uint16_t SourceChannel; /**< Source channel address which is to be disconnected */
} BT_Signal_DisconnectionReq_t;
- /** Disconnection response signalling command structure, for responses to channel disconnection requests. */
+ /** Disconnection response signaling command structure, for responses to channel disconnection requests. */
typedef struct
{
uint16_t DestinationChannel; /**< Destination channel address which was disconnected */
uint16_t SourceChannel; /**< Source channel address which was disconnected */
} BT_Signal_DisconnectionResp_t;
- /** Configuration Request signalling command structure, for channel configuration requests. */
+ /** Configuration Request signaling command structure, for channel configuration requests. */
typedef struct
{
uint16_t DestinationChannel; /**< Destination channel address which is to be disconnected */
uint16_t Flags; /**< Configuration flags for the request, including command continuation */
} BT_Signal_ConfigurationReq_t;
- /** Configuration Response signalling command structure, for responses to channel configuration requests. */
+ /** Configuration Response signaling command structure, for responses to channel configuration requests. */
typedef struct
{
uint16_t SourceChannel; /**< Source channel that the configuration request was directed at */
uint16_t Result; /**< Configuration result, a BT_CONFIGURATION_* mask value */
} BT_Signal_ConfigurationResp_t;
- /** Information Request signalling command structure, for device information requests. */
+ /** Information Request signaling command structure, for device information requests. */
typedef struct
{
uint16_t InfoType; /**< Data type that is being requested, a BT_INFOREQ_* mask value */
} BT_Signal_InformationReq_t;
- /** Information Response signalling command structure, for responses to information requests. */
+ /** Information Response signaling command structure, for responses to information requests. */
typedef struct
{
uint16_t InfoType; /**< Data type that was requested, a BT_INFOREQ_* mask value */
void Bluetooth_ACLTask(void);
#if defined(INCLUDE_FROM_BLUETOOTH_ACLPACKETS_C)
- static void Bluetooth_ProcessIncommingACLPackets(void);
+ static void Bluetooth_ProcessIncomingACLPackets(void);
static inline void Bluetooth_Signal_ConnectionReq(const BT_Signal_Header_t* const SignalCommandHeader);
static inline void Bluetooth_Signal_ConnectionResp(const BT_Signal_Header_t* const SignalCommandHeader);
#define INCLUDE_FROM_BLUETOOTHHCICOMMANDS_C
#include "BluetoothHCICommands.h"
-/** Temporary Bluetooth Device Address, for HCI responses which much include the detination address */
+/** Temporary Bluetooth Device Address, for HCI responses which much include the destination address */
static uint8_t Bluetooth_TempDeviceAddress[6];
/** Bluetooth HCI processing task. This task should be called repeatedly the main Bluetooth
/** Enum for the possible error codes returned by the \ref Bluetooth_SendPacket() function. */
enum BT_SendPacket_ErrorCodes_t
{
- BT_SENDPACKET_NoError = 0, /**< The packet was sent sucessfully. */
+ BT_SENDPACKET_NoError = 0, /**< The packet was sent successfully. */
BT_SENDPACKET_NotConnected = 1, /**< The Bluetooth stack is not currently connected to a remote device. */
BT_SENDPACKET_ChannelNotOpen = 2, /**< The given channel is not currently in the Open state. */
};
/* Type Defines: */
- /** Type define for a Bluetooth ACL channel information structure. This structure contains all the relevent
+ /** Type define for a Bluetooth ACL channel information structure. This structure contains all the relevant
* information on an ACL channel for data transmission and reception by the stack.
*/
typedef struct
uint16_t ConnectionHandle; /**< Connection handle to the remote device, used internally in the stack. */
uint8_t RemoteAddress[6]; /**< Bluetooth device address of the attached remote device. */
Bluetooth_Channel_t Channels[BLUETOOTH_MAX_OPEN_CHANNELS]; /**< Channel information structures for the connection. */
- uint8_t SignallingIdentifier; /**< Next Signalling Channel unique command sequence identifier. */
+ uint8_t SignalingIdentifier; /**< Next Signaling Channel unique command sequence identifier. */
} Bluetooth_Connection_t;
/** Local Bluetooth device information structure, for the defining of local device characteristics for the Bluetooth stack. */
/** Initializes the RFCOMM service, ready for new connections from a SDP client. */
void RFCOMM_Initialize(void)
{
- /* Reset the RFCOMM channel structures, to invalidate any confiured RFCOMM channels */
+ /* Reset the RFCOMM channel structures, to invalidate any configured RFCOMM channels */
for (uint8_t i = 0; i < RFCOMM_MAX_OPEN_CHANNELS; i++)
RFCOMM_Channels[i].State = RFCOMM_Channel_Closed;
}
/** Processes an incoming RFCOMM packet on an ACL channel which has been previously opened between the local and
* a remote device to handle RFCOMM traffic.
*
- * \param[in] Data Incomming packet data containing the RFCOMM packet
+ * \param[in] Data Incoming packet data containing the RFCOMM packet
* \param[in] ACLChannel ACL channel the request was issued to by the remote device
*/
void RFCOMM_ProcessPacket(void* Data, Bluetooth_Channel_t* const ACLChannel)
/** Base UUID value common to all standardized Bluetooth services */
const UUID_t BaseUUID PROGMEM = {0x00000000, BASE_80BIT_UUID};
-/** Main Service Discovery Protocol packet processing routine. This function processes incomming SDP packets from
+/** Main Service Discovery Protocol packet processing routine. This function processes incoming SDP packets from
* a connected Bluetooth device, and sends back appropriate responses to allow other devices to determine the
* services the local device exposes.
*
- * \param[in] Data Incomming packet data containing the SDP request
+ * \param[in] Data Incoming packet data containing the SDP request
* \param[in] Channel ACL channel the request was issued to by the remote device
*/
void SDP_ProcessPacket(void* Data, Bluetooth_Channel_t* const Channel)
uint8_t TotalUUIDs = SDP_GetUUIDList(UUIDList, &CurrentParameter);
BT_SDP_DEBUG(2, "-- Total UUIDs: %d", TotalUUIDs);
- /* Retrieve the maximum service record reponse count from the request */
+ /* Retrieve the maximum service record response count from the request */
uint16_t MaxServiceRecordCount = SDP_ReadData16(&CurrentParameter);
BT_SDP_DEBUG(2, "-- Max Return Service Count: 0x%04X", MaxServiceRecordCount);
uint32_t ServiceHandle = SDP_ReadData32(&CurrentParameter);
BT_SDP_DEBUG(2, "-- Service Handle: 0x%08lX", ServiceHandle);
- /* Retrieve the maximum Attribute reponse size from the request */
+ /* Retrieve the maximum Attribute response size from the request */
uint16_t MaxAttributeSize = SDP_ReadData16(&CurrentParameter);
BT_SDP_DEBUG(2, "-- Max Return Attribute Bytes: 0x%04X", MaxAttributeSize);
uint8_t TotalUUIDs = SDP_GetUUIDList(UUIDList, &CurrentParameter);
BT_SDP_DEBUG(2, "-- Total UUIDs: %d", TotalUUIDs);
- /* Retrieve the maximum Attribute reponse size from the request */
+ /* Retrieve the maximum Attribute response size from the request */
uint16_t MaxAttributeSize = SDP_ReadData16(&CurrentParameter);
BT_SDP_DEBUG(2, "-- Max Return Attribute Bytes: 0x%04X", MaxAttributeSize);
return TotalResponseSize;
}
-/** Adds the given attribute ID and value to the reponse buffer, and advances the response buffer pointer past the added data.
+/** Adds the given attribute ID and value to the response buffer, and advances the response buffer pointer past the added data.
*
* \param[in] AttributeID Attribute ID to add to the response buffer
* \param[in] AttributeValue Pointer to the start of the Attribute's value, located in PROGMEM
*BufferPos += sizeof(uint32_t);
}
- /** Reads 8 bits of raw data frpm the given buffer, incrementing the buffer position afterwards.
+ /** Reads 8 bits of raw data from the given buffer, incrementing the buffer position afterwards.
*
* \param[in, out] BufferPos Current position in the buffer where the data is to be read from
*
return Data;
}
- /** Reads 16 bits of raw data frpm the given buffer, incrementing the buffer position afterwards.
+ /** Reads 16 bits of raw data from the given buffer, incrementing the buffer position afterwards.
*
* \param[in, out] BufferPos Current position in the buffer where the data is to be read from
*
return Data;
}
- /** Reads 32 bits of raw data frpm the given buffer, incrementing the buffer position afterwards.
+ /** Reads 32 bits of raw data from the given buffer, incrementing the buffer position afterwards.
*
* \param[in, out] BufferPos Current position in the buffer where the data is to be read from
*
*
* \param[in, out] BufferPos Pointer to a buffer where the container header is to be placed
*
- * \return Pointer to the 16-bit size value of the contaner header, which has been pre-zeroed
+ * \return Pointer to the 16-bit size value of the container header, which has been pre-zeroed
*/
static inline uint16_t* SDP_AddSequence16(void** BufferPos)
{
};
/** Serial Port Profile attribute, listing the Browse Group List UUIDs which this service is a member of.
- * Browse Group UUIDs give a way to group together services within a device in a simple heirachy, so that
+ * Browse Group UUIDs give a way to group together services within a device in a simple hierarchy, so that
* a SDP client can progressively narrow down an general browse to a specific service which it requires.
*/
const struct
* <tr>
* <td>ENABLE_TELNET_SERVER</td>
* <td>Makefile CDEFS</td>
- * <td>When defined, this enables the TELNET server in addition to the HTTP webserver, which listens for incomming connections
+ * <td>When defined, this enables the TELNET server in addition to the HTTP webserver, which listens for incoming connections
* and processes user commands.</td>
* </tr>
* <tr>