This commit is contained in:
pvvx 2017-04-10 15:32:02 +03:00
parent 52c964be3f
commit a590693719
37 changed files with 1008 additions and 841 deletions

View file

@ -92,7 +92,7 @@ typedef struct _FALSE_ALARM_STATISTICS {
u32 Cnt_CCA_all;
u32 Cnt_BW_USC;
u32 Cnt_BW_LSC;
} FALSE_ALARM_STATISTICS;
} FALSE_ALARM_STATISTICS, *PFALSE_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;
} ROM_INFO, *PROM_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;
} CFO_TRACKING, *PCFO_TRACKING;;
extern CFO_TRACKING DM_CfoTrack; // 10000738
/* in rom_libgloss_retarget.h

View file

@ -4,6 +4,7 @@
#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
@ -22,10 +23,6 @@
#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
@ -191,6 +188,13 @@ 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)
{
@ -199,7 +203,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 $ */
/*
@ -633,7 +637,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),
@ -1074,9 +1078,12 @@ int c_printf(const char *fmt, ...)
int puts (const char *s)
{
int i = 0;
while(*s) {
HalSerialPutcRtl8195a(*s++);
i++;
}
return i;
}
void vTaskDelete(void *);

View file

@ -6,6 +6,8 @@
#include "rtl_bios_data.h"
#include "va_list.h"
#include "strproc.h"
#include "rt_lib_rom.h"
#define CHECK_LIBC_INIT 0
//-------------------------------------------------------------------------
@ -67,8 +69,9 @@ 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;
// extern impure_ptr
#endif
// extern impure_ptr
//-------------------------------------------------------------------------
@ -166,7 +169,6 @@ 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) {
@ -297,9 +299,9 @@ int sscanf(const char *buf, const char *fmt, ...) {
return i;
}
char toupper(char ch) {
LOCAL char toupper(char ch) {
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
};
}
int _stricmp (const char *s1, const char *s2)
{
@ -376,12 +378,15 @@ 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)
{
@ -406,6 +411,7 @@ 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)
{
@ -418,6 +424,7 @@ 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)
{
@ -430,42 +437,49 @@ 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()
int __aeabi_ftol(float f)
long long __aeabi_ftol(float f)
{
return __rtl_ftol_v1_00(f);
}
extern _LONG_CALL_ double __rtl_ftod_v1_00(float f);
//----- __aeabi_ftod()
int __aeabi_ftod(float f)
double __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)
{
@ -473,25 +487,25 @@ float __aeabi_fdiv(float a, float b)
}
//----- __aeabi_dadd()
int __aeabi_dadd(double a, double b)
double __aeabi_dadd(double a, double b)
{
return __rtl_dadd_v1_00(a, b);
}
//----- __aeabi_dsub()
int __aeabi_dsub(double a, double b)
double __aeabi_dsub(double a, double b)
{
return __rtl_dsub_v1_00(a, b);
}
//----- __aeabi_dmul()
int __aeabi_dmul(double a, double b)
double __aeabi_dmul(double a, double b)
{
return __rtl_dmul_v1_00(a, b);
}
//----- __aeabi_ddiv()
int __aeabi_ddiv(double a, double b)
double __aeabi_ddiv(double a, double b)
{
return __rtl_ddiv_v1_00(a, b);
}
@ -508,6 +522,7 @@ 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)
{
@ -520,12 +535,13 @@ 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)
{

View file

@ -4,6 +4,7 @@
*/
#include "basic_types.h"
#include "rt_lib_rom.h"
//-------------------------------------------------------------------------
// Function declarations
@ -71,12 +72,15 @@ 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)
{
@ -101,6 +105,7 @@ 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)
{
@ -113,6 +118,7 @@ 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)
{
@ -125,6 +131,7 @@ 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)
{
@ -137,6 +144,7 @@ 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)
{
@ -155,12 +163,14 @@ 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)
{
@ -203,6 +213,7 @@ 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)
{
@ -214,13 +225,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)
{

View file

@ -20,25 +20,28 @@ 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)
{