@@ -21,7 +21,7 @@ static enum rym_code _rym_bg(
21
21
struct custom_ctx * cctx = (struct custom_ctx * )ctx ;
22
22
cctx -> fpath [0 ] = '/' ;
23
23
/* the buf should be the file name */
24
- strcpy (& (cctx -> fpath [1 ]), buf );
24
+ strcpy (& (cctx -> fpath [1 ]), ( const char * ) buf );
25
25
cctx -> fd = open (cctx -> fpath , O_CREAT | O_WRONLY | O_TRUNC , 0 );
26
26
if (cctx -> fd < 0 )
27
27
{
@@ -31,7 +31,7 @@ static enum rym_code _rym_bg(
31
31
return RYM_CODE_CAN ;
32
32
}
33
33
34
- cctx -> flen = atoi (buf + strlen (buf )+ 1 );
34
+ cctx -> flen = atoi (( const char * ) buf + strlen (( const char * ) buf )+ 1 );
35
35
if (cctx -> flen == 0 )
36
36
cctx -> flen = -1 ;
37
37
return RYM_CODE_ACK ;
@@ -80,8 +80,8 @@ rt_err_t rym_write_to_file(rt_device_t idev)
80
80
81
81
rt_kprintf ("entering RYM mode\n" );
82
82
83
- res = rym_recv_on_device (& ctx -> parent , idev ,
84
- _rym_bg , _rym_tof , _rym_end , 1000 );
83
+ res = rym_recv_on_device (& ctx -> parent , idev , RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX ,
84
+ _rym_bg , _rym_tof , _rym_end , 1000 );
85
85
86
86
/* there is no Ymodem traffic on the line so print out info. */
87
87
rt_kprintf ("leaving RYM mode with code %d\n" , res );
0 commit comments