1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

Merge remote-tracking branch 'esp8266/master'

This commit is contained in:
Me No Dev
2015-12-22 12:45:37 +02:00
9 changed files with 37 additions and 10 deletions

View File

@ -24,7 +24,9 @@
#include <stddef.h>
#include <stdbool.h>
static uint8_t phy_init_data[128] =
#include "c_types.h"
static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] =
{
[0] = 5, // Reserved, do not change
[1] = 0, // Reserved, do not change
@ -241,9 +243,12 @@ static uint8_t phy_init_data[128] =
};
extern int __real_register_chipv6_phy(uint8_t* init_data);
extern int __wrap_register_chipv6_phy(uint8_t* unused) {
phy_init_data[107] = __get_adc_mode();
return __real_register_chipv6_phy(phy_init_data);
extern int __wrap_register_chipv6_phy(uint8_t* init_data) {
if (init_data != NULL) {
memcpy(init_data, phy_init_data, sizeof(phy_init_data));
init_data[107] = __get_adc_mode();
}
return __real_register_chipv6_phy(init_data);
}
extern int __get_rf_mode(void) __attribute__((weak));

View File

@ -495,7 +495,7 @@ static bool isSpiffsFilenameValid(const char* name) {
if (name == nullptr)
return false;
auto len = strlen(name);
return len > 0 && len <= SPIFFS_OBJ_NAME_LEN;
return len > 0 && len < SPIFFS_OBJ_NAME_LEN;
}
// these symbols should be defined in the linker script for each flash layout