mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update
This commit is contained in:
parent
cf7a2d9683
commit
f7b901aa27
76 changed files with 3753 additions and 3990 deletions
|
|
@ -6,11 +6,9 @@
|
|||
*/
|
||||
//======================================================
|
||||
#ifndef LOGUART_STACK_SIZE
|
||||
#define LOGUART_STACK_SIZE 400 // USE_MIN_STACK_SIZE to 128
|
||||
#define LOGUART_STACK_SIZE 400 // USE_MIN_STACK_SIZE modify from 512 to 128
|
||||
#endif
|
||||
#ifndef CONSOLE_PRIORITY
|
||||
#define CONSOLE_PRIORITY 0
|
||||
#endif
|
||||
//======================================================
|
||||
#include "rtl8195a.h"
|
||||
#include "rtl_bios_data.h"
|
||||
|
|
@ -43,7 +41,7 @@ _LONG_CALL_ extern void UartLogHistoryCmd(
|
|||
IN u8 RevData, IN UART_LOG_CTL *prvUartLogCtl,
|
||||
IN u8 EchoFlag);
|
||||
|
||||
_LONG_CALL_ extern void UartLogCmdExecute(IN PUART_LOG_CTL pUartLogCtlExe);
|
||||
//_LONG_CALL_ extern void UartLogCmdExecute(IN PUART_LOG_CTL pUartLogCtlExe);
|
||||
//======================================================
|
||||
extern PCOMMAND_TABLE UartLogRamCmdTable[];
|
||||
extern UartLogRamCmdTableSize;
|
||||
|
|
@ -128,9 +126,9 @@ void UartLogIrqHandleRam(void * Data) {
|
|||
// для передачи ' ' или ','.
|
||||
// Начальные пробелы cmd или arg удаляются.
|
||||
//======================================================
|
||||
int GetArgvRam(IN u8 *pstr) {
|
||||
int GetArgvRam(IN u8 *pstr, u8** argv) {
|
||||
int arvc = 0;
|
||||
u8** argv = ArgvArray;
|
||||
// u8** argv = ArgvArray;
|
||||
u8* p = pstr;
|
||||
u8 t, n = ' ';
|
||||
int m = 0;
|
||||
|
|
@ -213,7 +211,7 @@ MON_RAM_TEXT_SECTION void RtlConsolTaskRam(void *Data) {
|
|||
RtlDownSema(&p->Sema);
|
||||
if (p->ExecuteCmd) {
|
||||
// UartLogCmdExecute(pUartLogCtl);
|
||||
int argc = GetArgvRam(p->pTmpLogBuf->UARTLogBuf);
|
||||
int argc = GetArgvRam(p->pTmpLogBuf->UARTLogBuf, ArgvArray);
|
||||
if(argc) {
|
||||
StrUpr(ArgvArray[0]);
|
||||
PCOMMAND_TABLE pcmd = p->pCmdTbl;
|
||||
|
|
@ -329,8 +327,13 @@ _WEAK void console_help(int argc, char *argv[]) { // Help
|
|||
}
|
||||
DiagPrintf(&str_rom_57ch3Dch0A[25]); // DiagPrintf("==============================\n");
|
||||
}
|
||||
LOCAL void print_on(int argc, char *argv[])
|
||||
{
|
||||
print_off = argv[1][0]!='1';
|
||||
}
|
||||
// (!) размещается в специальном сегменте '.mon.tab*' (см. *.ld файл)
|
||||
MON_RAM_TAB_SECTION COMMAND_TABLE console_commands[] = {
|
||||
{"PR", 1, print_on, "<1/0>: Printf on/off"}, // Help
|
||||
{"?", 0, console_help, ": This Help"} // Help
|
||||
// {"HELP", 0, console_help, ": Help"} // Help
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ typedef struct _FALSE_ALARM_STATISTICS {
|
|||
u32 Cnt_CCA_all;
|
||||
u32 Cnt_BW_USC;
|
||||
u32 Cnt_BW_LSC;
|
||||
} FALSE_ALARM_STATISTICS, *PFALSE_ALARM_STATISTICS;
|
||||
} FALSE_ALARM_STATISTICS;
|
||||
extern FALSE_ALARM_STATISTICS FalseAlmCnt; // 100006E0
|
||||
|
||||
typedef struct _rom_info {
|
||||
|
|
@ -100,7 +100,7 @@ typedef struct _rom_info {
|
|||
u8 CrystalCap;
|
||||
u64 DebugComponents;
|
||||
u32 DebugLevel;
|
||||
} ROM_INFO, *PROM_INFO;
|
||||
} ROM_INFO;
|
||||
extern ROM_INFO ROMInfo; // 10000720
|
||||
|
||||
typedef struct _CFO_TRACKING_ {
|
||||
|
|
@ -118,7 +118,7 @@ typedef struct _CFO_TRACKING_ {
|
|||
u8 CFO_TH_XTAL_HIGH;
|
||||
u8 CFO_TH_XTAL_LOW;
|
||||
u8 CFO_TH_ATC;
|
||||
} CFO_TRACKING, *PCFO_TRACKING;;
|
||||
}CFO_TRACKING;
|
||||
extern CFO_TRACKING DM_CfoTrack; // 10000738
|
||||
|
||||
/* in rom_libgloss_retarget.h
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "libc/rom/string/rom_libc_string.h"
|
||||
#include "strproc.h"
|
||||
|
||||
#define memchr __rtl_memchr_v1_00
|
||||
#define memcmp __rtl_memcmp_v1_00
|
||||
|
|
@ -23,6 +22,10 @@
|
|||
#define strsep __rtl_strsep_v1_00
|
||||
#define strtok __rtl_strtok_v1_00
|
||||
|
||||
static char toupper(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
};
|
||||
|
||||
#define NEWFP 1
|
||||
#define ENDIAN_LITTLE 1234
|
||||
#define ENDIAN_BIG 4321
|
||||
|
|
@ -188,13 +191,6 @@ str_fmt(char *p, int size, int fmt)
|
|||
/*
|
||||
* strtoupper()
|
||||
*/
|
||||
#define strtoupper StrUpr
|
||||
/*
|
||||
|
||||
LOCAL char toupper(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
};
|
||||
|
||||
void
|
||||
strtoupper(char *p)
|
||||
{
|
||||
|
|
@ -203,7 +199,7 @@ strtoupper(char *p)
|
|||
for (; *p; p++)
|
||||
*p = toupper (*p);
|
||||
}
|
||||
*/
|
||||
|
||||
/* $Id: atob.c,v 1.1.1.1 2006/08/23 17:03:06 pefo Exp $ */
|
||||
|
||||
/*
|
||||
|
|
@ -637,7 +633,7 @@ c_vsprintf (char *d, const char *s, va_list ap)
|
|||
}
|
||||
else if (*s == 'o')
|
||||
base = 8;
|
||||
else //if (*s == 'b')
|
||||
else if (*s == 'b')
|
||||
base = 2;
|
||||
if (longlong)
|
||||
llbtoa(d, va_arg (ap, quad_t),
|
||||
|
|
@ -1078,12 +1074,9 @@ int c_printf(const char *fmt, ...)
|
|||
|
||||
int puts (const char *s)
|
||||
{
|
||||
int i = 0;
|
||||
while(*s) {
|
||||
HalSerialPutcRtl8195a(*s++);
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
void vTaskDelete(void *);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ char * rtl_strtok(char *s, const char *delim);
|
|||
|
||||
extern struct _reent * _rtl_impure_ptr;
|
||||
|
||||
int libc_has_init;
|
||||
char libc_has_init;
|
||||
char print_off;
|
||||
// extern rtl_impure_ptr
|
||||
// extern impure_ptr
|
||||
|
||||
|
|
@ -139,14 +140,17 @@ int rtl_printf(const char *fmt, ...) {
|
|||
if (!libc_has_init) {
|
||||
rtl_libc_init();
|
||||
}
|
||||
#endif
|
||||
va_list args;
|
||||
va_start (args, fmt);
|
||||
int result = __rtl_vfprintf_r_v1_00(_rtl_impure_ptr,
|
||||
_rtl_impure_ptr->_stdout, fmt, args);
|
||||
__rtl_fflush_r_v1_00(_rtl_impure_ptr, _rtl_impure_ptr->_stdout);
|
||||
// va_end (args);
|
||||
return result;
|
||||
#endif
|
||||
if(!print_off) {
|
||||
va_list args;
|
||||
va_start (args, fmt);
|
||||
int result = __rtl_vfprintf_r_v1_00(_rtl_impure_ptr,
|
||||
_rtl_impure_ptr->_stdout, fmt, args);
|
||||
__rtl_fflush_r_v1_00(_rtl_impure_ptr, _rtl_impure_ptr->_stdout);
|
||||
// va_end (args);
|
||||
return result;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
//----- rtl_vprintf()
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#include "rtl_bios_data.h"
|
||||
#include "va_list.h"
|
||||
#include "strproc.h"
|
||||
#include "rt_lib_rom.h"
|
||||
|
||||
#define CHECK_LIBC_INIT 0
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -69,10 +67,8 @@ unsigned long long __aeabi_llsr(unsigned long long val, unsigned int shift);
|
|||
|
||||
extern struct _reent * _rtl_impure_ptr;
|
||||
|
||||
#if CHECK_LIBC_INIT
|
||||
extern int libc_has_init;
|
||||
#endif
|
||||
// extern impure_ptr
|
||||
extern char libc_has_init;
|
||||
extern char print_off;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Function
|
||||
|
|
@ -142,13 +138,17 @@ int printf(const char *fmt, ...) {
|
|||
rtl_libc_init();
|
||||
}
|
||||
#endif
|
||||
va_list args;
|
||||
va_start (args, fmt);
|
||||
int result = __rtl_vfprintf_r_v1_00(_rtl_impure_ptr,
|
||||
_rtl_impure_ptr->_stdout, fmt, args);
|
||||
__rtl_fflush_r_v1_00(_rtl_impure_ptr, _rtl_impure_ptr->_stdout);
|
||||
// va_end (args);
|
||||
return result;
|
||||
if(!print_off) {
|
||||
|
||||
va_list args;
|
||||
va_start (args, fmt);
|
||||
int result = __rtl_vfprintf_r_v1_00(_rtl_impure_ptr,
|
||||
_rtl_impure_ptr->_stdout, fmt, args);
|
||||
__rtl_fflush_r_v1_00(_rtl_impure_ptr, _rtl_impure_ptr->_stdout);
|
||||
// va_end (args);
|
||||
return result;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
//----- vprintf()
|
||||
|
|
@ -169,6 +169,7 @@ int vprintf(const char * fmt, __VALIST param) {
|
|||
int vsnprintf(char *str, size_t size, const char *fmt, __VALIST param) {
|
||||
int result;
|
||||
int w;
|
||||
int v11;
|
||||
FILE f;
|
||||
#if CHECK_LIBC_INIT
|
||||
if (!libc_has_init) {
|
||||
|
|
@ -299,9 +300,9 @@ int sscanf(const char *buf, const char *fmt, ...) {
|
|||
return i;
|
||||
}
|
||||
|
||||
LOCAL char toupper(char ch) {
|
||||
char toupper(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
}
|
||||
};
|
||||
|
||||
int _stricmp (const char *s1, const char *s2)
|
||||
{
|
||||
|
|
@ -378,15 +379,12 @@ int __aeabi_dtoi(double d)
|
|||
return __rtl_dtoi_v1_00(d);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_dtoui_v1_00(double d);
|
||||
|
||||
//----- __aeabi_dtoui()
|
||||
int __aeabi_dtoui(double d)
|
||||
{
|
||||
return __rtl_dtoui_v1_00(d);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_itof_v1_00(int val);
|
||||
//----- __aeabi_i2f()
|
||||
float __aeabi_i2f(int val)
|
||||
{
|
||||
|
|
@ -411,7 +409,6 @@ int __aeabi_ui2d(unsigned int val)
|
|||
return __rtl_uitod_v1_00(val);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ char * __rtl_ltoa_v1_00(int value, char *string, int radix);
|
||||
//----- __aeabi_itoa()
|
||||
char * __aeabi_itoa(int value, char *string, int radix)
|
||||
{
|
||||
|
|
@ -424,7 +421,6 @@ char * __aeabi_ltoa(int value, char *string, int radix)
|
|||
return (char *)__rtl_ltoa_v1_00(value, string, radix);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ char * __rtl_ultoa_v1_00(unsigned int value, char *string, int radix);
|
||||
//----- __aeabi_utoa()
|
||||
char * __aeabi_utoa(unsigned int value, char *string, int radix)
|
||||
{
|
||||
|
|
@ -437,49 +433,42 @@ char * __aeabi_ultoa(unsigned int value, char *string, int radix)
|
|||
return (char *)__rtl_ultoa_v1_00(value, string, radix);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ long long __rtl_ftol_v1_00(float f);
|
||||
//----- __aeabi_ftol()
|
||||
long long __aeabi_ftol(float f)
|
||||
int __aeabi_ftol(float f)
|
||||
{
|
||||
return __rtl_ftol_v1_00(f);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ double __rtl_ftod_v1_00(float f);
|
||||
//----- __aeabi_ftod()
|
||||
double __aeabi_ftod(float f)
|
||||
int __aeabi_ftod(float f)
|
||||
{
|
||||
return __rtl_ftod_v1_00(f);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_dtof_v1_00(double d);
|
||||
//----- __aeabi_dtof()
|
||||
float __aeabi_dtof(double d)
|
||||
{
|
||||
return __rtl_dtof_v1_00(d);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fadd_v1_00(float a, float b);
|
||||
//----- __aeabi_fadd()
|
||||
float __aeabi_fadd(float a, float b)
|
||||
{
|
||||
return __rtl_fadd_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fsub_v1_00(float a, float b);
|
||||
//----- __aeabi_fsub()
|
||||
float __aeabi_fsub(float a, float b)
|
||||
{
|
||||
return __rtl_fsub_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fmul_v1_00(float a, float b);
|
||||
//----- __aeabi_fmul()
|
||||
float __aeabi_fmul(float a, float b)
|
||||
{
|
||||
return __rtl_fmul_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fdiv_v1_00(float a, float b);
|
||||
//----- __aeabi_fdiv()
|
||||
float __aeabi_fdiv(float a, float b)
|
||||
{
|
||||
|
|
@ -487,25 +476,25 @@ float __aeabi_fdiv(float a, float b)
|
|||
}
|
||||
|
||||
//----- __aeabi_dadd()
|
||||
double __aeabi_dadd(double a, double b)
|
||||
int __aeabi_dadd(double a, double b)
|
||||
{
|
||||
return __rtl_dadd_v1_00(a, b);
|
||||
}
|
||||
|
||||
//----- __aeabi_dsub()
|
||||
double __aeabi_dsub(double a, double b)
|
||||
int __aeabi_dsub(double a, double b)
|
||||
{
|
||||
return __rtl_dsub_v1_00(a, b);
|
||||
}
|
||||
|
||||
//----- __aeabi_dmul()
|
||||
double __aeabi_dmul(double a, double b)
|
||||
int __aeabi_dmul(double a, double b)
|
||||
{
|
||||
return __rtl_dmul_v1_00(a, b);
|
||||
}
|
||||
|
||||
//----- __aeabi_ddiv()
|
||||
double __aeabi_ddiv(double a, double b)
|
||||
int __aeabi_ddiv(double a, double b)
|
||||
{
|
||||
return __rtl_ddiv_v1_00(a, b);
|
||||
}
|
||||
|
|
@ -522,7 +511,6 @@ int __aeabi_dcmplt(double a, double b)
|
|||
return __rtl_dcmplt_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_dcmple_v1_00(double a, double b);
|
||||
//----- __aeabi_dcmple()
|
||||
int __aeabi_dcmple(double a, double b)
|
||||
{
|
||||
|
|
@ -535,13 +523,12 @@ int __aeabi_dcmpgt(double a, double b)
|
|||
return __rtl_dcmpgt_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_fcmplt_v1_00(float a, float b);
|
||||
//----- __aeabi_fcmplt()
|
||||
int __aeabi_fcmplt(float a, float b)
|
||||
{
|
||||
return __rtl_fcmplt_v1_00(a, b);
|
||||
}
|
||||
extern _LONG_CALL_ int __rtl_fcmpgt_v1_00(float a, float b);
|
||||
|
||||
//----- __aeabi_fcmpgt()
|
||||
int __aeabi_fcmpgt(float a, float b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include "basic_types.h"
|
||||
#include "rt_lib_rom.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
|
|
@ -72,15 +71,12 @@ int rtl_dtoi(double d)
|
|||
return __rtl_dtoi_v1_00(d);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_dtoui_v1_00(double d);
|
||||
|
||||
//----- rtl_dtoui()
|
||||
int rtl_dtoui(double d)
|
||||
{
|
||||
return __rtl_dtoui_v1_00(d);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_itof_v1_00(int val);
|
||||
//----- rtl_i2f()
|
||||
float rtl_i2f(int val)
|
||||
{
|
||||
|
|
@ -105,7 +101,6 @@ int rtl_ui2d(unsigned int val)
|
|||
return __rtl_uitod_v1_00(val);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ char * __rtl_ltoa_v1_00(int value, char *string, int radix);
|
||||
//----- rtl_itoa()
|
||||
char *rtl_itoa(int value, char *string, int radix)
|
||||
{
|
||||
|
|
@ -118,7 +113,6 @@ char *rtl_ltoa(int value, char *string, int radix)
|
|||
return (char *)__rtl_ltoa_v1_00(value, string, radix);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ char * __rtl_ultoa_v1_00(unsigned int value, char *string, int radix);
|
||||
//----- rtl_utoa()
|
||||
char *rtl_utoa(unsigned int value, char *string, int radix)
|
||||
{
|
||||
|
|
@ -131,7 +125,6 @@ char *rtl_ultoa(unsigned int value, char *string, int radix)
|
|||
return (char *)__rtl_ultoa_v1_00(value, string, radix);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ double __rtl_ftod_v1_00(float f);
|
||||
//----- rtl_ftol()
|
||||
int rtl_ftol(float f)
|
||||
{
|
||||
|
|
@ -144,7 +137,6 @@ int rtl_ftod(float f)
|
|||
return __rtl_ftod_v1_00(f);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fsub_v1_00(float a, float b);
|
||||
//----- rtl_dtof()
|
||||
float rtl_dtof(double d)
|
||||
{
|
||||
|
|
@ -163,14 +155,12 @@ float rtl_fsub(float a, float b)
|
|||
return __rtl_fsub_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fmul_v1_00(float a, float b);
|
||||
//----- rtl_fmul()
|
||||
float rtl_fmul(float a, float b)
|
||||
{
|
||||
return __rtl_fmul_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fdiv_v1_00(float a, float b);
|
||||
//----- rtl_fdiv()
|
||||
float rtl_fdiv(float a, float b)
|
||||
{
|
||||
|
|
@ -213,7 +203,6 @@ int rtl_dcmplt(double a, double b)
|
|||
return __rtl_dcmplt_v1_00(a, b);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ int __rtl_dcmple_v1_00(double a, double b);
|
||||
//----- rtl_dcmple()
|
||||
int rtl_dcmple(double a, double b)
|
||||
{
|
||||
|
|
@ -225,13 +214,13 @@ int rtl_dcmpgt(double a, double b)
|
|||
{
|
||||
return __rtl_dcmpgt_v1_00(a, b);
|
||||
}
|
||||
extern _LONG_CALL_ int __rtl_fcmplt_v1_00(float a, float b);
|
||||
|
||||
//----- rtl_fcmplt()
|
||||
int rtl_fcmplt(float a, float b)
|
||||
{
|
||||
return __rtl_fcmplt_v1_00(a, b);
|
||||
}
|
||||
extern _LONG_CALL_ int __rtl_fcmpgt_v1_00(float a, float b);
|
||||
|
||||
//----- rtl_fcmpgt()
|
||||
int rtl_fcmpgt(float a, float b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,28 +20,25 @@ float rtl_sin_f32(float a);
|
|||
// int __rtl_cos_f32_v1_00();
|
||||
// int __rtl_sin_f32_v1_00();
|
||||
|
||||
extern _LONG_CALL_ float __rtl_fabsf_v1_00(float a);
|
||||
|
||||
//----- rtl_fabsf()
|
||||
float rtl_fabsf(float a)
|
||||
{
|
||||
return __rtl_fabsf_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ double __rtl_fabs_v1_00(double number);
|
||||
//----- rtl_fabs()
|
||||
int rtl_fabs(double a)
|
||||
{
|
||||
return __rtl_fabs_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_cos_f32_v1_00(float a);
|
||||
//----- rtl_cos_f32()
|
||||
float rtl_cos_f32(float a)
|
||||
{
|
||||
return __rtl_cos_f32_v1_00(a);
|
||||
}
|
||||
|
||||
extern _LONG_CALL_ float __rtl_sin_f32_v1_00(float a);
|
||||
//----- rtl_sin_f32()
|
||||
float rtl_sin_f32(float a)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue