mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2026-03-22 02:24:57 +00:00
update
This commit is contained in:
parent
30b951832c
commit
39a516cd39
22 changed files with 98 additions and 3346 deletions
|
|
@ -665,7 +665,7 @@ int wifi_run(rtw_mode_t mode) {
|
|||
#ifdef USE_NETBIOS
|
||||
netbios_set_name(WLAN_ST_NETIF_NUM, lwip_host_name[0]);
|
||||
#endif
|
||||
#endif
|
||||
#endif // WIP_NETIF_HOSTNAME
|
||||
netif_set_addr(&xnetif[WLAN_ST_NETIF_NUM], (ip_addr_t *) &wifi_st_dhcp.ip,
|
||||
(ip_addr_t *) &wifi_st_dhcp.mask, (ip_addr_t *) &wifi_st_dhcp.gw);
|
||||
pnif = &xnetif[WLAN_AP_NETIF_NUM];
|
||||
|
|
@ -675,7 +675,7 @@ int wifi_run(rtw_mode_t mode) {
|
|||
#ifdef USE_NETBIOS
|
||||
netbios_set_name(WLAN_AP_NETIF_NUM, lwip_host_name[1]);
|
||||
#endif
|
||||
#endif
|
||||
#endif // WIP_NETIF_HOSTNAME
|
||||
netif_set_addr(&xnetif[WLAN_AP_NETIF_NUM], (ip_addr_t *) &wifi_ap_dhcp.ip,
|
||||
(ip_addr_t *) &wifi_ap_dhcp.mask, (ip_addr_t *) &wifi_ap_dhcp.gw);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ int32_t log_uart_init (log_uart_t *obj, int baudrate, int data_bits, SerialParit
|
|||
{
|
||||
HAL_LOG_UART_ADAPTER *pUartAdapter;
|
||||
int i;
|
||||
|
||||
HalLogUartWaitTxFifoEmpty();
|
||||
_memset((void*)obj, 0, sizeof(log_uart_t));
|
||||
pUartAdapter = &obj->log_hal_uart;
|
||||
// Check Baud rate
|
||||
|
|
|
|||
|
|
@ -621,6 +621,7 @@ void sys_assert( const char *msg )
|
|||
;
|
||||
}
|
||||
|
||||
/*
|
||||
u32_t sys_now(void)
|
||||
{
|
||||
return xTaskGetTickCount();
|
||||
|
|
@ -630,3 +631,5 @@ u32_t sys_jiffies(void)
|
|||
{
|
||||
return xTaskGetTickCount();
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -229,14 +229,16 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg,
|
|||
/* sys_init() must be called before anthing else. */
|
||||
void sys_init(void);
|
||||
|
||||
#ifndef sys_jiffies
|
||||
/** Ticks/jiffies since power up. */
|
||||
u32_t sys_jiffies(void);
|
||||
#ifndef sys_jiffies
|
||||
#define sys_jiffies() xTaskGetTickCount()
|
||||
//u32_t sys_jiffies(void);
|
||||
#endif
|
||||
|
||||
/** Returns the current time in milliseconds,
|
||||
* may be the same as sys_jiffies or at least based on it. */
|
||||
u32_t sys_now(void);
|
||||
#define sys_now() xTaskGetTickCount()
|
||||
//u32_t sys_now(void);
|
||||
|
||||
/* Critical Region Protection */
|
||||
/* These functions must be implemented in the sys_arch.c file.
|
||||
|
|
|
|||
|
|
@ -46,6 +46,12 @@ void SYSPlatformInit(void);
|
|||
// Data declarations
|
||||
extern u8 __bss_start__, __bss_end__;
|
||||
extern const unsigned char cus_sig[32]; // images name
|
||||
/*
|
||||
#include "section_config.h"
|
||||
SECTION(".custom.validate.rodata")
|
||||
__attribute__ ((weak)) const unsigned char cus_sig[32] = "Customer Signature-modelxxx";
|
||||
*/
|
||||
|
||||
//extern HAL_TIMER_OP HalTimerOp;
|
||||
|
||||
IMAGE2_START_RAM_FUN_SECTION RAM_START_FUNCTION gImage2EntryFun0 =
|
||||
|
|
@ -185,7 +191,12 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
_pHAL_Gpio_Adapter = &gBoot_Gpio_Adapter;
|
||||
VectorTableInitRtl8195A(STACK_TOP); // 0x1FFFFFFC
|
||||
loguart_wait_tx_fifo_empty(); // иначе глючит LogUART, если переключение CLK приходится на вывод символов !
|
||||
#if 1 // if set CLK CPU
|
||||
uint8 ChipId = HalGetChipId();
|
||||
#if 1 //def ARDUINO
|
||||
// 0 - 166666666 Hz, 1 - 83333333 Hz
|
||||
*((int *) (SYSTEM_CTRL_BASE + REG_SYS_SYSPLL_CTRL1)) &= ~(1 << 17); // REG_SYS_SYSPLL_CTRL1 &= ~BIT_SYS_SYSPLL_DIV5_3
|
||||
HalCpuClkConfig(ChipId < CHIP_ID_8195AM);
|
||||
#else // if set CLK CPU
|
||||
if(HalGetCpuClk() != PLATFORM_CLOCK) {
|
||||
//----- CLK CPU
|
||||
#if CPU_CLOCK_SEL_DIV5_3
|
||||
|
|
@ -198,7 +209,7 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
HalCpuClkConfig(CPU_CLOCK_SEL_VALUE);
|
||||
#endif // CPU_CLOCK_SEL_DIV5_3
|
||||
};
|
||||
#endif
|
||||
#endif // ARDUINO
|
||||
PSHalInitPlatformLogUart(); // HalInitPlatformLogUartV02(); // Show "<RTL8195A>"... :(
|
||||
HalReInitPlatformTimer(); // HalInitPlatformTimerV02(); HalTimerOpInit_Patch((VOID*) (&HalTimerOp));
|
||||
SystemCoreClockUpdate();
|
||||
|
|
@ -226,7 +237,7 @@ extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
|||
// SpicFlashInitRtl8195A(SpicDualBitMode); // SpicReadIDRtl8195A(); SpicDualBitMode
|
||||
#ifdef CONFIG_SDR_EN
|
||||
//---- SDRAM
|
||||
uint8 ChipId = HalGetChipId();
|
||||
// uint8 ChipId = HalGetChipId();
|
||||
if (ChipId >= CHIP_ID_8195AM) {
|
||||
if((HAL_PERI_ON_READ32(REG_SOC_FUNC_EN) & BIT(21)) == 0) { // SDR not init?
|
||||
#ifdef FIX_SDR_CALIBRATION // for speed :)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@
|
|||
//2 REG_RSVD
|
||||
|
||||
//2 REG_PESOC_CLK_SEL
|
||||
#define BIT_PESOC_SPI1_SCLK_SEL BIT(18)
|
||||
#define BIT_PESOC_SPI1_SCLK_SEL BIT(18) // =1 SPI1 Use High speed clock
|
||||
|
||||
#define BIT_SHIFT_PESOC_PERI_SCLK_SEL 16
|
||||
#define BIT_MASK_PESOC_PERI_SCLK_SEL 0x3 // 0 - CLK, 1 - CLK/2, 2 - CLK/4, 3 - CLK/8
|
||||
|
|
|
|||
|
|
@ -32,7 +32,12 @@ HAL_Status HalLogUartRstFIFO(HAL_LOG_UART_ADAPTER *pUartAdapter, u8 RstCtrl);
|
|||
VOID HalLogUartEnable(HAL_LOG_UART_ADAPTER *pUartAdapter);
|
||||
VOID HalLogUartDisable(HAL_LOG_UART_ADAPTER *pUartAdapter);
|
||||
*/
|
||||
extern VOID UartLogIrqHandleRam(VOID * Data);
|
||||
//extern VOID UartLogIrqHandleRam(VOID * Data);
|
||||
__attribute__ ((weak)) void UartLogIrqHandleRam(void * data)
|
||||
{
|
||||
HAL_UART_READ32(UART_REV_BUF_OFF);
|
||||
}
|
||||
|
||||
// extern DiagPrintf();
|
||||
// extern HalGetCpuClk(void);
|
||||
// extern VectorIrqUnRegisterRtl8195A();
|
||||
|
|
@ -55,8 +60,10 @@ extern VOID UartLogIrqHandleRam(VOID * Data);
|
|||
* (0.005/5)*166666666 = 166666.666
|
||||
*/
|
||||
VOID HalLogUartWaitTxFifoEmpty(VOID) {
|
||||
int x = 16384;
|
||||
while((!(HAL_READ8(LOG_UART_REG_BASE, 0x14) & BIT6)) && x--);
|
||||
if (HAL_PERI_ON_READ32(REG_SOC_FUNC_EN) & BIT_SOC_LOG_UART_EN) {
|
||||
int x = 16384;
|
||||
while ((!(HAL_UART_READ32(UART_LINE_STATUS_REG_OFF) & LSR_TEMT)) && x--);
|
||||
}
|
||||
}
|
||||
|
||||
//----- HalLogUartIrqRxRdyHandle
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ void UartLogIrqHandleRam(void * Data) {
|
|||
// prvStrCpy(pUartLogCtl->pTmpLogBuf->UARTLogBuf, pUartLogCtl->pHistoryBuf[pUartLogCtl->SeeIdx]);
|
||||
// pUartLogCtl->pTmpLogBuf->BufCount = prvStrLen(pUartLogCtl->pTmpLogBuf->UARTLogBuf);
|
||||
// if(EchoFlag) pUartLogCtl->pfINPUT(pUartLogCtl->pTmpLogBuf->UARTLogBuf);
|
||||
UartLogHistoryCmd(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl,
|
||||
1);
|
||||
UartLogHistoryCmd(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl, 1);
|
||||
}
|
||||
} else {
|
||||
if (UartLogCmdChk(UartReceiveData, (UART_LOG_CTL *) pUartLogCtl, 1)
|
||||
|
|
@ -242,11 +241,13 @@ MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
|||
}
|
||||
if(flg) DiagPrintf("cmd: %s - nothing!\n", ArgvArray[0]);
|
||||
#if defined(configUSE_WAKELOCK_PMU) && (configUSE_WAKELOCK_PMU == 1)
|
||||
release_wakelock(WAKELOCK_LOGUART);
|
||||
release_wakelock(WAKELOCK_LOGUART);
|
||||
//sdk4.0: pmu_release_wakelock(PMU_LOGUART_DEVICE);
|
||||
#endif
|
||||
}
|
||||
#if defined(configUSE_WAKELOCK_PMU) && (configUSE_WAKELOCK_PMU == 1)
|
||||
else acquire_wakelock(WAKELOCK_LOGUART);
|
||||
//sdk4.0: else pmu_acquire_wakelock(PMU_LOGUART_DEVICE);
|
||||
#endif
|
||||
p->pTmpLogBuf->BufCount = 0;
|
||||
p->pTmpLogBuf->UARTLogBuf[0] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue