[Util] fix the dependence of file feature in ymodem
This commit is contained in:
parent
75a3f3dd3a
commit
457759ded7
|
@ -2,12 +2,16 @@ menu "Utilities"
|
||||||
|
|
||||||
config RT_USING_RYM
|
config RT_USING_RYM
|
||||||
bool "Enable Ymodem"
|
bool "Enable Ymodem"
|
||||||
depends on RT_USING_DFS = y
|
|
||||||
default n
|
default n
|
||||||
|
|
||||||
if RT_USING_RYM
|
if RT_USING_RYM
|
||||||
config YMODEM_DISABLE_CRC_TABLE
|
config YMODEM_USING_CRC_TABLE
|
||||||
bool "Disable CRC Table"
|
bool "Enable CRC Table in Ymodem"
|
||||||
|
default n
|
||||||
|
|
||||||
|
config YMODEM_USING_FILE_TRANSFER
|
||||||
|
bool "Enable file transfer feature"
|
||||||
|
select RT_USING_DFS
|
||||||
default n
|
default n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
from building import *
|
from building import *
|
||||||
|
|
||||||
cwd = GetCurrentDir()
|
cwd = GetCurrentDir()
|
||||||
src = Glob('*.c')
|
src = Split('''
|
||||||
|
ymodem.c
|
||||||
|
''')
|
||||||
|
|
||||||
CPPPATH = [cwd]
|
CPPPATH = [cwd]
|
||||||
|
|
||||||
|
if GetDepend('RT_USING_DFS') and GetDepend('YMODEM_USING_FILE_TRANSFER'):
|
||||||
|
src += ['ry_sy.c']
|
||||||
|
|
||||||
group = DefineGroup('Utilities', src, depend = ['RT_USING_RYM'], CPPPATH = CPPPATH)
|
group = DefineGroup('Utilities', src, depend = ['RT_USING_RYM'], CPPPATH = CPPPATH)
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
|
@ -11,8 +11,9 @@
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <ymodem.h>
|
#include <ymodem.h>
|
||||||
#include <dfs_posix.h>
|
#include <dfs_posix.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <board.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
struct custom_ctx
|
struct custom_ctx
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
#include "ymodem.h"
|
#include "ymodem.h"
|
||||||
|
|
||||||
#ifndef YMODEM_DISABLE_CRC_TABLE
|
#ifdef YMODEM_USING_CRC_TABLE
|
||||||
static const rt_uint16_t ccitt_table[256] =
|
static const rt_uint16_t ccitt_table[256] =
|
||||||
{
|
{
|
||||||
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
|
||||||
|
|
Loading…
Reference in New Issue