/****************************************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
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
.rar (79个子文件)
两个简单程序
GPIO_Beep
Cortex-M3 Execute for lpc1700_uvopt.bak 88KB
Cortex-M3 Execute for lpc1700.uvproj 34KB
cfg_file
zy_if
zy_if_cfg.h 2KB
target_cfg.h 5KB
Startup
LPC1700PinCfg.h 54KB
rt_sys_s.s 2KB
vector_cfg.h 17KB
rt_sys_c.c 15KB
InChip.sct 265B
Cortex-M3 Execute for lpc1700.opt.bak 5KB
ZY_CODE
zy_if
zy_if.h 10KB
zy_if.c 13KB
Startup
lpc1700.h 83KB
vector_table.c 11KB
target.c 8KB
LPC1700PinCfg.c 7KB
target.h 3KB
firmware.h 5KB
Cortex-M3 Execute for lpc1700.Uv2.bak 6KB
Cortex-M3 Execute for lpc1700.map 67KB
config.h 3KB
USER_CODE
main.c 3KB
out
main.d 631B
rt_sys_c.d 862B
rt_sys_c.o 83KB
main.o 76KB
main.crf 57KB
vector_table.crf 65KB
target.o 77KB
rt_sys_s.d 47B
rt_sys_c.crf 60KB
lpc1700pincfg.crf 59KB
lpc1700pincfg.d 826B
lpc1700pincfg.o 76KB
zy_if.o 83KB
Cortex-M3 Execute for lpc1700.lnp 439B
target.d 728B
target.crf 57KB
Cortex-M3 Execute for lpc1700.plg 554B
vector_table.o 85KB
vector_table.d 887B
Cortex-M3 Execute for lpc1700.tra 1KB
zy_if.crf 60KB
Cortex-M3 Execute for lpc1700.axf 30KB
rt_sys_s.o 2KB
zy_if.d 808B
Cortex-M3 Execute for lpc1700.htm 26KB
Cortex-M3 Execute for lpc1700.uvopt 88KB
Cortex-M3 Execute for lpc1700_DebugInFlash.dep 6KB
GPIO
GPIO_uvopt.bak 147KB
GPIO_uvproj.bak 30KB
system_LPC17xx.h 2KB
GPIO_Opt.Bak 3KB
FLASH
system_lpc17xx.d 243B
GPIO.axf 18KB
system_lpc17xx.o 47KB
GPIO.tra 1KB
GPIO.plg 176B
GPIO.htm 29KB
startup_LPC17xx.d 46B
iotest.crf 54KB
iotest.d 195B
GPIO.hex 4KB
GPIO.map 51KB
GPIO.sct 479B
GPIO.lnp 319B
startup_LPC17xx.lst 33KB
startup_LPC17xx.o 6KB
system_lpc17xx.crf 56KB
iotest.o 45KB
GPIO.uvopt 147KB
IOtest.c 832B
GPIO_FLASH.dep 1KB
LPC17xx.h 34KB
system_LPC17xx.c 8KB
GPIO.Opt 3KB
GPIO.uvproj 29KB
RAM.ini 1KB
startup_LPC17xx.s 11KB
共 79 条
- 1
资源评论
天冰天降
- 粉丝: 65
- 资源: 47
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Qt开发知识、经验总结 包括Qss,数据库,Excel,Model/View等
- IV数据.xlsx
- 一些深度学习中的小例子,适合新手学习使用
- foldcraftlauncher_262944.apk
- 珍藏多年的基于matlab实现潮流计算程序源代码集合,包含多个潮流计算程序.rar
- 使用FPGA实现串-并型乘法器
- 基于matlab实现针对基于双曲线定位的DV-Hop算法中误差误差出一种基于加权双曲线定位的DV-Hop改进算法.rar
- 基于matlab实现由遗传算法开发的整数规划,车辆调度问题.rar
- 电视家7.0(对电视配置要求高).apk
- 免费计算机毕业设计-基于JavaEE的医院病历管理系统设计与实现(包含论文+源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功