add remote_fn define.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@540 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2010-03-25 04:51:55 +00:00
parent 4190cf58e0
commit 6768e183fc
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* /*
+----------------------- +----------------------------------------------------
| |
| |
| |
@ -7,6 +7,7 @@
| Date Author Notes | Date Author Notes
| 2010-01-02 aozima The bate version. | 2010-01-02 aozima The bate version.
| 2010-02-10 aozima change printf string to english. | 2010-02-10 aozima change printf string to english.
| 2010-03-25 aozima add remote_fn define.
+---------------------------------------------------- +----------------------------------------------------
*/ */
@ -19,7 +20,8 @@
/* 设置允许偏差,单位0.01ms */ /* 设置允许偏差,单位0.01ms */
#define remote_deviation 15 #define remote_deviation 15
#define remote_code_len_max 100 #define remote_code_len_max 100
/* 样本保存文件名全路径 */
#define remote_fn "/resource/remote.txt"
/* 红外模式 0:没启动,1:自学习,2:正常解码 */ /* 红外模式 0:没启动,1:自学习,2:正常解码 */
unsigned int rem_mode = 0; unsigned int rem_mode = 0;
@ -155,7 +157,7 @@ void rem_start(void)
unsigned int EOF_flag = 1; unsigned int EOF_flag = 1;
printf("\r\ndecode remote codes"); printf("\r\ndecode remote codes");
fd = open("/resource/remote.txt",O_RDONLY,0); fd = open(remote_fn,O_RDONLY,0);
if( fd>0 ) if( fd>0 )
{ {
printf("\r/resource/remote.txt open succeed"); printf("\r/resource/remote.txt open succeed");
@ -403,7 +405,7 @@ int rem_study(void)
rem_mode = 1; rem_mode = 1;
rx_count = 0; rx_count = 0;
printf("\r\nremote studing....."); printf("\r\nremote studing.....");
fd = open("/resource/remote.txt",O_WRONLY | O_TRUNC,0); fd = open(remote_fn,O_WRONLY | O_TRUNC,0);
if( !(fd<0) ) if( !(fd<0) )
{ {
printf("\r\n/resource/remote.txt create succeed."); printf("\r\n/resource/remote.txt create succeed.");