Skip to content

Commit

Permalink
refactor(BLE): Updating API to match new Library (analogdevicesinc#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-gillespie authored Jul 24, 2024
1 parent 8fc1336 commit dd26a3e
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Examples/MAX32655/Bluetooth/BLE4_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
#include "pal_cfg.h"
Expand Down Expand Up @@ -130,7 +132,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
4 changes: 3 additions & 1 deletion Examples/MAX32655/Bluetooth/BLE5_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "wsf_cs.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
Expand Down Expand Up @@ -162,7 +164,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
4 changes: 3 additions & 1 deletion Examples/MAX32665/Bluetooth/BLE4_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
#include "pal_cfg.h"
Expand Down Expand Up @@ -130,7 +132,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
4 changes: 3 additions & 1 deletion Examples/MAX32665/Bluetooth/BLE5_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "wsf_cs.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
Expand Down Expand Up @@ -162,7 +164,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
4 changes: 3 additions & 1 deletion Examples/MAX32690/Bluetooth/BLE4_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
#include "pal_cfg.h"
Expand Down Expand Up @@ -130,7 +132,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
4 changes: 3 additions & 1 deletion Examples/MAX32690/Bluetooth/BLE5_ctr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include "wsf_timer.h"
#include "wsf_trace.h"
#include "wsf_bufio.h"
#include "wsf_types.h"
#include "wsf_os.h"
#include "wsf_cs.h"
#include "bb_ble_sniffer_api.h"
#include "pal_bb.h"
Expand Down Expand Up @@ -162,7 +164,7 @@ static void mainWsfInit(void)
* \return TRUE if there is token pending.
*/
/*************************************************************************************************/
static bool_t mainCheckServiceTokens(void)
static bool mainCheckServiceTokens(void)
{
bool_t eventPending = FALSE;

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Cordio/controller/include/common/chci_tr.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void chciTrSendComplete(void);
* \return TRUE if work pending, FALSE if no work is pending.
*/
/*************************************************************************************************/
bool_t ChciTrService(void);
bool ChciTrService(void);

#ifdef __cplusplus
};
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd_vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
uint8_t status = HCI_SUCCESS;
uint8_t evtParamLen = 1; /* default is status field only */
uint32_t regReadAddr = 0;
uint8_t channel = 0;

/* Decode and consume command packet. */

Expand Down Expand Up @@ -214,7 +213,6 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
case LHCI_OPCODE_VS_GET_RSSI:
{
status = LL_SUCCESS;
channel = pBuf[0];
evtParamLen += sizeof(int8_t);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Cordio/controller/sources/ble/ll/ll_main_dtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ uint8_t LlEnhancedRxTest(uint8_t rfChan, uint8_t phy, uint8_t modIdx, uint16_t n
llTestCb.state = LL_TEST_STATE_RX;
lmgrCb.testEnabled = TRUE;
LmgrIncResetRefCount();
memset(&llTestCb.rpt, 0, sizeof(llTestCb.rpt)); /* clear report */
memset((void*)&llTestCb.rpt, 0, sizeof(llTestCb.rpt)); /* clear report */
BbStart(BB_PROT_BLE_DTM);
SchInsertNextAvailable(pOp);

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Cordio/controller/sources/common/chci/chci_tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ void chciTrRecv(uint8_t prot, uint8_t type, uint8_t *pBuf)
* \return TRUE if work pending, FALSE if no work is pending.
*/
/*************************************************************************************************/
bool_t ChciTrService(void)
bool ChciTrService(void)
{
#if (CHCI_TR_UART == 1)
if (chciTrCb.wrBufComp)
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Cordio/wsf/include/wsf_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ typedef wsfHandlerId_t wsfTaskId_t;
typedef uint8_t wsfTaskEvent_t;

/*! \brief Idle check function. */
typedef bool_t (*WsfOsIdleCheckFunc_t)(void);
typedef bool (*WsfOsIdleCheckFunc_t)(void);

/**************************************************************************************************
External Variables
Expand Down
3 changes: 3 additions & 0 deletions Libraries/Cordio/wsf/include/wsf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ extern "C" {
#define bool_t uint8_t
#endif

/* New library uses bool instead of bool_t */
#define bool _Bool

#ifndef FALSE
#define FALSE 0
#endif
Expand Down

0 comments on commit dd26a3e

Please sign in to comment.