fix & update

This commit is contained in:
pvvx 2017-02-01 14:57:01 +03:00
parent 0557a41f1a
commit 741520fa66
58 changed files with 6620 additions and 6810 deletions

View file

@ -1228,10 +1228,7 @@ RtkADCReceive(
return _EXIT_FAILURE;
}
extern u32
HalDelayUs(
IN u32 us
);
//extern u32 HalDelayUs(IN u32 us);
u32
RtkADCReceiveBuf(

View file

@ -56,4 +56,14 @@ HAL_RESET_REASON HalGetResetCause(void)
return HAL_PERI_ON_READ32(REG_SYS_DSLP_TIM_CTRL);
}
u8 HalGetChipId(void) {
u8 chip_id = CHIP_ID_8195AM;
#if CONFIG_DEBUG_LOG > 3
if (HALEFUSEOneByteReadROM(HAL_SYS_CTRL_READ32(REG_SYS_EFUSE_CTRL), 0xF8, &chip_id, L25EOUTVOLTAGE) != 1)
DBG_MISC_INFO("Get Chip ID Failed\r");
#else
HALEFUSEOneByteReadROM(HAL_SYS_CTRL_READ32(REG_SYS_EFUSE_CTRL), 0xF8, &chip_id, L25EOUTVOLTAGE);
#endif
return chip_id;
}

View file

@ -8,6 +8,7 @@
*/
#include "platform_autoconf.h"
#include "hal_pcm.h"
#ifdef CONFIG_PCM_EN

View file

@ -30,6 +30,7 @@ void HalJtagPinOff(void)
HalPinCtrlRtl8195A(JTAG, 0, 0);
}
#if RTL8710_DEF_PIN_ON
//----- GpioIcFunChk
@ -45,7 +46,7 @@ u8 GpioIcFunChk(IN u32 chip_pin, IN u8 Operation)
if (tst & 0xEF) result = 1;
else {
result = tst & 0x10;
if(tst & 0x10) { // RTL8710AF ?
if(result) { // RTL8710AF ?
if (chip_pin - 1 <= 2) result = 0; // PA_1, PA_2, PA_3
else {
result = chip_pin - PC_5; // PC_5

View file

@ -4,12 +4,17 @@
* RTL8710/11 pvvx 12/2016
*/
#include "rtl8195a.h"
#ifdef CONFIG_SDIO_HOST_EN
#include "sd.h"
#include "sdio_host.h"
#include "hal_sdio_host.h"
#include "rtl8195a_sdio_host.h"
#include "hal_pinmux.h"
//#ifdef RTL8710AF
#include "hal_gpio.h"
#include "PinNames.h"
#include "hal_gpio.h"
//#endif
//-------------------------------------------------------------------------
// Function declarations
@ -107,4 +112,17 @@ void HalSdioHostOpInit(void *Data) {
phsha->HalSdioHostErase = &HalSdioHostEraseRtl8195a;
phsha->HalSdioHostGetWriteProtect = &HalSdioHostGetWriteProtectRtl8195a;
phsha->HalSdioHostSetWriteProtect = &HalSdioHostSetWriteProtectRtl8195a;
//#ifdef RTL8710AF
if(HalGetChipId() != CHIP_ID_8195AM) {
GPIOState[0] &= ~((1 << 8) - 1);
{
for (int i = 0; i <= 6; i++)
HAL_GPIO_PullCtrl(i, PullNone);
HAL_GPIO_PullCtrl(PA_6, PullDown);
HAL_GPIO_PullCtrl(PA_7, PullDown);
}
}
//#endif
}
#endif // CONFIG_SDIO_HOST_EN

View file

@ -1047,7 +1047,7 @@ MemTest(
} // MemTest
#if defined ( __ICCARM__ )
//#if defined ( __ICCARM__ )
u8 IsSdrPowerOn(
VOID
)
@ -1058,7 +1058,7 @@ u8 IsSdrPowerOn(
return 1;
}
}
#endif
//#endif
#else // ifndef CONFIG_SDR_EN

View file

@ -22,8 +22,8 @@ extern void xPortPendSVHandler( void ) __attribute__ (( naked ));
#endif
extern void xPortSysTickHandler( void );
extern void vPortSVCHandler( void );
extern u32 HalGetCpuClk(VOID);
extern _LONG_CALL_ u32 HalDelayUs(u32 us);
//extern unsigned int HalGetCpuClk(void);
//extern _LONG_CALL_ u32 HalDelayUs(u32 us);
extern COMMAND_TABLE UartLogRomCmdTable[];
extern HAL_TIMER_OP HalTimerOp;