Skip to content

Commit

Permalink
fix(Examples): Updated Wording in FCC Examples (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI authored Dec 13, 2023
1 parent f7c6e35 commit 2847447
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 37 deletions.
20 changes: 10 additions & 10 deletions Examples/MAX32655/Bluetooth/BLE_fcc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ void TMR2_IRQHandler(void)
void printUsage(void)
{
APP_TRACE_INFO0("Usage: ");
APP_TRACE_INFO0(" (0) Transmit on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (0) Transmit Continuous Modulated on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit Continuous Modulated on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit Continuous Modulated RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (3) Receive on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (4) Set Transmit power");
APP_TRACE_INFO0(" (5) Enable constant TX");
APP_TRACE_INFO0(" (5) Enable Constant Unmodulated TX");
APP_TRACE_INFO0(" (6) Disable constant TX -- MUST be called after (5)");
/* APP_TRACE_INFO0(" (7) Set PA value"); */
APP_TRACE_INFO0(" (8) Set PHY");
Expand Down Expand Up @@ -193,27 +193,27 @@ static void processConsoleRX(uint8_t rxByte)
switch (cmd) {
case '0':

APP_TRACE_INFO1("Transmit RF channel 0, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 0, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(0, 255, LL_TEST_PKT_TYPE_AA, phy, 0);
res = LlEnhancedTxTest(0, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;

case '1':

APP_TRACE_INFO1("Transmit RF channel 19, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 19, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(19, 255, LL_TEST_PKT_TYPE_AA, phy, 0);
res = LlEnhancedTxTest(19, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;

case '2':

APP_TRACE_INFO1("Transmit RF channel 39, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 39, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(39, 255, LL_TEST_PKT_TYPE_AA, phy, 0);
res = LlEnhancedTxTest(39, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;
Expand Down
21 changes: 11 additions & 10 deletions Examples/MAX32665/Bluetooth/BLE_fcc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ void TMR2_IRQHandler(void)
void printUsage(void)
{
APP_TRACE_INFO0("Usage: ");
APP_TRACE_INFO0(" (0) Transmit on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (0) Transmit Continuous Modulated on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit Continuous Modulated on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit Continuous Modulated RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (3) Receive on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (4) Set Transmit power");
APP_TRACE_INFO0(" (5) Enable constant PRBS9 TX");
APP_TRACE_INFO0(" (5) Enable Constant Unmodulated TX");
APP_TRACE_INFO0(" (6) Disable constant TX -- MUST be called after (5)");
/* APP_TRACE_INFO0(" (7) Set PA value"); */
APP_TRACE_INFO0(" (8) Set PHY");
APP_TRACE_INFO0(" (9) TX Frequency Hop");
APP_TRACE_INFO0(" (e) End transmission -- MUST be used after each (0-3, 9)");
Expand Down Expand Up @@ -199,27 +200,27 @@ static void processConsoleRX(uint8_t rxByte)
switch (cmd) {
case '0':

APP_TRACE_INFO1("Transmit RF channel 0 (2402M), 255 bytes/pkt, 0xPRBS9, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 0 (2402M), 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr());
res = LlEnhancedTxTest(0, 255, LL_TEST_PKT_TYPE_PRBS9, phy, 0);
res = LlEnhancedTxTest(0, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;

case '1':

APP_TRACE_INFO1("Transmit RF channel 19 (2440M), 255 bytes/pkt, 0xPRBS9, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 19 (2440M), 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr());
res = LlEnhancedTxTest(19, 255, LL_TEST_PKT_TYPE_PRBS9, phy, 0);
res = LlEnhancedTxTest(19, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;

case '2':

APP_TRACE_INFO1("Transmit RF channel 39 (2480M), 255 bytes/pkt, 0xPRBS9, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 39 (2480M), 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr());
res = LlEnhancedTxTest(39, 255, LL_TEST_PKT_TYPE_PRBS9, phy, 0);
res = LlEnhancedTxTest(39, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
cmd = 0;
break;
Expand Down
14 changes: 7 additions & 7 deletions Examples/MAX32690/Bluetooth/BLE_fcc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ void TMR2_IRQHandler(void)
void printUsage(void)
{
APP_TRACE_INFO0("Usage: ");
APP_TRACE_INFO0(" (0) Transmit on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (0) Transmit Continuous Modulated on RF channel 0 (2402 MHz)");
APP_TRACE_INFO0(" (1) Transmit Continuous Modulated on RF channel 19 (2440 MHz)");
APP_TRACE_INFO0(" (2) Transmit Continuous Modulated RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (3) Receive on RF channel 39 (2480 MHz)");
APP_TRACE_INFO0(" (4) Set Transmit power");
APP_TRACE_INFO0(" (5) Enable constant TX");
APP_TRACE_INFO0(" (5) Enable Constant Unmodulated TX");
APP_TRACE_INFO0(" (6) Disable constant TX -- MUST be called after (5)");
/* APP_TRACE_INFO0(" (7) Set PA value"); */
APP_TRACE_INFO0(" (8) Set PHY");
Expand Down Expand Up @@ -193,7 +193,7 @@ static void processConsoleRX(uint8_t rxByte)
switch (cmd) {
case '0':

APP_TRACE_INFO1("Transmit RF channel 0, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 0, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(0, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
Expand All @@ -202,7 +202,7 @@ static void processConsoleRX(uint8_t rxByte)

case '1':

APP_TRACE_INFO1("Transmit RF channel 19, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 19, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(19, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
Expand All @@ -211,7 +211,7 @@ static void processConsoleRX(uint8_t rxByte)

case '2':

APP_TRACE_INFO1("Transmit RF channel 39, 255 bytes/pkt, 0xAA, %s, forever ..",
APP_TRACE_INFO1("Transmit RF channel 39, 255 bytes/pkt, PRBS15, %s, forever ..",
getPhyStr(phy));
res = LlEnhancedTxTest(39, 255, LL_TEST_PKT_TYPE_PRBS15, phy, 0);
APP_TRACE_INFO2("res = %u %s", res, res == LL_SUCCESS ? "(SUCCESS)" : "(FAIL)");
Expand Down
9 changes: 8 additions & 1 deletion Libraries/Cordio/controller/include/ble/bb_ble_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,14 @@ void BbBleResetConnStats(void);
*/
/*************************************************************************************************/
void BbBleGetTestStats(BbBleDataPktStats_t *pStats);

/*************************************************************************************************/
/*!
* \brief Reset test mode packet statistics.
*
* \return None.
*/
/*************************************************************************************************/
void BbBleResetTestStats(void);
/*************************************************************************************************/
/*!
* \brief Get PDU filter statistics.
Expand Down
9 changes: 9 additions & 0 deletions Libraries/Cordio/controller/sources/ble/bb/bb_ble_dtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,12 @@ void BbBleGetTestStats(BbBleDataPktStats_t *pStats)
{
*pStats = bbTestStats;
}
/*************************************************************************************************/
/*!
* \brief Reset test mode packet statistics.
*/
/*************************************************************************************************/
void BbBleResetTestStats(void)
{
memset(&bbTestStats, 0, sizeof(bbTestStats));
}
6 changes: 6 additions & 0 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "util/bstream.h"
#include "lmgr_api.h"
#include <string.h>
#include "bb_ble_api.h"

/*************************************************************************************************/
/*!
Expand Down Expand Up @@ -266,9 +267,11 @@ static void lhciCommonSendCmdCmplEvt(LhciHdr_t *pCmdHdr, uint8_t status, uint8_t
/* --- test --- */

case HCI_OPCODE_LE_RECEIVER_TEST:

lhciPackCmdCompleteEvtStatus(pBuf, status);
break;
case HCI_OPCODE_LE_TRANSMITTER_TEST:

lhciPackCmdCompleteEvtStatus(pBuf, status);
break;
case HCI_OPCODE_LE_TEST_END:
Expand Down Expand Up @@ -420,10 +423,13 @@ bool_t lhciCommonDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
/* --- test --- */

case HCI_OPCODE_LE_RECEIVER_TEST:

status = LlRxTest(pBuf[0], 0);
paramLen = LHCI_LEN_LE_RECEIVER_TEST_EVT;
break;
case HCI_OPCODE_LE_TRANSMITTER_TEST:


status = LlTxTest(pBuf[0], pBuf[1], pBuf[2], 0);
paramLen = LHCI_LEN_LE_TRANSMITTER_TEST_EVT;
break;
Expand Down
21 changes: 14 additions & 7 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd_vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "wsf_msg.h"
#include "wsf_trace.h"
#include "util/bstream.h"
#include "bb_ble_api.h"
#include <string.h>

/**************************************************************************************************
Expand Down Expand Up @@ -81,7 +82,7 @@ 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;
LlTestReport_t rpt = { 0 };


/* Decode and consume command packet. */

Expand Down Expand Up @@ -199,9 +200,15 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
status = LlEnhancedTxTest(pBuf[0], pBuf[1], pBuf[2], pBuf[3], numPackets);
break;
}
case LHCI_OPCODE_VS_END_TEST: {
status = LlEndTest(&rpt);
evtParamLen += sizeof(LlTestReport_t);
case LHCI_OPCODE_VS_RESET_TEST_STATS: {
status = LL_SUCCESS;

break;
}
case LHCI_OPCODE_VS_RX_TEST:
{
uint16_t numPackets = (pBuf[4] << 8) | pBuf[3];
status = LlEnhancedRxTest(pBuf[0], pBuf[1], pBuf[2], numPackets);
break;
}

Expand All @@ -227,14 +234,14 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
case LHCI_OPCODE_VS_SET_TX_TEST_ERR_PATT:
case LHCI_OPCODE_VS_SET_SNIFFER_ENABLE:
case LHCI_OPCODE_VS_REG_WRITE:

case LHCI_OPCODE_VS_RX_TEST:
case LHCI_OPCODE_VS_TX_TEST:

/* no action */
break;

case LHCI_OPCODE_VS_END_TEST: {
memcpy(pBuf, (uint8_t *)&rpt, sizeof(LlTestReport_t));
case LHCI_OPCODE_VS_RESET_TEST_STATS: {
BbBleResetTestStats();
break;
}

Expand Down
6 changes: 4 additions & 2 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,12 @@ extern "C" {
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x302) /*!< Reset connection stats. */
#define LHCI_OPCODE_VS_TX_TEST \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x303) /*!< Vendor specific TX test that takes numPkt param. */

#define LHCI_OPCODE_VS_END_TEST \
#define LHCI_OPCODE_VS_RESET_TEST_STATS \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x304) /*!<Vendor specific End Test Returning More than RX Packets*/
#define LHCI_OPCODE_VS_RX_TEST \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x305) /*!<Vendor specific RX Test*/
/* Vendor specific event masks. */
#define LHCI_VS_EVT_MASK_SCAN_REPORT_EVT 0x01 /*!< (Byte 0) VS event bit, scan report. */
#define LHCI_VS_EVT_MASK_DIAG_TRACE_EVT 0x02 /*!< (Byte 0) VS event bit, diagnostic tracing. */
Expand Down

0 comments on commit 2847447

Please sign in to comment.