Skip to content

Commit

Permalink
Merge pull request #1201 from analogdevicesinc/release-main
Browse files Browse the repository at this point in the history
chore(Other): Stage October 2024 Release
  • Loading branch information
lorne-maxim authored Oct 1, 2024
2 parents f8d2e36 + 07b1c0e commit 9535fbe
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 15 deletions.
8 changes: 5 additions & 3 deletions Libraries/CMSIS/Device/Maxim/GCC/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

ifeq "$(PYTHON_CMD)" ""
# Try python
ifneq "$(wildcard $(MAXIM_PATH)/.git)" ""
ifneq "$(wildcard $(MAXIM_PATH)/.github)" ""
PYTHON_VERSION := $(shell python --version)
ifneq ($(.SHELLSTATUS),0)
PYTHON_CMD := none
Expand All @@ -46,15 +46,17 @@ endif
export PYTHON_CMD
endif

# Run script
# Make sure script exists before running. This won't run when working in the official MSDK release (non-GitHub)
ifneq ("$(wildcard $(MAXIM_PATH)/.github)", "")
# Run script if exists.
ifneq "$(PYTHON_CMD)" "none"
UPDATE_VERSION_OUTPUT := $(shell python $(MAXIM_PATH)/.github/workflows/scripts/update_version.py)
else
$(warning No Python installation detected on your system! Will not automatically update version info.)
endif
endif
endif


ifneq "$(wildcard $(MAXIM_PATH)/Libraries/CMSIS/Device/Maxim/GCC/mxc_version.mk)" ""
include $(MAXIM_PATH)/Libraries/CMSIS/Device/Maxim/GCC/mxc_version.mk
endif
Expand Down
5 changes: 4 additions & 1 deletion Libraries/CMSIS/Device/Maxim/GCC/gcc_riscv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ endif
export PYTHON_CMD
endif

# Run script
# Make sure script exists before running. This won't run when working in the official MSDK release (non-GitHub)
ifneq ("$(wildcard $(MAXIM_PATH)/.github)", "")
# Run script if exists.
ifneq "$(PYTHON_CMD)" "none"
UPDATE_VERSION_OUTPUT := $(shell python $(MAXIM_PATH)/.github/workflows/scripts/update_version.py)
else
$(warning No Python installation detected on your system! Will not automatically update version info.)
endif
endif
endif

Expand Down
94 changes: 85 additions & 9 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_cmd_vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Copyright (c) 2013-2019 Arm Ltd. All Rights Reserved.
*
* Copyright (c) 2019-2020 Packetcraft, Inc.
*
* Portions Copyright (c) 2024 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,6 +95,9 @@ 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;
uint32_t channel = 0;

(void)channel;

/* Decode and consume command packet. */

Expand Down Expand Up @@ -276,8 +281,65 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
}
case LHCI_OPCODE_VS_GET_RSSI:
{
status = LL_SUCCESS;
#if 0
channel = pBuf[0];

if(channel > LL_DTM_MAX_CHAN_IDX)
{
status = LL_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE;
}
else{
status = LL_SUCCESS;
}
evtParamLen += sizeof(int8_t);
#else
status = LL_ERROR_CODE_CMD_DISALLOWED;
#endif

break;
}
case LHCI_OPCODE_VS_FGEN:
{
#if 0
uint8_t enable = pBuf[0];

if(enable)
{
int8_t txPower = 0;
uint32_t frequency_khz = pBuf[3] << 16 | pBuf[2] << 8 | pBuf[1];
PalBbPatternType_t patternType = pBuf[4];

status = LlGetAdvTxPower(&txPower);

if(status != LL_SUCCESS)
{
break;
}
else if(PalBbFgenIsEnabled())
{
status = LL_ERROR_CODE_CMD_DISALLOWED;
}
else if(!PalBbIsValidPrbsType(patternType))
{
status = LL_ERROR_CODE_INVALID_HCI_CMD_PARAMS;
}
else{
const bool freqOk = PalBbEnableFgen(frequency_khz, patternType, txPower);
status = freqOk ? LL_SUCCESS : LL_ERROR_CODE_PARAM_OUT_OF_MANDATORY_RANGE;
}


}
else
{
PalBbDisableFgen();
status = LL_SUCCESS;
}

#else
status = LL_ERROR_CODE_CMD_DISALLOWED;
#endif

break;
}
case LHCI_OPCODE_VS_RESET_ADV_STATS:
Expand Down Expand Up @@ -319,22 +381,36 @@ bool_t lhciCommonVsStdDecodeCmdPkt(LhciHdr_t *pHdr, uint8_t *pBuf)
case LHCI_OPCODE_VS_TX_TEST:
case LHCI_OPCODE_VS_RESET_ADV_STATS:
case LHCI_OPCODE_VS_RESET_SCAN_STATS:
case LHCI_OPCODE_VS_FGEN:

/* no action */
break;
case LHCI_OPCODE_VS_GET_RSSI:
{
#if 0
if(status != LL_SUCCESS)
{
break;
}

int8_t rssi = 0;
PalBbGetRssi(&rssi, channel);


pBuf[0] = (uint8_t)rssi;
#else
pBuf[0] = INT8_MIN;
#endif



break;
}

