mirror of https://github.com/ARMmbed/mbed-os.git
WIFI_EMAC class renamed to OdinWiFiEMAC, Formatting
Revert "in ODIN emac initialization required before connection"pull/6847/head
parent
7e4eb5c24b
commit
657ac3f643
|
@ -108,10 +108,8 @@ nsapi_error_t EmacTestNetworkStack::add_ethernet_interface(EMAC &emac, bool defa
|
|||
{
|
||||
// Test network stack supports only one interface
|
||||
TEST_ASSERT_MESSAGE(!m_interface, "Only one interface supported!");
|
||||
#ifdef TARGET_UBLOX_EVK_ODIN_W2
|
||||
emac_if_init();
|
||||
#endif
|
||||
m_interface = &EmacTestNetworkStack::Interface::get_instance();
|
||||
|
||||
m_interface = &EmacTestNetworkStack::Interface::get_instance();
|
||||
TEST_ASSERT_MESSAGE(m_interface, "Invalid interface!");
|
||||
|
||||
m_interface->m_emac = &emac;
|
||||
|
|
|
@ -19,27 +19,12 @@
|
|||
#include "lwip/def.h"
|
||||
#include "lwip_random.h"
|
||||
|
||||
#if defined(DEVICE_TRNG)
|
||||
#include "hal/trng_api.h"
|
||||
#endif
|
||||
|
||||
#include "randLIB.h"
|
||||
|
||||
void lwip_seed_random(void)
|
||||
{
|
||||
#if defined(DEVICE_TRNG)
|
||||
uint32_t result;
|
||||
size_t olen;
|
||||
trng_t trng_obj;
|
||||
|
||||
trng_init(&trng_obj);
|
||||
trng_get_bytes(&trng_obj, (uint8_t*)&result, sizeof result, &olen);
|
||||
trng_free(&trng_obj);
|
||||
|
||||
srand(result);
|
||||
#else
|
||||
randLIB_seed_random();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void lwip_add_random_seed(uint64_t seed)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "cb_otp.h"
|
||||
#include "cb_main.h"
|
||||
|
||||
#define WIFI_EMAC_MTU_SIZE (1500U)
|
||||
#define OdinWiFiEMAC_MTU_SIZE (1500U)
|
||||
static const char _ifname[] = "WL0";
|
||||
|
||||
cb_boolean handleWlanTargetCopyFromDataFrame(uint8_t* buffer, cbWLANTARGET_dataFrame* frame, uint32_t size, uint32_t offsetInFrame);
|
||||
|
@ -37,7 +37,7 @@ static const cbWLANTARGET_Callback _wlanTargetCallback =
|
|||
|
||||
void handleWlanStatusIndication(void *dummy, cbWLAN_StatusIndicationInfo status, void *data)
|
||||
{
|
||||
WIFI_EMAC &instance = WIFI_EMAC::get_instance();
|
||||
OdinWiFiEMAC &instance = OdinWiFiEMAC::get_instance();
|
||||
bool linkUp = false;
|
||||
bool sendCb = true;
|
||||
(void)dummy;
|
||||
|
@ -65,7 +65,7 @@ void handleWlanStatusIndication(void *dummy, cbWLAN_StatusIndicationInfo status,
|
|||
|
||||
void handleWlanPacketIndication(void *dummy, cbWLAN_PacketIndicationInfo *packetInfo)
|
||||
{
|
||||
WIFI_EMAC &instance = WIFI_EMAC::get_instance();
|
||||
OdinWiFiEMAC &instance = OdinWiFiEMAC::get_instance();
|
||||
(void)dummy;
|
||||
|
||||
if (instance.emac_link_input_cb) {
|
||||
|
@ -75,17 +75,17 @@ void handleWlanPacketIndication(void *dummy, cbWLAN_PacketIndicationInfo *packet
|
|||
|
||||
cb_boolean handleWlanTargetCopyFromDataFrame(uint8_t* buffer, cbWLANTARGET_dataFrame* frame, uint32_t size, uint32_t offsetInFrame)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
MBED_ASSERT(mem != NULL);
|
||||
|
||||
//emac_mem_buf_t* phead = (emac_mem_buf_t *)frame;
|
||||
emac_mem_buf_t* pbuf = (emac_mem_buf_t *)frame;
|
||||
emac_mem_buf_t* phead = static_cast<emac_mem_buf_t *>(frame);
|
||||
emac_mem_buf_t* pbuf;
|
||||
uint32_t copySize, bytesCopied = 0, pbufOffset = 0;
|
||||
|
||||
MBED_ASSERT(frame != NULL);
|
||||
MBED_ASSERT(buffer != NULL);
|
||||
|
||||
//pbuf = mem->get_next(phead);
|
||||
pbuf = phead;
|
||||
while (pbuf != NULL) {
|
||||
if ((pbufOffset + mem->get_len(pbuf)) >= offsetInFrame) {
|
||||
copySize = cb_MIN(size, mem->get_len(pbuf) - (offsetInFrame - pbufOffset));
|
||||
|
@ -114,17 +114,17 @@ cb_boolean handleWlanTargetCopyFromDataFrame(uint8_t* buffer, cbWLANTARGET_dataF
|
|||
|
||||
cb_boolean handleWlanTargetCopyToDataFrame(cbWLANTARGET_dataFrame* frame, uint8_t* buffer, uint32_t size, uint32_t offsetInFrame)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
MBED_ASSERT(mem != NULL);
|
||||
|
||||
//emac_mem_buf_t* phead = (emac_mem_buf_t *)frame;
|
||||
emac_mem_buf_t* pbuf = (emac_mem_buf_t *)frame;
|
||||
emac_mem_buf_t* phead = static_cast<emac_mem_buf_t *>(frame);
|
||||
emac_mem_buf_t* pbuf;
|
||||
uint32_t copySize, bytesCopied = 0, pbufOffset = 0;
|
||||
|
||||
MBED_ASSERT(frame != NULL);
|
||||
MBED_ASSERT(buffer != NULL);
|
||||
|
||||
//pbuf = mem->get_next(phead);
|
||||
pbuf = phead;
|
||||
while (pbuf != NULL) {
|
||||
if ((pbufOffset + mem->get_len(pbuf)) >= offsetInFrame) {
|
||||
copySize = cb_MIN(size, mem->get_len(pbuf) - (offsetInFrame - pbufOffset));
|
||||
|
@ -153,23 +153,23 @@ cb_boolean handleWlanTargetCopyToDataFrame(cbWLANTARGET_dataFrame* frame, uint8_
|
|||
|
||||
cbWLANTARGET_dataFrame* handleWlanTargetAllocDataFrame(uint32_t size)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
MBED_ASSERT(mem != NULL);
|
||||
return (cbWLANTARGET_dataFrame*)mem->alloc_pool(size,0);
|
||||
return (cbWLANTARGET_dataFrame*)mem->alloc_pool(size, 0);
|
||||
}
|
||||
|
||||
void handleWlanTargetFreeDataFrame(cbWLANTARGET_dataFrame* frame)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
MBED_ASSERT(mem != NULL);
|
||||
mem->free((emac_mem_buf_t*)frame);
|
||||
mem->free(static_cast<emac_mem_buf_t *>(frame));
|
||||
}
|
||||
|
||||
uint32_t handleWlanTargetGetDataFrameSize(cbWLANTARGET_dataFrame* frame)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
MBED_ASSERT(mem != NULL);
|
||||
return mem->get_total_len((emac_mem_buf_t*)frame);
|
||||
return mem->get_total_len(static_cast<emac_mem_buf_t *>(frame));
|
||||
}
|
||||
|
||||
uint8_t handleWlanTargetGetDataFrameTID(cbWLANTARGET_dataFrame* frame)
|
||||
|
@ -178,7 +178,7 @@ uint8_t handleWlanTargetGetDataFrameTID(cbWLANTARGET_dataFrame* frame)
|
|||
return (uint8_t)cbWLAN_AC_BE;
|
||||
}
|
||||
|
||||
WIFI_EMAC::WIFI_EMAC()
|
||||
OdinWiFiEMAC::OdinWiFiEMAC()
|
||||
{
|
||||
emac_link_input_cb = NULL;
|
||||
emac_link_state_cb = NULL;
|
||||
|
@ -190,9 +190,9 @@ void send_wlan_packet(void *buf)
|
|||
cbWLAN_sendPacket(buf);
|
||||
}
|
||||
|
||||
bool WIFI_EMAC::link_out(emac_mem_buf_t *buf)
|
||||
bool OdinWiFiEMAC::link_out(emac_mem_buf_t *buf)
|
||||
{
|
||||
EMACMemoryManager *mem = WIFI_EMAC::get_instance().memory_manager;
|
||||
EMACMemoryManager *mem = OdinWiFiEMAC::get_instance().memory_manager;
|
||||
|
||||
// Break call chain to avoid the driver affecting stack usage for the IP stack thread too much
|
||||
emac_mem_buf_t *new_buf = mem->alloc_pool(mem->get_total_len(buf), 0);
|
||||
|
@ -209,40 +209,40 @@ bool WIFI_EMAC::link_out(emac_mem_buf_t *buf)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WIFI_EMAC::power_up()
|
||||
bool OdinWiFiEMAC::power_up()
|
||||
{
|
||||
/* Initialize the hardware */
|
||||
/* No-op at this stage */
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t WIFI_EMAC::get_mtu_size() const
|
||||
uint32_t OdinWiFiEMAC::get_mtu_size() const
|
||||
{
|
||||
return WIFI_EMAC_MTU_SIZE;
|
||||
return OdinWiFiEMAC_MTU_SIZE;
|
||||
}
|
||||
|
||||
void WIFI_EMAC::get_ifname(char *name, uint8_t size) const
|
||||
void OdinWiFiEMAC::get_ifname(char *name, uint8_t size) const
|
||||
{
|
||||
memcpy(name, _ifname, (size < sizeof(_ifname)) ? size : sizeof(_ifname));
|
||||
}
|
||||
|
||||
uint8_t WIFI_EMAC::get_hwaddr_size() const
|
||||
uint8_t OdinWiFiEMAC::get_hwaddr_size() const
|
||||
{
|
||||
return sizeof(cbWLAN_MACAddress);
|
||||
}
|
||||
|
||||
bool WIFI_EMAC::get_hwaddr(uint8_t *addr) const
|
||||
bool OdinWiFiEMAC::get_hwaddr(uint8_t *addr) const
|
||||
{
|
||||
cbOTP_read(cbOTP_MAC_WLAN, sizeof(cbWLAN_MACAddress), addr);
|
||||
return true;
|
||||
}
|
||||
|
||||
void WIFI_EMAC::set_hwaddr(const uint8_t *addr)
|
||||
void OdinWiFiEMAC::set_hwaddr(const uint8_t *addr)
|
||||
{
|
||||
/* No-op at this stage */
|
||||
}
|
||||
|
||||
void WIFI_EMAC::set_link_input_cb(emac_link_input_cb_t input_cb)
|
||||
void OdinWiFiEMAC::set_link_input_cb(emac_link_input_cb_t input_cb)
|
||||
{
|
||||
emac_link_input_cb = input_cb;
|
||||
|
||||
|
@ -251,7 +251,7 @@ void WIFI_EMAC::set_link_input_cb(emac_link_input_cb_t input_cb)
|
|||
cbMAIN_driverUnlock();
|
||||
}
|
||||
|
||||
void WIFI_EMAC::set_link_state_cb(emac_link_state_change_cb_t state_cb)
|
||||
void OdinWiFiEMAC::set_link_state_cb(emac_link_state_change_cb_t state_cb)
|
||||
{
|
||||
emac_link_state_cb = state_cb;
|
||||
|
||||
|
@ -260,45 +260,39 @@ void WIFI_EMAC::set_link_state_cb(emac_link_state_change_cb_t state_cb)
|
|||
cbMAIN_driverUnlock();
|
||||
}
|
||||
|
||||
void WIFI_EMAC::power_down()
|
||||
void OdinWiFiEMAC::power_down()
|
||||
{
|
||||
/* No-op at this stage */
|
||||
}
|
||||
|
||||
void WIFI_EMAC::set_memory_manager(EMACMemoryManager &mem_mngr)
|
||||
void OdinWiFiEMAC::set_memory_manager(EMACMemoryManager &mem_mngr)
|
||||
{
|
||||
memory_manager = &mem_mngr;
|
||||
}
|
||||
|
||||
uint32_t WIFI_EMAC::get_align_preference() const
|
||||
uint32_t OdinWiFiEMAC::get_align_preference() const
|
||||
{
|
||||
return 1; // TODO not sure if there is a requirement but don't think so
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WIFI_EMAC::add_multicast_group(const uint8_t *address)
|
||||
void OdinWiFiEMAC::add_multicast_group(const uint8_t *address)
|
||||
{
|
||||
// TODO anything to do here for WiFi?
|
||||
|
||||
}
|
||||
|
||||
void WIFI_EMAC::remove_multicast_group(const uint8_t *address)
|
||||
void OdinWiFiEMAC::remove_multicast_group(const uint8_t *address)
|
||||
{
|
||||
// TODO anything to do here for WiFi?
|
||||
|
||||
}
|
||||
|
||||
void WIFI_EMAC::set_all_multicast(bool all)
|
||||
void OdinWiFiEMAC::set_all_multicast(bool all)
|
||||
{
|
||||
// TODO anything to do here for WiFi?
|
||||
|
||||
}
|
||||
|
||||
WIFI_EMAC &WIFI_EMAC::get_instance() {
|
||||
static WIFI_EMAC emac;
|
||||
OdinWiFiEMAC &OdinWiFiEMAC::get_instance() {
|
||||
static OdinWiFiEMAC emac;
|
||||
return emac;
|
||||
}
|
||||
|
||||
// Weak so a module can override
|
||||
MBED_WEAK EMAC &EMAC::get_default_instance()
|
||||
{
|
||||
return WIFI_EMAC::get_instance();
|
||||
}
|
||||
|
||||
#endif // DEVICE_WIFI
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#include "cb_wlan_target_data.h"
|
||||
#include "cb_wlan.h"
|
||||
|
||||
class WIFI_EMAC : public EMAC {
|
||||
class OdinWiFiEMAC : public EMAC {
|
||||
public:
|
||||
WIFI_EMAC();
|
||||
OdinWiFiEMAC();
|
||||
|
||||
static WIFI_EMAC &get_instance();
|
||||
static OdinWiFiEMAC &get_instance();
|
||||
|
||||
/**
|
||||
* Return maximum transmission unit
|
||||
|
|
|
@ -45,11 +45,9 @@ struct wlan_scan_indication_s;
|
|||
/** OdinWiFiInterface class
|
||||
* Implementation of the WiFiInterface for the ODIN-W2 module
|
||||
*/
|
||||
#ifdef DEVICE_WIFI_AP
|
||||
class OdinWiFiInterface : public WiFiInterface, public WiFiSoftAPInterface, public EMACInterface
|
||||
#else
|
||||
|
||||
class OdinWiFiInterface : public WiFiInterface, public EMACInterface
|
||||
#endif
|
||||
|
||||
{
|
||||
public:
|
||||
/** OdinWiFiInterface lifetime
|
||||
|
@ -140,100 +138,6 @@ public:
|
|||
*/
|
||||
virtual nsapi_error_t set_timeout(int ms);
|
||||
|
||||
#ifdef DEVICE_WIFI_AP
|
||||
|
||||
/** Set IP config for access point
|
||||
*
|
||||
* This function has to be called before the access point is started.
|
||||
*
|
||||
* @param gateway Null-terminated representation of the local gateway
|
||||
* @param netmask Null-terminated representation of the network mask
|
||||
* @return 0 on success, negative error code on failure
|
||||
*/
|
||||
//TODO: In previous WiFiInterface.h but not in new WiFiSoftAPInterface
|
||||
virtual nsapi_error_t set_ap_network(const char *ip_address, const char *netmask, const char *gateway);
|
||||
|
||||
/** Set the WiFi network credentials
|
||||
*
|
||||
* @param ssid Name of the network to connect to
|
||||
* @param pass Security passphrase to connect to the network
|
||||
* @param security Type of encryption for connection
|
||||
* (defaults to NSAPI_SECURITY_NONE)
|
||||
* @return 0 on success, or error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t set_ap_credentials(const char *ssid, const char *pass = 0,
|
||||
nsapi_security_t security = NSAPI_SECURITY_NONE);
|
||||
|
||||
/** Set the WiFi network channel
|
||||
*
|
||||
* @param channel Channel on which the connection is to be made, or 0 for any (Default: 0)
|
||||
* @return 0 on success, or error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t set_ap_channel(uint8_t channel);
|
||||
|
||||
/** Gets the current number of active connections
|
||||
*
|
||||
* @return number of active connections
|
||||
*/
|
||||
virtual int get_ap_connection_count();
|
||||
|
||||
/** Gets the max supported number of active connections
|
||||
*
|
||||
* @return maximum number of active connections
|
||||
*/
|
||||
virtual int get_ap_max_connection_count();
|
||||
|
||||
/** Enable or disable DHCP on the network access point
|
||||
*
|
||||
* Enables DHCP in SoftAP mode. Defaults to enabled unless
|
||||
* a static IP address has been assigned. Requires that the network is
|
||||
* service stopped.
|
||||
*
|
||||
* @param dhcp True to enable DHCP
|
||||
* @return 0 on success, negative error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t set_ap_dhcp(bool dhcp);
|
||||
|
||||
/** Set the beacon interval.
|
||||
*
|
||||
* Note that the value needs to be set before ap_start in order to take effect.
|
||||
*
|
||||
* @param interval Beason interval in time units (Default: 100 time units = 102.4 ms)
|
||||
* @return 0 on success, or error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t set_ap_beacon_interval(uint16_t interval);
|
||||
|
||||
/** Start the interface
|
||||
*
|
||||
* Attempts to serve a WiFi network.
|
||||
*
|
||||
* @param ssid Name of the network to connect to
|
||||
* @param pass Security passphrase to connect to the network
|
||||
* @param security Type of encryption for connection (Default: NSAPI_SECURITY_NONE)
|
||||
* @param channel Channel on which the connection is to be made, or 0 for any (Default: 0)
|
||||
* @return 0 on success, or error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t ap_start(const char *ssid, const char *pass = 0,
|
||||
nsapi_security_t security = NSAPI_SECURITY_NONE, uint8_t channel = 0);
|
||||
|
||||
/** Start the interface
|
||||
*
|
||||
* Attempts to serve a WiFi network. Requires ssid to be set.
|
||||
* passphrase is optional.
|
||||
* If passphrase is invalid, NSAPI_ERROR_AUTH_ERROR is returned.
|
||||
*
|
||||
* @return 0 on success, negative error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t ap_start();
|
||||
|
||||
/** Stop the interface
|
||||
*
|
||||
* @return 0 on success, or error code on failure
|
||||
*/
|
||||
virtual nsapi_error_t ap_stop();
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
enum OdinWifiState {
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @file cb_bt_conn_man.h
|
||||
* @brief Connection management. Functionality for setting up and tearing
|
||||
* down Bluetooth connections. Profile services are also enabled
|
||||
* using this module.
|
||||
* @file cb_bt_conn_man.h
|
||||
* @brief Connection management. Functionality for setting up and tearing
|
||||
* down Bluetooth connections. Profile services are also enabled
|
||||
* using this module.
|
||||
*/
|
||||
|
||||
#ifndef _CB_BT_CONN_MAN_H_
|
||||
|
@ -186,6 +186,7 @@ typedef cb_int32 (*cbBCM_SetMaxLinksCmd)(cb_uint32 maxLinks);
|
|||
* @return TRUE if handle is free, FALSE otherwise
|
||||
*/
|
||||
typedef cb_boolean (*cbBCM_IsHandleFree)(cbBCM_Handle handle);
|
||||
|
||||
/**
|
||||
* Callback to indicate that remaining buffer size needs to be obtained from
|
||||
* upper layer. The callback returns remaining buffer size and there is
|
||||
|
@ -293,7 +294,6 @@ extern cb_int32 cbBCM_enableServerProfileUuid128(
|
|||
cbBCM_ConnectionCallback *pConnectionCallback,
|
||||
cbBCM_ServiceClassEnabled pServiceClassEnabled);
|
||||
|
||||
|
||||
/**
|
||||
* Registers the server role of the local device. If role is cbBCM_PAN_ROLE_NAP a service
|
||||
* record will be registred in the local service data base. The local device can only act as a
|
||||
|
@ -332,27 +332,27 @@ extern cb_int32 cbBCM_enableDeviceIdServiceRecord(
|
|||
cb_uint16 vendorIdSource);
|
||||
|
||||
/**
|
||||
* Set Bluetooth watchdog settings
|
||||
*
|
||||
* @param disconnectReset Reset the device on any dropped Bluetooth connection
|
||||
* @return void
|
||||
*/
|
||||
* Set Bluetooth watchdog settings
|
||||
*
|
||||
* @param disconnectReset Reset the device on any dropped Bluetooth connection
|
||||
* @return void
|
||||
*/
|
||||
extern void cbBCM_setBluetoothWatchdogValue(cb_uint32 disconnectReset);
|
||||
|
||||
/**
|
||||
* Set the packet types to use. Call cbBCM_cmdChangePacketType()
|
||||
* to start using the new packet types.
|
||||
*
|
||||
* @param packetType See packet types in bt_types.h
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
* Set the packet types to use. Call cbBCM_cmdChangePacketType()
|
||||
* to start using the new packet types.
|
||||
*
|
||||
* @param packetType See packet types in bt_types.h
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_uint32 cbBCM_setPacketType(cb_uint16 packetType);
|
||||
|
||||
/**
|
||||
* Get BT classic packet type.
|
||||
*
|
||||
* @return Allowed packet types returned.
|
||||
*/
|
||||
* Get BT classic packet type.
|
||||
*
|
||||
* @return Allowed packet types returned.
|
||||
*/
|
||||
extern cb_uint16 cbBCM_getPacketType(void);
|
||||
|
||||
/**
|
||||
|
@ -523,7 +523,7 @@ extern cbBCM_Handle cbBCM_reqConnectUuid(
|
|||
*
|
||||
* @param handle Connection handle
|
||||
* @param accept TRUE to accept the incoming connection.
|
||||
FALSE to reject.
|
||||
* FALSE to reject.
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBCM_rspConnectUuidCnf(
|
||||
|
@ -531,22 +531,22 @@ extern cb_int32 cbBCM_rspConnectUuidCnf(
|
|||
cb_boolean accept);
|
||||
|
||||
/**
|
||||
* Initiate a Bluetooth PAN Profile connection.
|
||||
* The connection sequence includes ACL connection setup and L2CAP connection setup.
|
||||
* A pfConnectCnf callback will be received when the connection is complete.
|
||||
* The error code in the*callback is cbBCM_OK if the connection was successfully established.
|
||||
* The error code in the callback is cbBCM_ERROR if the connection failed.
|
||||
*
|
||||
* @param pAddress Pointer to address of remote device.
|
||||
* @param remoteRole PAN role of the remote device
|
||||
* @param localRole PAN role of the local device
|
||||
* @param pAclParams Link configuration including link supervision timeout
|
||||
* and master slave policy. Pass NULL to use default connection
|
||||
* parameters.
|
||||
* @param pConnectionCallback Callback structure for connection management.
|
||||
* @return If the operation is successful the connection handle is returned. If
|
||||
* not cbBCM_INVALID_CONNECTION_HANDLE is returned.
|
||||
*/
|
||||
* Initiate a Bluetooth PAN Profile connection.
|
||||
* The connection sequence includes ACL connection setup and L2CAP connection setup.
|
||||
* A pfConnectCnf callback will be received when the connection is complete.
|
||||
* The error code in the*callback is cbBCM_OK if the connection was successfully established.
|
||||
* The error code in the callback is cbBCM_ERROR if the connection failed.
|
||||
*
|
||||
* @param pAddress Pointer to address of remote device.
|
||||
* @param remoteRole PAN role of the remote device
|
||||
* @param localRole PAN role of the local device
|
||||
* @param pAclParams Link configuration including link supervision timeout
|
||||
* and master slave policy. Pass NULL to use default connection
|
||||
* parameters.
|
||||
* @param pConnectionCallback Callback structure for connection management.
|
||||
* @return If the operation is successful the connection handle is returned. If
|
||||
* not cbBCM_INVALID_CONNECTION_HANDLE is returned.
|
||||
*/
|
||||
extern cbBCM_Handle cbBCM_reqConnectPan(
|
||||
TBdAddr *pAddress,
|
||||
cbBCM_PAN_Role remoteRole,
|
||||
|
@ -555,14 +555,14 @@ extern cbBCM_Handle cbBCM_reqConnectPan(
|
|||
cbBCM_ConnectionCallback *pConnectionCallback);
|
||||
|
||||
/**
|
||||
* Accept or reject an incoming PAN connection. This is a
|
||||
* response to a cbBCM_ConnectInd connection indication.
|
||||
*
|
||||
* @param handle Connection handle
|
||||
* @param accept TRUE to accept the incoming connection.
|
||||
* FALSE to reject.
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
* Accept or reject an incoming PAN connection. This is a
|
||||
* response to a cbBCM_ConnectInd connection indication.
|
||||
*
|
||||
* @param handle Connection handle
|
||||
* @param accept TRUE to accept the incoming connection.
|
||||
* FALSE to reject.
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBCM_rspConnectPan(
|
||||
cbBCM_Handle handle,
|
||||
cb_boolean accept);
|
||||
|
@ -716,11 +716,11 @@ cb_int32 cbBCM_reqServiceSearchDeviceId(
|
|||
cbBCM_ServiceSearchCompleteCallback pCompleteCallback);
|
||||
|
||||
/**
|
||||
* @brief Get local Master/Slave role in an active connection.
|
||||
* @param bdAddr address to the connection
|
||||
* @param roleDiscoveryCallback Callback function used to notify the role
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
* @brief Get local Master/Slave role in an active connection.
|
||||
* @param bdAddr address to the connection
|
||||
* @param roleDiscoveryCallback Callback function used to notify the role
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBCM_RoleDiscovery(
|
||||
TBdAddr bdAddr,
|
||||
cbBCM_RoleDiscoveryCallback roleDiscoveryCallback);
|
||||
|
@ -737,10 +737,10 @@ extern cb_int32 cbBCM_getRssi(
|
|||
cbBCM_RssiCallback rssiCallback);
|
||||
|
||||
/*
|
||||
* Read the LinkQuality .
|
||||
* @return status as int32.
|
||||
* @cbBM_LinkQualityCallback is used to provide result.
|
||||
*/
|
||||
* Read the LinkQuality .
|
||||
* @return status as int32.
|
||||
* @cbBM_LinkQualityCallback is used to provide result.
|
||||
*/
|
||||
extern cb_int32 cbBCM_GetLinkQuality(TBdAddr bdAddr, cbBCM_LinkQualityCallback linkQualityCallback);
|
||||
|
||||
/**
|
||||
|
@ -831,40 +831,40 @@ extern cbBCM_Handle cbBCM_getProtocolHandle(
|
|||
cbBCM_Handle handle);
|
||||
|
||||
/**
|
||||
* @brief Get the bcm id from acl handle for an active connection.
|
||||
*
|
||||
* @param handle Connection handle
|
||||
* @return bcm handle.
|
||||
*/
|
||||
* @brief Get the bcm id from acl handle for an active connection.
|
||||
*
|
||||
* @param handle Connection handle
|
||||
* @return bcm handle.
|
||||
*/
|
||||
extern cbBCM_Handle cbBCM_getIdFromAclHandle(TConnHandle aclHandle);
|
||||
|
||||
/**
|
||||
* @brief Get the acl handle from bcm handle.
|
||||
*
|
||||
* @param handle bcm handle
|
||||
* @return acl handle
|
||||
*/
|
||||
* @brief Get the acl handle from bcm handle.
|
||||
*
|
||||
* @param handle bcm handle
|
||||
* @return acl handle
|
||||
*/
|
||||
extern TConnHandle cbBCM_getAclFromIdHandle(cbBCM_Handle bcmHandle);
|
||||
|
||||
/**
|
||||
* @brief Set active poll mode to introduce periodic BT classic link polling.
|
||||
* @param mode Active poll mode 0=disable, 1=enable (default period), 2-UINT16_MAX: period of poll
|
||||
* @return If the update is successfully initiated cbBCM_OK is returned.
|
||||
*/
|
||||
* @brief Set active poll mode to introduce periodic BT classic link polling.
|
||||
* @param mode Active poll mode 0=disable, 1=enable (default period), 2-UINT16_MAX: period of poll
|
||||
* @return If the update is successfully initiated cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBCM_setActivePollMode(cb_uint16 mode);
|
||||
|
||||
/**
|
||||
* @brief Get active poll mode.
|
||||
* @return Active poll mode 0=disable, 1=enable
|
||||
*/
|
||||
* @brief Get active poll mode.
|
||||
* @return Active poll mode 0=disable, 1=enable
|
||||
*/
|
||||
extern cb_uint16 cbBCM_getActivePollMode(void);
|
||||
|
||||
/**
|
||||
* @brief Change which packet types can be used for the connection identified by the handle
|
||||
* @param handle Connection handle
|
||||
* @param aclPacketType bit map according to packet types defined in bt_types.h
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
* @brief Change which packet types can be used for the connection identified by the handle
|
||||
* @param handle Connection handle
|
||||
* @param aclPacketType bit map according to packet types defined in bt_types.h
|
||||
* @return If the operation is successful cbBCM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBCM_changeConnectionPacketType(
|
||||
cbBCM_Handle handle,
|
||||
TPacketType aclPacketType);
|
||||
|
@ -875,10 +875,4 @@ extern cb_int32 cbBCM_changeConnectionPacketType(
|
|||
#endif
|
||||
|
||||
|
||||
#endif /* _CB_BT_CONN_MAN_H_ */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* _CB_BT_CONN_MAN_H_ */
|
|
@ -156,7 +156,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* Bluetooth Manager initialization parameters.
|
||||
*/
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
TBdAddr address; /** Bluetooth address that shall be assigned to controller. Pass invalidBdAddress to use controller default address*/
|
||||
|
@ -193,36 +193,36 @@ extern void cbBM_init(
|
|||
cbBM_InitComplete initCompleteCallback);
|
||||
|
||||
/**
|
||||
* This function executes cbBM_setQosParams command according to parameters.
|
||||
* @param connectConfig decides whether to turn off connectability and discoverability
|
||||
* when max links are reached.
|
||||
* @param qosConfig QoS enable=1, disable=0
|
||||
* @param connectConfig QoS "off during connection"=0, "on during connection"=1
|
||||
* @return true if in parameters are valid.
|
||||
*/
|
||||
* This function executes cbBM_setQosParams command according to parameters.
|
||||
* @param connectConfig decides whether to turn off connectability and discoverability
|
||||
* when max links are reached.
|
||||
* @param qosConfig QoS enable=1, disable=0
|
||||
* @param connectConfig QoS "off during connection"=0, "on during connection"=1
|
||||
* @return true if in parameters are valid.
|
||||
*/
|
||||
extern cb_int32 cbBM_setQosParams(
|
||||
cb_uint8 qosConfig,
|
||||
cb_uint8 connectConfig);
|
||||
|
||||
/**
|
||||
* This function sets the link supervision timeout in LLC.
|
||||
* @param linkSupervisionTimeout in milliseconds
|
||||
* @return true if in parameter is valid.
|
||||
*/
|
||||
* This function sets the link supervision timeout in LLC.
|
||||
* @param linkSupervisionTimeout in milliseconds
|
||||
* @return true if in parameter is valid.
|
||||
*/
|
||||
extern cb_int32 cbBM_setLinkSupervisionTimeout(
|
||||
cb_uint16 linkSupervisionTimeout);
|
||||
|
||||
/**
|
||||
* This function gets the link supervision timeout from LLC.
|
||||
* @return link supervision timeout in milliseconds
|
||||
*/
|
||||
* This function gets the link supervision timeout from LLC.
|
||||
* @return link supervision timeout in milliseconds
|
||||
*/
|
||||
extern cb_uint16 cbBM_getLinkSupervisionTimeout(void);
|
||||
|
||||
/**
|
||||
* This function enables or disables the fast connect feature (interlaced page scan).
|
||||
* @param fastConnect enable=TRUE, disable=FALSE
|
||||
* @return cbBM_OK if in parameter is valid.
|
||||
*/
|
||||
* This function enables or disables the fast connect feature (interlaced page scan).
|
||||
* @param fastConnect enable=TRUE, disable=FALSE
|
||||
* @return cbBM_OK if in parameter is valid.
|
||||
*/
|
||||
extern cb_int32 cbBM_setFastConnect(
|
||||
cb_boolean fastConnect);
|
||||
/**
|
||||
|
@ -232,45 +232,45 @@ extern cb_int32 cbBM_setFastConnect(
|
|||
extern cb_boolean cbBM_getFastConnect(void);
|
||||
|
||||
/**
|
||||
* This function enables or disables the fast discovery feature (interlaced inquiry scan).
|
||||
* @param fastDiscovery enable=TRUE, disable=FALSE
|
||||
* @return cbBM_OK if in parameter is valid.
|
||||
*/
|
||||
* This function enables or disables the fast discovery feature (interlaced inquiry scan).
|
||||
* @param fastDiscovery enable=TRUE, disable=FALSE
|
||||
* @return cbBM_OK if in parameter is valid.
|
||||
*/
|
||||
extern cb_int32 cbBM_setFastDiscovery(
|
||||
cb_boolean fastDiscovery);
|
||||
|
||||
/**
|
||||
* This function gets whether the fast discovery feature is enabled or disabled.
|
||||
* @return fast connect enabled=TRUE, disabled=FALSE
|
||||
*/
|
||||
* This function gets whether the fast discovery feature is enabled or disabled.
|
||||
* @return fast connect enabled=TRUE, disabled=FALSE
|
||||
*/
|
||||
extern cb_boolean cbBM_getFastDiscovery(void);
|
||||
|
||||
/**
|
||||
* This function sets the page timeout in LLC.
|
||||
* @param pageTimeout in milliseconds
|
||||
* @return cbBM_OK if successful
|
||||
*/
|
||||
* This function sets the page timeout in LLC.
|
||||
* @param pageTimeout in milliseconds
|
||||
* @return cbBM_OK if successful
|
||||
*/
|
||||
extern cb_int32 cbBM_setPageTimeout(
|
||||
cb_uint16 pageTimeout);
|
||||
|
||||
/**
|
||||
* This function gets the page timeout from LLC.
|
||||
* @return page timeout in milliseconds.
|
||||
*/
|
||||
* This function gets the page timeout from LLC.
|
||||
* @return page timeout in milliseconds.
|
||||
*/
|
||||
extern cb_uint16 cbBM_getPageTimeout(void);
|
||||
|
||||
/**
|
||||
* This function sets all default parameters for LE.
|
||||
* This function needs to be called before the cbBM_init.
|
||||
*/
|
||||
*/
|
||||
extern void cbBM_setDefaultValuesLeParams(void);
|
||||
|
||||
/**
|
||||
* This function executes HCI_cmdWrScanEnable command according to parameters.
|
||||
* @param discoverableMode discoverable mode
|
||||
* @param connectableMode connectable mode
|
||||
* @return cbBM_OK if HCI command could be executed.
|
||||
*/
|
||||
* This function executes HCI_cmdWrScanEnable command according to parameters.
|
||||
* @param discoverableMode discoverable mode
|
||||
* @param connectableMode connectable mode
|
||||
* @return cbBM_OK if HCI command could be executed.
|
||||
*/
|
||||
extern cb_int32 cbBM_updateScan(
|
||||
cbBM_DiscoverableMode discoverableMode,
|
||||
cbBM_ConnectableMode connectableMode);
|
||||
|
@ -368,17 +368,17 @@ extern cb_int32 cbBM_setMasterSlavePolicy(TMasterSlavePolicy policy);
|
|||
extern cb_int32 cbBM_getMasterSlavePolicy(TMasterSlavePolicy *pPolicy);
|
||||
|
||||
/**
|
||||
* Enable/disable sniff mode
|
||||
* @param enable TRUE=enable sniff mode, FALSE=disable sniff mode
|
||||
* @return If the operation is successful cbBM_OK is returned.
|
||||
*/
|
||||
* Enable/disable sniff mode
|
||||
* @param enable TRUE=enable sniff mode, FALSE=disable sniff mode
|
||||
* @return If the operation is successful cbBM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBM_setSniffMode(cb_boolean enable);
|
||||
|
||||
/**
|
||||
* Get sniff mode
|
||||
* @param pEnable Pointer to return variable
|
||||
* @return If the operation is successful cbBM_OK is returned.
|
||||
*/
|
||||
* Get sniff mode
|
||||
* @param pEnable Pointer to return variable
|
||||
* @return If the operation is successful cbBM_OK is returned.
|
||||
*/
|
||||
extern cb_int32 cbBM_getSniffMode(cb_boolean *pEnable);
|
||||
|
||||
/**
|
||||
|
@ -613,408 +613,408 @@ extern cb_int32 cbBM_add128BitsServiceClassLe(cb_uint8* uuid128);
|
|||
extern cb_int8 cbBM_getMaxTxPower(void);
|
||||
|
||||
/*
|
||||
* Read the connection parameters for Bond.
|
||||
* @param bondParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
* Read the connection parameters for Bond.
|
||||
* @param bondParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
void cbBM_getBondParameters(TAclParamsLe* bondParams);
|
||||
|
||||
/*
|
||||
* Read the connection parameters for connection.
|
||||
* @param aclParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
* Read the connection parameters for connection.
|
||||
* @param aclParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
void cbBM_getConnectParameters(TAclParamsLe* aclParams);
|
||||
|
||||
/*
|
||||
* Read the connection parameters for remote name request.
|
||||
* @param aclParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
* Read the connection parameters for remote name request.
|
||||
* @param aclParams Pointer to structure where the connection parameters are stored.
|
||||
* @return void
|
||||
*/
|
||||
void cbBM_getRemoteNameReqParameters(TAclParamsLe* aclParams);
|
||||
|
||||
/*
|
||||
* Read the vendor specific status of the WL18 chipset.
|
||||
* @param callback Callback used to notify the completion of the
|
||||
* status request.
|
||||
*@return Returns cbBM_OK if successfully started.
|
||||
*/
|
||||
* Read the vendor specific status of the WL18 chipset.
|
||||
* @param callback Callback used to notify the completion of the
|
||||
* status request.
|
||||
* @return Returns cbBM_OK if successfully started.
|
||||
*/
|
||||
cb_int32 cbBM_getTISystemStatus(cbBM_TIStatusCallback callback);
|
||||
|
||||
/*
|
||||
* Set BT classic as not supported in the peripheral advertisment.
|
||||
* @param enforceDisable TRUE to set BT classic not supported
|
||||
* @return cbBM_OK if successful
|
||||
*/
|
||||
* Set BT classic as not supported in the peripheral advertisment.
|
||||
* @param enforceDisable TRUE to set BT classic not supported
|
||||
* @return cbBM_OK if successful
|
||||
*/
|
||||
cb_int32 cbBM_setForceClassicNotSupportedInAdv(cb_boolean enforceDisable);
|
||||
|
||||
/*
|
||||
* Set BT classic as not supported in the peripheral advertisment.
|
||||
*
|
||||
* @return TRUE if BT classic is set to not supported in the peripheral advertisment.
|
||||
*/
|
||||
* Set BT classic as not supported in the peripheral advertisment.
|
||||
*
|
||||
* @return TRUE if BT classic is set to not supported in the peripheral advertisment.
|
||||
*/
|
||||
cb_boolean cbBM_getForceClassicNotSupportedInAdv(void);
|
||||
|
||||
/**
|
||||
* Set min advertisment interval
|
||||
*
|
||||
* @param newValue Minimial interval value as slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set min advertisment interval
|
||||
*
|
||||
* @param newValue Minimial interval value as slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setAdvertisingIntervalMin(cb_uint16 val);
|
||||
|
||||
/**
|
||||
* Set max advertisment interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set max advertisment interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setAdvertisingIntervalMax(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set advertisment channel map
|
||||
*
|
||||
* @param Bit mask of channels to use; Channel 37, 38, 39
|
||||
* (cbBM_ADV_CHANNEL_MAP_CH_37_BIT, cbBM_ADV_CHANNEL_MAP_CH_38_BIT, cbBM_ADV_CHANNEL_MAP_CH_39_BIT)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set advertisment channel map
|
||||
*
|
||||
* @param Bit mask of channels to use; Channel 37, 38, 39
|
||||
* (cbBM_ADV_CHANNEL_MAP_CH_37_BIT, cbBM_ADV_CHANNEL_MAP_CH_38_BIT, cbBM_ADV_CHANNEL_MAP_CH_39_BIT)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setAdvChannelmap(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set min connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set min connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectConnIntervalMin(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set max connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set max connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectConnIntervalMax(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectConnLatency(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectLinklossTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectCreateConnTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set connect scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set connect scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectScanInterval(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set connect scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set connect scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setConnectScanWindow(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set min bond connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set min bond connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondConnIntervalMin(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set max bond connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set max bond connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondConnIntervalMax(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set bond connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set bond connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondConnLatency(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set bond link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set bond link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondLinklossTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set bond create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set bond create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondCreateConnTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set bond scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set bond scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondScanInterval(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set bond scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set bond scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setBondScanWindow(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set min remote name connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set min remote name connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameConnIntervalMin(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set max remote name connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set max remote name connection interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameConnIntervalMax(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set remote name connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set remote name connection latency
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 1.25ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameConnLatency(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set remote name link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set remote name link loss (or supervision) timeout
|
||||
*
|
||||
* @param newValue Time in ms (make sure it is larger than the connection latency)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameLinklossTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set remote name create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set remote name create connection (or page) timeout
|
||||
*
|
||||
* @param newValue Time in ms
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameCreateConnTmo(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set remote name scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set remote name scan interval
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameScanInterval(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Set remote name scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
* Set remote name scan window
|
||||
*
|
||||
* @param newValue Time in slots (1 slot is 0.625ms)
|
||||
* @return cbBM_OK is returned on success.
|
||||
*/
|
||||
extern cb_int32 cbBM_setRemoteNameScanWindow(cb_uint16 newValue);
|
||||
|
||||
/**
|
||||
* Get min advertisment interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get min advertisment interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getAdvertisingIntervalMin(void);
|
||||
|
||||
/**
|
||||
* Get max advertisment interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get max advertisment interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getAdvertisingIntervalMax(void);
|
||||
|
||||
/**
|
||||
* Get advertisment channel map
|
||||
*
|
||||
* @return Bit mask of channels to use; Channel 37, 38, 39
|
||||
* (cbBM_ADV_CHANNEL_MAP_CH_37_BIT, cbBM_ADV_CHANNEL_MAP_CH_38_BIT, cbBM_ADV_CHANNEL_MAP_CH_39_BIT)
|
||||
*/
|
||||
* Get advertisment channel map
|
||||
*
|
||||
* @return Bit mask of channels to use; Channel 37, 38, 39
|
||||
* (cbBM_ADV_CHANNEL_MAP_CH_37_BIT, cbBM_ADV_CHANNEL_MAP_CH_38_BIT, cbBM_ADV_CHANNEL_MAP_CH_39_BIT)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getAdvChannelmap(void);
|
||||
|
||||
/**
|
||||
* Get min connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get min connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectConnIntervalMin(void);
|
||||
|
||||
/**
|
||||
* Get max connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get max connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectConnIntervalMax(void);
|
||||
|
||||
/**
|
||||
* Get connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectConnLatency(void);
|
||||
|
||||
/**
|
||||
* Get link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectLinklossTmo(void);
|
||||
|
||||
/**
|
||||
* Get create connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get create connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectCreateConnTmo(void);
|
||||
|
||||
/**
|
||||
* Get connection scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get connection scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectScanInterval(void);
|
||||
|
||||
/**
|
||||
* Get connection scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get connection scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getConnectScanWindow(void);
|
||||
|
||||
/**
|
||||
* Get min bond connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get min bond connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondConnIntervalMin(void);
|
||||
|
||||
/**
|
||||
* Get bond connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get bond connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondConnIntervalMax(void);
|
||||
|
||||
/**
|
||||
* Get bond connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get bond connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondConnLatency(void);
|
||||
|
||||
/**
|
||||
* Get bond link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get bond link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondLinklossTmo(void);
|
||||
|
||||
/**
|
||||
* Get bond connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get bond connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondCreateConnTmo(void);
|
||||
|
||||
/**
|
||||
* Get bond scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get bond scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondScanInterval(void);
|
||||
|
||||
/**
|
||||
* Get bond scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get bond scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getBondScanWindow(void);
|
||||
|
||||
/**
|
||||
* Get min remote name connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get min remote name connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameConnIntervalMin(void);
|
||||
|
||||
/**
|
||||
* Get max remote name connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get max remote name connection interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameConnIntervalMax(void);
|
||||
|
||||
/**
|
||||
* Get remote name connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
* Get remote name connection latency
|
||||
*
|
||||
* @return Time in slots (1 slot is 1.25ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameConnLatency(void);
|
||||
|
||||
/**
|
||||
* Get remote name link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get remote name link loss (or supervision) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameLinklossTmo(void);
|
||||
|
||||
/**
|
||||
* Get remote name connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
* Get remote name connection (or page) timeout
|
||||
*
|
||||
* @return Time in ms
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameCreateConnTmo(void);
|
||||
|
||||
/**
|
||||
* Get remote name scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get remote name scan interval
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameScanInterval(void);
|
||||
|
||||
/**
|
||||
* Get remote name scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
* Get remote name scan window
|
||||
*
|
||||
* @return Time in slots (1 slot is 0.625ms)
|
||||
*/
|
||||
extern cb_uint16 cbBM_getRemoteNameScanWindow(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
*---------------------------------------------------------------------------
|
||||
*---------------------------------------------------------------------------
|
||||
* Copyright (c) 2016, u-blox Malmö, All Rights Reserved
|
||||
* SPDX-License-Identifier: LicenseRef-PBL
|
||||
*
|
||||
|
@ -33,8 +33,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*===========================================================================
|
||||
* DEFINES
|
||||
*=========================================================================*/
|
||||
* DEFINES
|
||||
*=========================================================================*/
|
||||
#define cbBTPAN_RESULT_OK ((cb_int32)0x00000000)
|
||||
#define cbBTPAN_RESULT_ERROR ((cb_int32)0x00000001)
|
||||
#define cbBTPAN_RESULT_ILLEGAL_HANDLE ((cb_int32)0x00000002)
|
||||
|
@ -42,49 +42,49 @@ extern "C" {
|
|||
#define cbBTPAN_RESULT_LINK_LOSS ((cb_int32)0x00000004)
|
||||
|
||||
/*===========================================================================
|
||||
* TYPES
|
||||
*=========================================================================*/
|
||||
* TYPES
|
||||
*=========================================================================*/
|
||||
typedef cb_uint32 cbBTPAN_Handle;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Callback to indicate that a Bnep connection has been established.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
* @param info: Information about the connection
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
* Callback to indicate that a Bnep connection has been established.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
* @param info: Information about the connection
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbBTPAN_ConnectEvt) (cbBCM_Handle connHandle, cbBCM_ConnectionInfo info);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Callback to indicate that a Bnep connection has been disconnected.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
* Callback to indicate that a Bnep connection has been disconnected.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbBTPAN_DisconnectEvt) (cbBCM_Handle connHandle);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Callback to indicate that data has been received from remote device.
|
||||
* Callback to indicate that data has been received from remote device.
|
||||
*
|
||||
* @param btPanHandle: PAN handle
|
||||
* @param length: Length of the data
|
||||
* @param pData: Pointer to the data
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbBTPAN_DataEvt) (cbBCM_Handle connHandle, cb_uint8* pData, cb_uint16 length);
|
||||
* @param btPanHandle: PAN handle
|
||||
* @param length: Length of the data
|
||||
* @param pData: Pointer to the data
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbBTPAN_DataEvt) (cbBCM_Handle connHandle, cb_uint8 * pData, cb_uint16 length);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Callback to indicate that data has been taken care by PAN. New
|
||||
* data can now be sent on this handle.
|
||||
*
|
||||
* @param btPanHandle: PAN handle
|
||||
* @param result: cbBTPAN_RESULT_OK if the data sending succeeded
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
* Callback to indicate that data has been taken care by PAN. New
|
||||
* data can now be sent on this handle.
|
||||
*
|
||||
* @param btPanHandle: PAN handle
|
||||
* @param result: cbBTPAN_RESULT_OK if the data sending succeeded
|
||||
*
|
||||
* @return None
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbBTPAN_DataCnf) (cbBCM_Handle connHandle, cb_int32 result);
|
||||
|
||||
typedef struct
|
||||
|
@ -93,46 +93,46 @@ typedef struct
|
|||
cbBTPAN_DisconnectEvt pfDisconnectEvt;
|
||||
cbBTPAN_DataEvt pfDataEvt;
|
||||
cbBTPAN_DataCnf pfWriteCnf;
|
||||
}cbBTPAN_Callback;
|
||||
} cbBTPAN_Callback;
|
||||
|
||||
/*===========================================================================
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
/**
|
||||
* Initialization of Bluetooth PAN data. Called during stack
|
||||
* initialization. Shall not be called by application.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
* Initialization of Bluetooth PAN data. Called during stack
|
||||
* initialization. Shall not be called by application.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
extern void cbBTPAN_init(void);
|
||||
|
||||
/**
|
||||
* Registers for PAN data callbacks. Only one registration is supported.
|
||||
*
|
||||
* @param pDataCallback Data callback
|
||||
*
|
||||
* @return cbBTPAN_RESULT_OK if successful
|
||||
*/
|
||||
extern cb_uint32 cbBTPAN_registerDataCallback(cbBTPAN_Callback* pDataCallback);
|
||||
* Registers for PAN data callbacks. Only one registration is supported.
|
||||
*
|
||||
* @param pDataCallback Data callback
|
||||
*
|
||||
* @return cbBTPAN_RESULT_OK if successful
|
||||
*/
|
||||
extern cb_uint32 cbBTPAN_registerDataCallback(cbBTPAN_Callback * pDataCallback);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Sends data to the remote device. Note that you have to wait for the
|
||||
* confirmation callback (cbBTPAN_DataCnf) before calling another cbBTPAN_reqData.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
* @param pBuf: Pointer to the data
|
||||
* @param bufSize: Length of the data
|
||||
*
|
||||
* @return cbBTPAN_RESULT_OK if successful
|
||||
*-------------------------------------------------------------------------*/
|
||||
extern cb_int32 cbBTPAN_reqData(cbBCM_Handle connHandle, cb_uint8* pBuf, cb_uint16 bufSize);
|
||||
* Sends data to the remote device. Note that you have to wait for the
|
||||
* confirmation callback (cbBTPAN_DataCnf) before calling another cbBTPAN_reqData.
|
||||
*
|
||||
* @param connHandle: Connection handle
|
||||
* @param pBuf: Pointer to the data
|
||||
* @param bufSize: Length of the data
|
||||
*
|
||||
* @return cbBTPAN_RESULT_OK if successful
|
||||
*-------------------------------------------------------------------------*/
|
||||
extern cb_int32 cbBTPAN_reqData(cbBCM_Handle connHandle, cb_uint8 * pBuf, cb_uint16 bufSize);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Gets the max frame size that can be sent/received with
|
||||
* cbBTPAN_reqData/pfDataEvt
|
||||
*
|
||||
* @return max frame size
|
||||
*-------------------------------------------------------------------------*/
|
||||
* Gets the max frame size that can be sent/received with
|
||||
* cbBTPAN_reqData/pfDataEvt
|
||||
*
|
||||
* @return max frame size
|
||||
*-------------------------------------------------------------------------*/
|
||||
extern cb_int32 cbBTPAN_getMaxFrameSize(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -366,13 +366,14 @@ extern cb_int32 cbBSM_deleteBondedDevice(TBdAddr* pBdAddress);
|
|||
extern cb_int32 cbBSM_deleteAllBondedDevices(void);
|
||||
|
||||
/**
|
||||
* Initializes the static Link Keys for both classic and LE.
|
||||
* nvdsId: nvds id for the static link key,
|
||||
* (0) disables the use of a static link key.
|
||||
*
|
||||
* @return cbBSM_OK.
|
||||
*/
|
||||
* Initializes the static Link Keys for both classic and LE.
|
||||
* nvdsId: nvds id for the static link key,
|
||||
* (0) disables the use of a static link key.
|
||||
*
|
||||
* @return cbBSM_OK.
|
||||
*/
|
||||
cb_int32 cbBSM_setStaticLinkKeyNvdsId(cb_int32 nvdsId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -63,11 +63,12 @@ typedef struct
|
|||
{
|
||||
cbBSE_DataAvailEvt pfDataEvt;
|
||||
cbBSE_WriteCnf pfWriteCnf;
|
||||
}cbBSE_Callback;
|
||||
} cbBSE_Callback;
|
||||
|
||||
/*===========================================================================
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Initialization of Bluetooth serial manager. Called during stack
|
||||
* initialization. Shall not be called by application.
|
||||
|
|
|
@ -61,11 +61,12 @@ typedef struct
|
|||
{
|
||||
cbBSL_DataAvailEvt pfDataEvt;
|
||||
cbBSL_WriteCnf pfWriteCnf;
|
||||
}cbBSL_Callback;
|
||||
} cbBSL_Callback;
|
||||
|
||||
/*===========================================================================
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Initialization of Bluetooth serial manager. Called during stack
|
||||
* initialization. Shall not be called by application.
|
||||
|
|
|
@ -55,12 +55,12 @@ typedef cb_uint32 cbCERT_StreamPosition;
|
|||
* @ingroup wlan
|
||||
*/
|
||||
struct cbCERT_Stream_s {
|
||||
cb_int32(*read)(const cbCERT_Stream *stream, void *buf, cb_uint32 count); /**< Read function pointer, place count bytes in buf. */
|
||||
cb_int32(*read)(const cbCERT_Stream *stream, void *buf, cb_uint32 count); /**< Read function pointer, place count bytes in buf. */
|
||||
cb_int32(*write)(const cbCERT_Stream *stream, void *buf, cb_uint32 count); /**< Read function pointer, place count bytes in buf. */
|
||||
void(*rewind)(const cbCERT_Stream *stream); /**< Rewind function pointer, rewind stream internal iterator to the beginning. Mandatory for all streams. */
|
||||
void(*setPosition)(const cbCERT_Stream *stream, cbCERT_StreamPosition position); /**< Set absolute position. */
|
||||
cbCERT_StreamPosition(*getPosition)(const cbCERT_Stream *stream); /**< Get current position. */
|
||||
cb_uint32(*getSize)(const cbCERT_Stream *stream); /**< GetSize function pointer, return total size of stream contents. */
|
||||
void(*rewind)(const cbCERT_Stream *stream); /**< Rewind function pointer, rewind stream internal iterator to the beginning. Mandatory for all streams. */
|
||||
void(*setPosition)(const cbCERT_Stream *stream, cbCERT_StreamPosition position); /**< Set absolute position. */
|
||||
cbCERT_StreamPosition(*getPosition)(const cbCERT_Stream *stream); /**< Get current position. */
|
||||
cb_uint32(*getSize)(const cbCERT_Stream *stream); /**< GetSize function pointer, return total size of stream contents. */
|
||||
};
|
||||
|
||||
/*===========================================================================
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef enum {
|
|||
cbHW_RESET_REASON_UNKNOWN = 0,
|
||||
cbHW_RESET_REASON_FW_UPDATE,
|
||||
cbHW_RESET_REASON_PRODUCTION_MODE
|
||||
}cbHW_ResetReason;
|
||||
} cbHW_ResetReason;
|
||||
|
||||
typedef enum {
|
||||
cbHW_FLOW_CONTROL_DISABLED = 0,
|
||||
|
@ -64,7 +64,7 @@ typedef enum {
|
|||
cbHW_IRQ_MEDIUM = 3U,
|
||||
cbHW_IRQ_DEFAULT = 5U,
|
||||
cbHW_IRQ_LOW = 12U
|
||||
}cbHW_PRIO_LVL;
|
||||
} cbHW_PRIO_LVL;
|
||||
|
||||
typedef enum {
|
||||
cbHW_SYSTICK_DISABLED,
|
||||
|
@ -74,7 +74,7 @@ typedef enum {
|
|||
|
||||
typedef enum {
|
||||
cbHW_HASH_MD5
|
||||
}cbHW_HashType;
|
||||
} cbHW_HashType;
|
||||
/*===========================================================================
|
||||
* TYPES
|
||||
*=========================================================================*/
|
||||
|
|
|
@ -56,8 +56,8 @@ typedef struct
|
|||
} cbMAIN_WlanStartParams;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Callback to indicate that initialization of BT stack is completed.
|
||||
*-------------------------------------------------------------------------*/
|
||||
* Callback to indicate that initialization of BT stack is completed.
|
||||
*-------------------------------------------------------------------------*/
|
||||
typedef void(*cbMAIN_initBtComplete)(void);
|
||||
|
||||
/*===========================================================================
|
||||
|
@ -65,81 +65,81 @@ typedef void(*cbMAIN_initBtComplete)(void);
|
|||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Initialize OS, timers, GPIO's, heap and OTP.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
* Initialize OS, timers, GPIO's, heap and OTP.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_initOS(void);
|
||||
|
||||
/**
|
||||
* Start Bluetooth HW.
|
||||
*
|
||||
* @param pInitParameters Initial configuration parameters. These parameters can
|
||||
* not be changed once Bluetooth has been started.
|
||||
* @param callback Will be invoked when initialisation is done.
|
||||
* @return void
|
||||
*/
|
||||
* Start Bluetooth HW.
|
||||
*
|
||||
* @param pInitParameters Initial configuration parameters. These parameters can
|
||||
* not be changed once Bluetooth has been started.
|
||||
* @param callback Will be invoked when initialisation is done.
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_initBt(cbMAIN_BtInitParams *pInitParameters, cbMAIN_initBtComplete callback);
|
||||
|
||||
/**
|
||||
* Initialize WLAN component.
|
||||
* @return Port specific TARGET identifier
|
||||
*/
|
||||
* Initialize WLAN component.
|
||||
* @return Port specific TARGET identifier
|
||||
*/
|
||||
extern cb_int32 cbMAIN_initWlan(void);
|
||||
|
||||
/**
|
||||
* Start WLAN component.
|
||||
* Create WLAN driver instance, bind it to targetId and start the driver.
|
||||
*
|
||||
* @param targetId Port specific TARGET identifier.
|
||||
* @param params Start parameters passed to WLAN driver instance.
|
||||
* @return cbSTATUS_OK if successful, otherwise cbSTATUS_ERROR.
|
||||
*/
|
||||
* Start WLAN component.
|
||||
* Create WLAN driver instance, bind it to targetId and start the driver.
|
||||
*
|
||||
* @param targetId Port specific TARGET identifier.
|
||||
* @param params Start parameters passed to WLAN driver instance.
|
||||
* @return cbSTATUS_OK if successful, otherwise cbSTATUS_ERROR.
|
||||
*/
|
||||
extern cb_int32 cbMAIN_startWlan(cb_int32 targetId, cbMAIN_WlanStartParams *params);
|
||||
|
||||
/**
|
||||
* Register error handler function.
|
||||
*
|
||||
* @param errHandler Function to be invoked in case of error.
|
||||
* @return void
|
||||
*/
|
||||
* Register error handler function.
|
||||
*
|
||||
* @param errHandler Function to be invoked in case of error.
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_registerErrorHandler(cbMAIN_ErrorHandler errHandler);
|
||||
|
||||
/**
|
||||
* Start driver OS. This must be called after all cbMAIN_initOS/cbMAIN_initBt/cbMAIN_initWlan
|
||||
* to start the driver thread.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
* Start driver OS. This must be called after all cbMAIN_initOS/cbMAIN_initBt/cbMAIN_initWlan
|
||||
* to start the driver thread.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_startOS(void);
|
||||
|
||||
/**
|
||||
* Get event queue. Used for running a function in the same thread context as the driver.
|
||||
* Can not be called before cbMAIN_initOS/cbMAIN_initBt/cbMAIN_initWlan.
|
||||
* Use cbMAIN_dispatchEventQueue to trigger the driver to call the queued up functions.
|
||||
* @return EventQueue Pointer to the event queue where function calls can be enqueued.
|
||||
*/
|
||||
* Get event queue. Used for running a function in the same thread context as the driver.
|
||||
* Can not be called before cbMAIN_initOS/cbMAIN_initBt/cbMAIN_initWlan.
|
||||
* Use cbMAIN_dispatchEventQueue to trigger the driver to call the queued up functions.
|
||||
* @return EventQueue Pointer to the event queue where function calls can be enqueued.
|
||||
*/
|
||||
extern EventQueue* cbMAIN_getEventQueue(void);
|
||||
|
||||
/**
|
||||
* Lock driver from usage. This must be used if a C API function is used outside of the driver thread context.
|
||||
* The driver should only be locked for as small time as possible.
|
||||
* @return void
|
||||
*/
|
||||
* Lock driver from usage. This must be used if a C API function is used outside of the driver thread context.
|
||||
* The driver should only be locked for as small time as possible.
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_driverLock(void);
|
||||
|
||||
/**
|
||||
* Unlock driver. used when the C API function has finished executing to release the driver for others to use.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
* Unlock driver. used when the C API function has finished executing to release the driver for others to use.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_driverUnlock(void);
|
||||
|
||||
/**
|
||||
* Dispatch event queue. Should be called to trigger calls that have been queued up in the driver context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
* Dispatch event queue. Should be called to trigger calls that have been queued up in the driver context
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
extern void cbMAIN_dispatchEventQueue(void);
|
||||
|
||||
#endif /*_CB_MAIN_H_*/
|
||||
|
|
|
@ -90,8 +90,8 @@ cbTARGET_Handle *cbTARGET_targetResolve(cb_int32 targetId);
|
|||
void cbTARGET_reset(cbTARGET_Handle *hTarget);
|
||||
|
||||
/**
|
||||
* Register a interrupt handler with the TARGET.
|
||||
*/
|
||||
* Register a interrupt handler with the TARGET.
|
||||
*/
|
||||
void cbTARGET_registerISRHandler(cbTARGET_Handle *hTarget, cbTARGET_ISRHandler handler, void* hContext);
|
||||
|
||||
|
||||
|
|
|
@ -41,27 +41,27 @@ extern "C" {
|
|||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Put watchdog in a defined state.
|
||||
*/
|
||||
* Put watchdog in a defined state.
|
||||
*/
|
||||
void cbWD_init(void);
|
||||
|
||||
/**
|
||||
* Resets the CPU.
|
||||
*/
|
||||
* Resets the CPU.
|
||||
*/
|
||||
void cbWD_systemReset(void);
|
||||
|
||||
/**
|
||||
* Enables watchdog. Watchdog needs to be polled using cbWD_poll() with
|
||||
* shorter intervals then specified by timeInMilliseconds.
|
||||
*
|
||||
* @param timeInMilliseconds Watchdog timeout in milliseconds.
|
||||
*/
|
||||
* Enables watchdog. Watchdog needs to be polled using cbWD_poll() with
|
||||
* shorter intervals then specified by timeInMilliseconds.
|
||||
*
|
||||
* @param timeInMilliseconds Watchdog timeout in milliseconds.
|
||||
*/
|
||||
void cbWD_enable(cb_uint32 timeInMilliseconds);
|
||||
|
||||
/**
|
||||
* Poll the watchdog timer. This must be done with shorter intervalls
|
||||
* than the time in cbWD_enable().
|
||||
*/
|
||||
* Poll the watchdog timer. This must be done with shorter intervalls
|
||||
* than the time in cbWD_enable().
|
||||
*/
|
||||
void cbWD_poll(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -73,10 +73,10 @@ extern "C" {
|
|||
#define cbWLAN_MAX_DOMAIN_LENGTH 64
|
||||
|
||||
/**
|
||||
* Size of the misc buffer in @ref cbWM_ChangeBSS and @ref cbWM_StartFT.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Size of the misc buffer in @ref cbWM_ChangeBSS and @ref cbWM_StartFT.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
#define MISC_BUFFER_SIZE 255
|
||||
|
||||
#define cbWLAN_FTIE_SIZE 255
|
||||
|
@ -86,6 +86,7 @@ extern "C" {
|
|||
/*===========================================================================
|
||||
* TYPES
|
||||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Start parameters passed to WLAN driver.
|
||||
*
|
||||
|
@ -140,8 +141,6 @@ typedef struct cbWLAN_WPAPSK {
|
|||
*/
|
||||
typedef struct cbWLAN_WPAPSKConnectParameters {
|
||||
cbWLAN_WPAPSK psk; /**< WPA pre-shared key*/
|
||||
#if defined(CB_FEATURE_802DOT11W)
|
||||
#endif
|
||||
} cbWLAN_WPAPSKConnectParameters;
|
||||
|
||||
#if defined(CB_FEATURE_802DOT11R)
|
||||
|
@ -157,7 +156,7 @@ typedef struct cbWLAN_AssociateInformationElements{
|
|||
cb_uint32 mdIeLen;
|
||||
cb_uint8 ftIe[cbWLAN_FTIE_SIZE];
|
||||
cb_uint32 ftIeLen;
|
||||
}cbWLAN_AssociateInformationElements;
|
||||
} cbWLAN_AssociateInformationElements;
|
||||
#endif
|
||||
|
||||
#if defined(CB_FEATURE_802DOT11W)
|
||||
|
@ -200,7 +199,7 @@ typedef struct cbWLAN_CommonApParameters {
|
|||
cbWLAN_RateMask basicRates; /**< Basic rates. */
|
||||
cbWLAN_RateMask allowedRates; /**< BSS allowed rates. */
|
||||
cb_uint8 dtimInterval; /**< Dtim Interval. */
|
||||
}cbWLAN_CommonApParameters;
|
||||
} cbWLAN_CommonApParameters;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,10 +49,10 @@ extern "C" {
|
|||
#define cbTARGET_GSETTING_4_ADDRESS_MODE_STATION_DYNAMIC cb_BIT_0
|
||||
#define cbTARGET_GSETTING_4_ADDRESS_MODE_STATION_ALWAYS cb_BIT_1
|
||||
/**
|
||||
* General settings and tuning parameters .
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* General settings and tuning parameters .
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef enum wm_gsetting_e {
|
||||
cbTARGET_GSETTING_START = 0,
|
||||
cbTARGET_GSETTING_PREAMBLE = cbTARGET_GSETTING_START, /**< 0 = Long preamble, 1 = Short preamble */
|
||||
|
@ -123,15 +123,15 @@ typedef enum targetConfigParams {
|
|||
cbTARGET_CFG_SET_TSETTING = 2000, //!< Pipe to @ref cbWM_tSet.
|
||||
cbTARGET_CFG_GET_GSETTING = 3000, //!< Pipe to @ref cbWM_gGet.
|
||||
cbTARGET_CFG_GET_TSETTING = 4000, //!< Pipe to @ref cbWM_tGet.
|
||||
}cbTARGET_ConfigParams;
|
||||
} cbTARGET_ConfigParams;
|
||||
|
||||
#define cbTARGET_GSETTING_REG(X) ((cb_uint32)((X) - cbTARGET_GSETTING_START))
|
||||
|
||||
/**
|
||||
* Target specific settings and tuning parameters .
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Target specific settings and tuning parameters .
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef enum wm_tsetting_e {
|
||||
cbTARGET_TSETTING_START = 1000,
|
||||
cbTARGET_TSETTING_PS_LISTEN_INTERVAL = cbTARGET_TSETTING_START, /**< Powersave: Listen interval in beacons. */
|
||||
|
@ -145,13 +145,13 @@ typedef enum wm_tsetting_e {
|
|||
#define cbTARGET_TSETTING_REG(X) ((cb_uint32)((X) - cbTARGET_TSETTING_START))
|
||||
|
||||
/**
|
||||
* Defines the type of scanning procedure.
|
||||
* Passive scan will only listen for beacons.
|
||||
* Active scan will send out a probe request
|
||||
* and listen for both probe responses and beacons.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Defines the type of scanning procedure.
|
||||
* Passive scan will only listen for beacons.
|
||||
* Active scan will send out a probe request
|
||||
* and listen for both probe responses and beacons.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef enum cbWM_ScanType_e {
|
||||
cbWM_SCAN_INVALID,
|
||||
cbWM_SCAN_ACTIVE,
|
||||
|
@ -159,11 +159,11 @@ typedef enum cbWM_ScanType_e {
|
|||
} cbWM_ScanType;
|
||||
|
||||
/**
|
||||
* Power save levels.
|
||||
* @note Levels between 2 and cbWM_POWERSAVE_MAX are target specific.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Power save levels.
|
||||
* @note Levels between 2 and cbWM_POWERSAVE_MAX are target specific.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef enum cbWM_PowerSaveType_e {
|
||||
cbWM_POWERSAVE_OFF = 0,
|
||||
cbWM_POWERSAVE_FAST_PSP = 1,
|
||||
|
@ -172,10 +172,10 @@ typedef enum cbWM_PowerSaveType_e {
|
|||
} cbWM_PowerSaveType;
|
||||
|
||||
/**
|
||||
* Power save modes set using @ref cbWLAN_ioctl
|
||||
*
|
||||
* @ingroup wlan
|
||||
*/
|
||||
* Power save modes set using @ref cbWLAN_ioctl
|
||||
*
|
||||
* @ingroup wlan
|
||||
*/
|
||||
typedef enum {
|
||||
cbTARGET_POWER_SAVE_MODE_OFF,
|
||||
cbTARGET_POWER_SAVE_MODE_SLEEP,
|
||||
|
@ -185,57 +185,56 @@ typedef enum {
|
|||
typedef enum {
|
||||
cbWLAN_ONE_ANTENNA = 1,
|
||||
cbWLAN_TWO_ANTENNAS
|
||||
}cbWLAN_NUMBER_OF_ANTENNAS;
|
||||
} cbWLAN_NUMBER_OF_ANTENNAS;
|
||||
|
||||
typedef enum {
|
||||
cbWLAN_PRIMARY_ANTENNA_ONE = 1,
|
||||
cbWLAN_PRIMARY_ANTENNA_TWO
|
||||
}cbWLAN_PRIMARY_ANTENNA;
|
||||
} cbWLAN_PRIMARY_ANTENNA;
|
||||
/*===========================================================================
|
||||
* FUNCTIONS
|
||||
*=========================================================================*/
|
||||
|
||||
/**
|
||||
* Get general tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to read.
|
||||
* @return parameter value
|
||||
*/
|
||||
* Get general tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to read.
|
||||
* @return parameter value
|
||||
*/
|
||||
cb_uint32 cbTARGET_gGet(cbTARGET_Handle* hTarget, cbWM_GSETTING setting);
|
||||
|
||||
/**
|
||||
* Set general tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to modify.
|
||||
* @param value value to set.
|
||||
*/
|
||||
* Set general tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to modify.
|
||||
* @param value value to set.
|
||||
*/
|
||||
void cbTARGET_gSet(cbTARGET_Handle* hTarget, cbWM_GSETTING setting, cb_uint32 value);
|
||||
|
||||
/**
|
||||
* Get target specific tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to read.
|
||||
* @return parameter value
|
||||
*/
|
||||
* Get target specific tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to read.
|
||||
* @return parameter value
|
||||
*/
|
||||
cb_uint32 cbTARGET_tGet(cbTARGET_Handle* hTarget, cbWM_TSETTING setting);
|
||||
|
||||
/**
|
||||
* Set target specific tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to modify.
|
||||
* @param value value to set.
|
||||
*/
|
||||
* Set target specific tuning parameter.
|
||||
*
|
||||
* @param hTarget Handle to the current driver instance.
|
||||
* @param setting setting to modify.
|
||||
* @param value value to set.
|
||||
*/
|
||||
void cbTARGET_tSet(cbTARGET_Handle* hTarget, cbWM_TSETTING setting, cb_uint32 value);
|
||||
|
||||
struct cb_wlan_configuration* cbTARGET_configuration_create();
|
||||
|
||||
cbRTSL_Status cbTARGET_configure(cbTARGET_Handle* hTarget, cbTARGET_ConfigParams parameter, void* value);
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Constants
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
|
|
@ -345,10 +345,10 @@ typedef cb_uint8 cbWLAN_MACAddress[6];
|
|||
typedef cb_uint32 cbWLAN_RateMask;
|
||||
|
||||
/**
|
||||
* Transmission power
|
||||
*
|
||||
* @ingroup wlantypes
|
||||
*/
|
||||
* Transmission power
|
||||
*
|
||||
* @ingroup wlantypes
|
||||
*/
|
||||
typedef cb_uint8 cbWLAN_TxPower;
|
||||
|
||||
/**
|
||||
|
@ -423,11 +423,12 @@ cb_PACKED_STRUCT_BEGIN(cbWLAN_TimeOutInformation){
|
|||
cb_uint8 timeOutType;
|
||||
cb_uint32 value;
|
||||
} cb_PACKED_STRUCT_END(cbWLAN_TimeOutInformation);
|
||||
|
||||
/**
|
||||
* Description of the Mobility Domain Information Element
|
||||
*
|
||||
* @ingroup wlantypes
|
||||
*/
|
||||
* Description of the Mobility Domain Information Element
|
||||
*
|
||||
* @ingroup wlantypes
|
||||
*/
|
||||
|
||||
cb_PACKED_STRUCT_BEGIN(cbWLAN_FtInformation){
|
||||
cb_uint8 eId;
|
||||
|
@ -528,11 +529,11 @@ typedef struct cbWLAN_WepKey_s {
|
|||
} cbWLAN_WEPKey;
|
||||
|
||||
/**
|
||||
* Describes host revisions.
|
||||
* @see cbWM_Version
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes host revisions.
|
||||
* @see cbWM_Version
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct {
|
||||
struct {
|
||||
cb_uint32 major;
|
||||
|
@ -545,11 +546,11 @@ typedef struct {
|
|||
} cbWM_DriverRevision;
|
||||
|
||||
/**
|
||||
* Describes firmware revisions.
|
||||
* @see cbWM_Version
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes firmware revisions.
|
||||
* @see cbWM_Version
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct {
|
||||
struct {
|
||||
cb_uint32 major;
|
||||
|
@ -563,22 +564,22 @@ typedef struct {
|
|||
} cbWM_FWRevision;
|
||||
|
||||
/**
|
||||
* Describes firmware revisions. Is divided into three parts; one for the
|
||||
* host driver side, one for target firmware, and one information string
|
||||
* descibing the HW manufacturer.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes firmware revisions. Is divided into three parts; one for the
|
||||
* host driver side, one for target firmware, and one information string
|
||||
* descibing the HW manufacturer.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct version_st{
|
||||
cbWM_DriverRevision host;
|
||||
cbWM_FWRevision target;
|
||||
} cbWM_Version;
|
||||
|
||||
/**
|
||||
* Describes power levels for dynamic power level control.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes power levels for dynamic power level control.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct cbWM_TxPowerSettings_s {
|
||||
cbWLAN_TxPower lowTxPowerLevel;
|
||||
cbWLAN_TxPower medTxPowerLevel;
|
||||
|
@ -586,10 +587,10 @@ typedef struct cbWM_TxPowerSettings_s {
|
|||
} cbWM_TxPowerSettings;
|
||||
|
||||
/**
|
||||
* Describes the startup settings needed to boot properly.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes the startup settings needed to boot properly.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct cbWM_BootParameters_s {
|
||||
cbWM_TxPowerSettings txPowerSettings;
|
||||
cb_uint8 primaryAntenna;
|
||||
|
@ -597,10 +598,10 @@ typedef struct cbWM_BootParameters_s {
|
|||
} cbWM_BootParameters;
|
||||
|
||||
/**
|
||||
* Describes an access point.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes an access point.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct cbWLAN_ApInformation {
|
||||
cbWLAN_Ssid ssid; /**< SSID */
|
||||
cbWLAN_MACAddress bssid; /**< BSSID */
|
||||
|
@ -608,10 +609,10 @@ typedef struct cbWLAN_ApInformation {
|
|||
} cbWLAN_ApInformation;
|
||||
|
||||
/**
|
||||
* Describes a station connected to an access point.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
* Describes a station connected to an access point.
|
||||
*
|
||||
* @ingroup types
|
||||
*/
|
||||
typedef struct cbWLAN_ApStaInformation {
|
||||
cbWLAN_MACAddress MAC;
|
||||
} cbWLAN_ApStaInformation;
|
||||
|
@ -619,7 +620,7 @@ typedef struct cbWLAN_ApStaInformation {
|
|||
typedef struct cbWLAN_HTCapabilities_st {
|
||||
cbWLAN_RateMask rates;
|
||||
cb_uint16 info;
|
||||
}cbWLAN_HTCapabilities;
|
||||
} cbWLAN_HTCapabilities;
|
||||
/*---------------------------------------------------------------------------
|
||||
* VARIABLE DECLARATIONS
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
@ -654,11 +655,11 @@ extern const cb_uint8 PATTERN_WME_PE[3];
|
|||
cbWLAN_Band cbWLAN_getBandFromChannel(cbWLAN_Channel channel);
|
||||
|
||||
/**
|
||||
* Returns the valid rates @ref cbWLAN_RateMask based for the channel.
|
||||
*
|
||||
* @param channel The channel to be queried for rates.
|
||||
* @return The valid rates @ref cbWLAN_RateMask for the requested channel.
|
||||
*/
|
||||
* Returns the valid rates @ref cbWLAN_RateMask based for the channel.
|
||||
*
|
||||
* @param channel The channel to be queried for rates.
|
||||
* @return The valid rates @ref cbWLAN_RateMask for the requested channel.
|
||||
*/
|
||||
cbWLAN_RateMask cbWLAN_getRatesForChannel(cbWLAN_Channel channel, cb_uint8 numberOfAntennas);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue