mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
ieee802154: add support ieee802154 for esp32c6
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include "esp32c3/rom/rom_layout.h"
|
||||
#include "esp_timer.h"
|
||||
#include "esp_sleep.h"
|
||||
#include "phy.h"
|
||||
#include "esp_private/phy.h"
|
||||
|
||||
#if CONFIG_BT_ENABLED
|
||||
|
||||
|
@@ -21,6 +21,10 @@ else()
|
||||
list(APPEND srcs "src/phy_init.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_BT_SUPPORTED OR CONFIG_SOC_IEEE802154_SUPPORTED)
|
||||
list(APPEND srcs "src/btbb_init.c")
|
||||
endif()
|
||||
|
||||
idf_build_get_property(build_dir BUILD_DIR)
|
||||
|
||||
if(CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN)
|
||||
|
@@ -170,6 +170,16 @@ void esp_phy_enable(void);
|
||||
*/
|
||||
void esp_phy_disable(void);
|
||||
|
||||
/**
|
||||
* @brief Enable BTBB module
|
||||
*
|
||||
* BTBB module should be enabled in order to use IEEE802154 or BT.
|
||||
* Now BTBB enabling job is done automatically when start IEEE802154 or BT. Users should not
|
||||
* call this API in their application.
|
||||
*
|
||||
*/
|
||||
void esp_btbb_enable(void);
|
||||
|
||||
/**
|
||||
* @brief Load calibration data from NVS and initialize PHY and RF module
|
||||
*/
|
||||
|
23
components/esp_phy/include/esp_private/btbb.h
Normal file
23
components/esp_phy/include/esp_private/btbb.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Set btbb enable for BT/ieee802154
|
||||
* @param[in] print_version enable btbb version print.
|
||||
* @return NULL
|
||||
*/
|
||||
void bt_bb_v2_init_cmplx(int print_version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
25
components/esp_phy/src/btbb_init.c
Normal file
25
components/esp_phy/src/btbb_init.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "esp_private/btbb.h"
|
||||
|
||||
#define BTBB_ENABLE_VERSION_PRINT 1
|
||||
|
||||
static _lock_t s_btbb_access_lock;
|
||||
/* Reference count of enabling BT BB */
|
||||
static uint8_t s_btbb_access_ref = 0;
|
||||
|
||||
void esp_btbb_enable(void)
|
||||
{
|
||||
_lock_acquire(&s_btbb_access_lock);
|
||||
if (s_btbb_access_ref == 0) {
|
||||
bt_bb_v2_init_cmplx(BTBB_ENABLE_VERSION_PRINT);
|
||||
}
|
||||
s_btbb_access_ref++;
|
||||
_lock_release(&s_btbb_access_lock);
|
||||
}
|
@@ -23,7 +23,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/portmacro.h"
|
||||
#include "endian.h"
|
||||
#include "phy.h"
|
||||
#include "esp_private/phy.h"
|
||||
#include "phy_init_data.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include "esp_attr.h"
|
||||
#include "freertos/portmacro.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "phy.h"
|
||||
#include "esp_private/phy.h"
|
||||
|
||||
#define PHY_ENABLE_VERSION_PRINT 1
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include "esp_netif.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "phy.h"
|
||||
#include "esp_private/phy.h"
|
||||
|
||||
#if (CONFIG_ESP32_WIFI_RX_BA_WIN > CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM)
|
||||
#error "WiFi configuration check: WARNING, WIFI_RX_BA_WIN should not be larger than WIFI_DYNAMIC_RX_BUFFER_NUM!"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
menu "IEEE 802.15.4"
|
||||
visible if IDF_TARGET_ESP32H4
|
||||
visible if SOC_IEEE802154_SUPPORTED
|
||||
|
||||
config IEEE802154_ENABLED
|
||||
bool
|
||||
default "y" if IDF_TARGET_ESP32H4
|
||||
default "y" if SOC_IEEE802154_SUPPORTED
|
||||
|
||||
endmenu # IEEE 802.15.4
|
||||
|
Submodule components/ieee802154/lib updated: 5c51d657d4...7c691d705b
@@ -74,3 +74,4 @@ PROVIDE ( LPPERI = 0x600B2800 );
|
||||
PROVIDE ( LP_ANA_PERI = 0x600B2C00 );
|
||||
PROVIDE ( LP_APM = 0x600B3800 );
|
||||
PROVIDE ( OTP_DEBUG = 0x600B3C00 );
|
||||
PROVIDE ( IEEE802154 = 0x600A3000 );
|
||||
|
Reference in New Issue
Block a user