case LHCI_OPCODE_VS_RESET_TEST_STATS: {
BbBleResetTestStats();
break;
}
case LHCI_OPCODE_VS_GET_RSSI:{
/*
TODO: Needs feature in PHY
*/
// PalBbEnable();
pBuf[0] = -10;
break;
}

case LHCI_OPCODE_VS_SET_LOCAL_FEAT:
case LHCI_OPCODE_VS_SET_DIAG_MODE:
Expand Down
10 changes: 8 additions & 2 deletions Libraries/Cordio/controller/sources/ble/lhci/lhci_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Copyright (c) 2013-2019 Arm Ltd. All Rights Reserved.
*
* Copyright (c) 2019-2020 Packetcraft, Inc.
*
* Portions Copyright (c) 2024 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -377,10 +379,14 @@ extern "C" {
0x306) /*!<Vendor specific Get RSSI*/
#define LHCI_OPCODE_VS_RESET_ADV_STATS \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x307) /*!<Vendor specific Get RSSI*/
0x307) /*!<Vendor specific reset adv stats*/
#define LHCI_OPCODE_VS_RESET_SCAN_STATS \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x308) /*!<Vendor specific Get RSSI*/
0x308) /*!<Vendor specific reset scan stats*/
#define LHCI_OPCODE_VS_FGEN \
HCI_OPCODE(HCI_OGF_VENDOR_SPEC, \
0x309) /*!<Vendor specific frequency generator*/

/* 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
68 changes: 68 additions & 0 deletions Libraries/Cordio/platform/include/pal_bb.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Copyright (c) 2016-2019 Arm Ltd. All Rights Reserved.
*
* Copyright (c) 2019-2020 Packetcraft, Inc.
*
* Portions Copyright (c) 2024 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,6 +28,7 @@
#define PAL_BB_H

#include "pal_types.h"
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -78,6 +81,15 @@ enum PalBbPhy_op {
BB_PHY_OPTIONS_BLE_S8 = 2 /*!< Always use S=8 coding when transmitting on LE Coded PHY. */
};

typedef enum
{
PAL_BB_CW,
PAL_BB_PRBS9,
PAL_BB_PRBS15,
PAL_BB_DF1,
PAL_BB_DF2
}PalBbPatternType_t;

#ifndef BB_CLK_RATE_HZ
/*! \brief BB clock rate in hertz. */
#define BB_CLK_RATE_HZ 1000000
Expand Down Expand Up @@ -160,6 +172,8 @@ typedef struct {
uint8_t patch;
char *buildDate;
} PalBbPhyVersion_t;


/**************************************************************************************************
Function Declarations
**************************************************************************************************/
Expand Down Expand Up @@ -281,6 +295,60 @@ void PalBbSetProtId(uint8_t protId);
/*************************************************************************************************/
const PalBbPhyVersion_t *PalBbGetPhyVersion(void);

/*************************************************************************************************/
/*!
* \brief Enable frequency generator
*
* \param freqKhz Frequency to transmit in KHz, Valid range 2402000 - 2500000
*
* \param type PRBS TYPE
*/
/*************************************************************************************************/
bool PalBbEnableFgen(uint32_t freqKhz, PalBbPatternType_t type, int8_t txPower);

/*************************************************************************************************/
/*!
* \brief Disable frequency generator
*
*/
/*************************************************************************************************/
void PalBbDisableFgen(void);

/*************************************************************************************************/
/*!
* \brief Check if the fgen functionality is enabled
* \return true if enabled. false otherwise
*/
/*************************************************************************************************/
bool PalBbFgenIsEnabled(void);

/*************************************************************************************************/
/*!
* \brief Sample an RSSI capture
*
* \param rssi Pointer to rssi output.
* \param channel RF channel to sample RSSI on.
* \return FALSE if RSSI capture times out
*/
/*************************************************************************************************/
bool_t PalBbGetRssi(int8_t *rssi, uint8_t rfChannel);

static inline bool PalBbIsValidPrbsType(uint8_t maybeType)
{
switch (maybeType)
{
case PAL_BB_CW:
case PAL_BB_PRBS9:
case PAL_BB_PRBS15:
case PAL_BB_DF1:
case PAL_BB_DF2:
return true;

default:
return false;
}
}

/*! \} */ /* PAL_BB */

#ifdef __cplusplus
Expand Down
9 changes: 9 additions & 0 deletions Libraries/Cordio/platform/include/pal_bb_ble.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ void PalBbBleDisable(void);
/*************************************************************************************************/
void PalBbBleSetChannelParam(PalBbBleChan_t *pChan);

/*************************************************************************************************/
/*!
* \brief Set channelization parameters.
*
* \return pChan
*/
/*************************************************************************************************/
const PalBbBleChan_t* PalBbBleGetChannelParam(void);

/*! \} */ /* PAL_BB_BLE_CHAN */

/*! \addtogroup PAL_BB_BLE_DATA
Expand Down
34 changes: 34 additions & 0 deletions Libraries/zephyr/MAX/Include/wrap_max32_sdhc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/******************************************************************************
*
* Copyright (C) 2024 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/

#ifndef LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_SDHC_H_
#define LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_SDHC_H_

/***** Includes *****/
#include <sdhc.h>
#include "sdhc_reva.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#endif // LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_SDHC_H_

0 comments on commit 9535fbe

Please sign in to comment.