open-ameba/sdk/component/soc/realtek/8195a/cmsis/device/rtl_stdlib.h

42 lines
1 KiB
C
Raw Normal View History

2016-11-09 00:56:41 +00:00
/*
* Routines for standard lib access
*
* Copyright (c) 2013 Realtek Semiconductor Corp.
*
* This module is a confidential and proprietary property of RealTek and
* possession or use of this module requires written permission of RealTek.
*/
#ifndef _RTL_STDLIB_H_
#define _RTL_STDLIB_H_
2017-03-05 23:22:35 +00:00
#if 0
2016-11-09 00:56:41 +00:00
#include <basic_types.h>
#include <strproc.h>
#include <diag.h>
//
// string operation
//
#define strlen(str) prvStrLen((const u8*)str)
#define strcmp(str1, str2) prvStrCmp((const u8*)str1, (const u8*)str2)
2017-03-05 23:22:35 +00:00
//#define sscanf(src, format...) //TODO: Strtoul(src,0,16) / Strtoul(src,0,10)
2016-11-09 00:56:41 +00:00
#define strtok(str, delim) prvStrTok(str, delim)
2017-02-28 07:40:07 +00:00
#define strcpy(dst, src) prvStrCpy((u8 *)dst, (const u8*)src)
2016-11-09 00:56:41 +00:00
#define atoi(str) prvAtoi(str)
2017-02-28 07:40:07 +00:00
#define strstr(str1, str2) prvStrStr(str1, str2)
2016-11-09 00:56:41 +00:00
//
// standard i/o
//
2017-02-28 07:40:07 +00:00
#define snprintf DiagSnPrintf
2016-11-09 00:56:41 +00:00
#define sprintf prvDiagSPrintf
#define printf prvDiagPrintf
//
// memory management
//
#define malloc pvPortMalloc
#define free vPortFree
2017-03-05 23:22:35 +00:00
#endif
2016-11-09 00:56:41 +00:00
#endif //_RTL_STDLIB_H_