mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2024-11-22 05:54:19 +00:00
update
This commit is contained in:
parent
3aed7cffe0
commit
18fd944164
8 changed files with 18 additions and 22 deletions
|
@ -411,15 +411,10 @@ LOCAL rtw_result_t StartStDHCPClient(void)
|
|||
struct netif * pnetif = &xnetif[WLAN_ST_NETIF_NUM];
|
||||
DHCP_CONFIG *p = (dhcp_cfg *)&wifi_st_dhcp;
|
||||
unsigned char mode = p->mode;
|
||||
if((mode == 3) // Auto fix
|
||||
&& p->ip != IP4ADDR(255,255,255,255)
|
||||
&& p->ip != IP4ADDR(0,0,0,0)) {
|
||||
}
|
||||
else mode = 1; // DHCP On
|
||||
if(mode == 2) { // fixed ip
|
||||
if(mode == 2 && p->ip != IP4ADDR(255,255,255,255) && p->ip != IP4ADDR(0,0,0,0)) { // fixed ip
|
||||
netif_set_addr(pnetif, (ip_addr_t *)&p->ip, (ip_addr_t *)&p->mask, (ip_addr_t *)&p->gw);
|
||||
}
|
||||
else if(mode) {
|
||||
else if(mode) { // DHCP On
|
||||
UBaseType_t savePriority = uxTaskPriorityGet(NULL);
|
||||
/* If not rise priority, LwIP DHCP may timeout */
|
||||
vTaskPrioritySet(NULL, tskIDLE_PRIORITY + 3);
|
||||
|
@ -430,7 +425,7 @@ LOCAL rtw_result_t StartStDHCPClient(void)
|
|||
p->ip = pnetif->ip_addr.addr;
|
||||
p->gw = pnetif->gw.addr;
|
||||
p->mask = pnetif->netmask.addr;
|
||||
if(p->mode == 3) { // Auto fix
|
||||
if(mode > 2) { // 3+ Auto fix
|
||||
p->mode = 2; // fixed ip
|
||||
write_wifi_cfg(BID_ST_DHCP_CFG);
|
||||
}
|
||||
|
|
|
@ -223,20 +223,20 @@ s8 sdio_write_blocks(uint32_t sector, const uint8_t *buffer, uint32_t count) {
|
|||
//-----
|
||||
s8 sdio_sd_init(void) {
|
||||
if (sdio_status != SDIO_SD_OK) {
|
||||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
if (sdio_status <= SDIO_INIT_FAIL)
|
||||
sdio_init_host();
|
||||
if (sdio_status != SDIO_INIT_OK) {
|
||||
return -1;
|
||||
}
|
||||
DBG_SDIO_INFO("Init sd card.\n");
|
||||
SdioHostAdapter.AdmaDescTbl = gAdmaTbls;
|
||||
if (HalSdioHostOp.HalSdioHostInitCard(&SdioHostAdapter)) {
|
||||
return -1;
|
||||
}
|
||||
sdio_status = SDIO_SD_OK;
|
||||
if (HalSdioHostOp.HalSdioHostChangeSdClock(&SdioHostAdapter,
|
||||
// SD_CLK_20_8MHZ) != HAL_OK)
|
||||
SD_CLK_41_6MHZ) != HAL_OK)
|
||||
SD_CLK_20_8MHZ) != HAL_OK)
|
||||
// SD_CLK_41_6MHZ) != HAL_OK)
|
||||
DBG_SDIO_INFO("SD card does not support high speed.\n");
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
/ FatFs supports only BMP. */
|
||||
|
||||
|
||||
#define _FS_RPATH 0 /* 0 to 2 */
|
||||
#define _FS_RPATH 2 /* 0 to 2 */
|
||||
/* The _FS_RPATH option configures relative path feature.
|
||||
/
|
||||
/ 0: Disable relative path feature and remove related functions.
|
||||
|
|
|
@ -112,7 +112,8 @@ void HalSdioHostOpInit(void *Data) {
|
|||
phsha->HalSdioHostErase = &HalSdioHostEraseRtl8195a;
|
||||
phsha->HalSdioHostGetWriteProtect = &HalSdioHostGetWriteProtectRtl8195a;
|
||||
phsha->HalSdioHostSetWriteProtect = &HalSdioHostSetWriteProtectRtl8195a;
|
||||
//#ifdef RTL8710AF
|
||||
|
||||
#if 0 //#ifdef RTL8710AF
|
||||
if(HalGetChipId() != CHIP_ID_8195AM) {
|
||||
GPIOState[0] &= ~((1 << 8) - 1);
|
||||
{
|
||||
|
@ -123,8 +124,7 @@ void HalSdioHostOpInit(void *Data) {
|
|||
}
|
||||
// vTaskDelay(1);
|
||||
}
|
||||
|
||||
//#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // CONFIG_SDIO_HOST_EN
|
||||
|
|
|
@ -206,8 +206,7 @@ runram:
|
|||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'load_image $(RAM1R_IMAGE) 0x10000bc8 bin' \
|
||||
-c 'load_image $(RAM2_IMAGE) 0x10006000 bin' \
|
||||
-c 'mww 0x40000210 0x20200113' \
|
||||
-c 'reset run' -c shutdown
|
||||
-c 'mww 0x40000210 0x20111157' -c 'rtl8710_reboot' -c shutdown
|
||||
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# FLAGS
|
||||
# -------------------------------------------------------------------
|
||||
CFLAGS = -DM3 -DCONFIG_PLATFORM_8195A -DGCC_ARMCM3 -DARDUINO_SDK -DF_CPU=166666666L -DNDEBUG
|
||||
CFLAGS += -mcpu=cortex-m3 -mthumb -g2 -Os -std=gnu99 -Wall -Werror
|
||||
CFLAGS += -mcpu=cortex-m3 -mthumb -g2 -Os -std=gnu99 -Wall -Werror -Wpedantic -Wextra
|
||||
CFLAGS += -fno-common -fmessage-length=0 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-short-enums -fsigned-char
|
||||
CFLAGS += -w -Wno-pointer-sign
|
||||
ifdef USE_GCC_LIB
|
||||
|
@ -40,7 +40,7 @@ all: LIBS +=_wlan _platform_new _wps _websocket _xmodem _mdns
|
|||
mp: LIBS +=_wlan_mp _platform_new _wps _websocket _xmodem _mdns
|
||||
endif
|
||||
ifdef USE_SDIOH
|
||||
LIBS += _sdcard_v2
|
||||
#LIBS += _sdcard_v2
|
||||
CFLAGS += -DCONFIG_FATFS_EN=1
|
||||
endif
|
||||
# m c nosys gcc
|
||||
|
@ -259,6 +259,7 @@ ifdef USE_SDIOH
|
|||
SRC_C += sdk/component/soc/realtek/8195a/fwlib/src/hal_sdio_host.c
|
||||
SRC_C += sdk/component/common/drivers/sdio/realtek/sdio_host/src/sd.c
|
||||
SRC_C += sdk/component/common/drivers/sdio/realtek/sdio_host/src/sdio_host.c
|
||||
SRC_C += sdk/component/soc/realtek/8195a/fwlib/rtl8195a/src/rtl8195a_sdio_host_open.c
|
||||
endif
|
||||
|
||||
#peripheral - osdep
|
||||
|
|
|
@ -111,7 +111,7 @@ extern uint32_t SystemCoreClock;
|
|||
#define configCHECK_FOR_STACK_OVERFLOW 0
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configGENERATE_RUN_TIME_STATS 1
|
||||
|
||||
#if configGENERATE_RUN_TIME_STATS
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "wifi_api.h"
|
||||
#include "sys_api.h"
|
||||
#include "esp_comp.h"
|
||||
#include "sdk_ver.h"
|
||||
|
||||
#ifdef USE_NETBIOS
|
||||
#include "netbios/netbios.h"
|
||||
|
|
Loading…
Reference in a new issue