Skip to content

Commit

Permalink
Update drivers 5.3.1 (#478)
Browse files Browse the repository at this point in the history
* Update drivers

* Fix ESP32 WiFi

* Align ESP32-C2 ROM functions

* Update ESP32-C3 ROM functions

* ESP32-C3: use a bit less from ROM
  • Loading branch information
bjoernQ authored Sep 26, 2024
1 parent c25752e commit 30d4346
Show file tree
Hide file tree
Showing 159 changed files with 19,657 additions and 15,697 deletions.
541 changes: 317 additions & 224 deletions esp-wifi-sys/headers/esp32/esp_bt.h

Large diffs are not rendered by default.

137 changes: 16 additions & 121 deletions esp-wifi-sys/headers/esp32/phy_init_data.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -9,10 +9,13 @@
#include "esp_phy_init.h"
#include "sdkconfig.h"

#ifdef __cplusplus
extern "C" {
#endif
// constrain a value between 'low' and 'high', inclusive
#define LIMIT(val, low, high) ((val < low) ? low : (val > high) ? high : val)

#define PHY_INIT_MAGIC "PHYINIT"
#define PHY_INIT_MAGIC "PHYINIT"
#define PHY_INIT_MAGIC_LEN 8 // should be strlen(PHY_INIT_MAGIC) + 1

// define the lowest tx power as LOWEST_PHY_TX_POWER
#define PHY_TX_POWER_LOWEST LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 0, 52)
Expand All @@ -25,129 +28,16 @@
#define PHY_INIT_DATA_TYPE_OFFSET 126
#define PHY_SUPPORT_MULTIPLE_BIN_OFFSET 125
#endif
static const char phy_init_magic_pre[] = PHY_INIT_MAGIC;

/**
* @brief Structure containing default recommended PHY initialization parameters.
*/
static const esp_phy_init_data_t phy_init_data= { {
3,
3,
0x05,
0x09,
0x06,
0x05,
0x03,
0x06,
0x05,
0x04,
0x06,
0x04,
0x05,
0x00,
0x00,
0x00,
0x00,
0x05,
0x09,
0x06,
0x05,
0x03,
0x06,
0x05,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0xfc,
0xfc,
0xfe,
0xf0,
0xf0,
0xf0,
0xe0,
0xe0,
0xe0,
0x18,
0x18,
0x18,
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 78),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 72),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 66),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 60),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 56),
LIMIT(CONFIG_ESP_PHY_MAX_TX_POWER * 4, 40, 52),
0,
1,
1,
2,
2,
3,
4,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
} };

static const char phy_init_magic_post[] = PHY_INIT_MAGIC;
extern const char phy_init_magic_pre[];
extern const esp_phy_init_data_t phy_init_data;
extern const char phy_init_magic_post[];

#if CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN
/**
* @brief PHY init data control infomation structure
* @brief PHY init data control information structure
*/
typedef struct {
uint8_t control_info_checksum[4]; /*!< 4-byte control infomation checksum */
uint8_t control_info_checksum[4]; /*!< 4-byte control information checksum */
uint8_t multiple_bin_checksum[4]; /*!< 4-byte multiple bin checksum */
uint8_t check_algorithm; /*!< check algorithm */
uint8_t version; /*!< PHY init data bin version */
Expand All @@ -164,4 +54,9 @@ typedef struct {
uint8_t type;
} phy_country_to_bin_type_t;
#endif

#ifdef __cplusplus
}
#endif

#endif /* PHY_INIT_DATA_H */
Loading

0 comments on commit 30d4346

Please sign in to comment.