/****************************************Copyright (c)****************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name: rt_sys_c.c
** Latest modified Date: 2009-06-01
** Latest Version: 1.0
** Descriptions: 目标板部分实时库函数代码
**
**--------------------------------------------------------------------------------------------------------
** Created by: Chenmingji
** Created date: 2009-06-01
** Version: 1.0
** Descriptions: The original version
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
*********************************************************************************************************/
#include "..\..\config.h"
#include <stdlib.h>
/*********************************************************************************************************
以下为一些与系统相关的库函数的实现
具体作用请ads的参考编译器与库函数手册
用户可以根据自己的要求修改
*********************************************************************************************************/
/*********************************************************************************************************
The implementations for some library functions
For more details, please refer to the ADS compiler handbook and The library
function manual
User could change it as needed
*********************************************************************************************************/
#include <rt_sys.h>
#include <rt_misc.h>
#include <time.h>
#include <stdio.h>
#pragma import(__use_no_semihosting_swi)
/*********************************************************************************************************
调整半主库相关函数
*********************************************************************************************************/
/*********************************************************************************************************
** Function name: _sys_exit
** Descriptions: 返回初始堆栈和堆的位置,一般用汇编实现
** input parameters: 手册未作详细说明
** output parameters: none
** Returned value: r0: 堆基址
** r1: 堆栈基址,即堆栈区中的最高地址
** r2: 堆限制
** r3: 堆栈限制,即堆栈区中的最低地址
*********************************************************************************************************/
#if 0
__value_in_regs struct __initial_stackheap __user_initial_stackheap (unsigned R0,
unsigned SP,
unsigned R2)
{
}
#endif /* 0 */
/*********************************************************************************************************
** Function name: _sys_exit
** Descriptions: 库退出函数。所有从库中的退出最终都会调用_sys_exit()。
** input parameters: iReturnCode: 退出代码
** output parameters: none
** Returned value: none
*********************************************************************************************************/
void _sys_exit (int iReturnCode)
{
while (1) {
}
}
/*********************************************************************************************************
** Function name: _ttywrch
** Descriptions: 此函数将一个字符写入到控制台中。 控制台可能已被重定向。 除非万不得已,
** 否则不要将此函数用作错误处理例程。
** input parameters: iCh: 输出的字符串
** output parameters: none
** Returned value: none
*********************************************************************************************************/
void _ttywrch (int iCh)
{
}
/*********************************************************************************************************
** Function name: _sys_open
** Descriptions: 此函数打开一个文件。
** input parameters: pcFileName: 文件名
** iOpenMode: 打开模式,是一个位映射,其位通常直接对应于ISO模式规范.
** 详细信息请参阅rt_sys.h
** output parameters: none
** Returned value: 文件句柄
*********************************************************************************************************/
FILEHANDLE _sys_open (const char *pcFileName, int iOpenMode)
{
return -1;
}
/*********************************************************************************************************
** Function name: _sys_close
** Descriptions: 此函数关闭以前使用 _sys_open() 打开的文件
** input parameters: fhHandle: 文件句柄
** output parameters: none
** Returned value: 文件句柄
*********************************************************************************************************/
int _sys_close (FILEHANDLE fhHandle)
{
return -1;
}
/*********************************************************************************************************
** Function name: _sys_read
** Descriptions: 此函数将文件内容读取到缓冲区中
** input parameters: fhHandle: 文件句柄
** iLen: 要读的数据数目
** iMode: 没有使用
** output parameters: puBcuf: 读到的数据
** Returned value: 未读的数据数目
*********************************************************************************************************/
int _sys_read (FILEHANDLE fhHandle, unsigned char *puBcuf, unsigned int iLen, int iMode)
{
return (int)0x80000000;
}
/*********************************************************************************************************
** Function name: _sys_write
** Descriptions: 将缓冲区内容写入到以前使用 _sys_open() 打开的文件中
** input parameters: fhHandle: 文件句柄
** puBcuf: 要写的数据
** iLen: 要写的数据数目
** iMode: 没有使用
** output parameters: none
** Returned value: 未写的数据数目
*********************************************************************************************************/
int _sys_write (FILEHANDLE fhHandle, const unsigned char *puBcuf, unsigned int iLen, int iMode)
{
return 0x80000000;
}
/*********************************************************************************************************
** Function name: _sys_ensure
** Descriptions: _sys_ensure() 调用将刷新与文件句柄 fh 相关联的任何缓冲区,并且确保将备份
** 存储介质上的文件保持最新状态。
** input parameters: fhHandle: 文件句柄
** output parameters: none
** Returned value: 如果出现错误,则结果为负数。
*********************************************************************************************************/
int _sys_ensure (FILEHANDLE fhHandle)
{
return 0;
}
/*********************************************************************************************************
** Function name: _sys_flen
** Descriptions: 此函数返回文件的当前长度。
** 如果基本系统可以相对于文件末尾进行搜索,则可以定义 fseek(),
** 这样就不再需要使用 _sys_flen() 了。
** input parameters
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
TimerRITadc.rar (50个子文件)
TimerRITadc
cfg_file
zy_if
zy_if_cfg.h 2KB
target_cfg.h 5KB
Startup
rt_sys_s.s 2KB
rt_sys_c.c 15KB
InChip.sct 265B
LPC1700PinCfg.h 54KB
vector_cfg.h 17KB
out
rt_sys_s.d 47B
Cortex-M3 Execute for lpc1700.tra 1KB
vector_table.crf 65KB
Cortex-M3 Execute for lpc1700.lnp 439B
lpc1700pincfg.crf 59KB
rt_sys_c.o 84KB
target.crf 58KB
rt_sys_s.o 2KB
main.crf 58KB
zy_if.d 892B
rt_sys_c.crf 61KB
rt_sys_c.d 960B
target.o 77KB
Cortex-M3 Execute for lpc1700.plg 2KB
lpc1700pincfg.o 77KB
zy_if.crf 60KB
Cortex-M3 Execute for lpc1700.htm 35KB
main.d 701B
main.o 80KB
Cortex-M3 Execute for lpc1700.axf 35KB
zy_if.o 84KB
target.d 798B
Cortex-M3 Execute for lpc1700.hex 12KB
lpc1700pincfg.d 896B
vector_table.o 85KB
vector_table.d 957B
config.h 3KB
USER_CODE
main.c 9KB
Cortex-M3 Execute for lpc1700.map 81KB
Cortex-M3 Execute for lpc1700_uvopt.bak 153KB
Cortex-M3 Execute for lpc1700.Uv2.bak 6KB
Cortex-M3 Execute for lpc1700_uvproj.bak 34KB
Cortex-M3 Execute for lpc1700.uvproj 34KB
ZY_CODE
zy_if
zy_if.h 10KB
zy_if.c 13KB
firmware.h 5KB
Startup
target.h 3KB
LPC1700PinCfg.c 7KB
vector_table.c 11KB
target.c 8KB
lpc1700.h 83KB
Cortex-M3 Execute for lpc1700.uvopt 153KB
Cortex-M3 Execute for lpc1700_DebugInFlash.dep 7KB
共 50 条
- 1
资源评论
- koshan2012-06-18没有提供文本的说明,我还没有研究。
catshit322
- 粉丝: 4964
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- tensorflow-gpu-2.7.3-cp39-cp39-manylinux2010-x86-64.whl
- tensorflow-2.8.0-cp37-cp37m-manylinux2010-x86-64.whl
- tensorflow-2.7.4-cp39-cp39-manylinux2010-x86-64.whl
- 个人资料-1111相关内容
- # C 语言介绍与使用技巧 ## C 语言简介:
- 3、高质量汽车租赁系统+layui)
- 介绍 Python 的一些基本信息,并分享一些使用技巧
- Qt的tcp网络编程(客户端和服务器)
- 当谈到 Linux 常用命令时,有很多命令可以提及 以下是一些常见的 Linux 命令及其功能:
- Sora AI Video Preview Case Sora AI 视频模版项目,React全栈快速部署.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功