Changeset 374 for asp3_tinet_ecnl_arm/trunk/ntshell/fatfs/ffarch.c
- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/ntshell/fatfs/ffarch.c
r369 r374 51 51 #include "sdfs.h" 52 52 #include "ff.h" 53 #include "util/ntstdio.h"54 55 extern ntstdio_t ntstdio; 53 #include <stdio.h> 54 #include "hal/rtc_api.h" 55 #include "ffarch.h" 56 56 57 57 enum ffarch_state_t { … … 80 80 ret2 = get_tim(&now); 81 81 if (ret2 != E_OK){ 82 ntstdio_printf(&ntstdio,"[ffarch] get_tim error: %s",82 printf("[ffarch] get_tim error: %s", 83 83 itron_strerror(ret2)); 84 84 return; … … 94 94 ret = tslp_tsk(timer); 95 95 if ((ret != E_OK) && (ret != E_TMOUT)) { 96 ntstdio_printf(&ntstdio,"[ffarch] tslp_tsk error: %s %d",96 printf("[ffarch] tslp_tsk error: %s %d", 97 97 itron_strerror(ret), timer); 98 98 break; … … 101 101 ret2 = get_tim(&now); 102 102 if (ret2 != E_OK) { 103 ntstdio_printf(&ntstdio,"[ffarch] get_tim error: %s",103 printf("[ffarch] get_tim error: %s", 104 104 itron_strerror(ret2)); 105 105 break; … … 150 150 151 151 if (romdisk_init()) { 152 ntstdio_printf(&ntstdio,"ROM disk (0:) OK!\n");152 printf("ROM disk (0:) OK!\n"); 153 153 } 154 154 else { 155 ntstdio_printf(&ntstdio, "ROM disk (0:) NG!\n"); 156 } 157 158 serial_ctl_por(SIO_PORTID, IOCTL_FCSND | IOCTL_FCRCV); 155 printf("ROM disk (0:) NG!\n"); 156 } 159 157 } 160 158 … … 272 270 { 273 271 DRESULT res; 274 uint32_t *dp = (uint32_t *)buff , st, ed;272 uint32_t *dp = (uint32_t *)buff; 275 273 uint8_t *ptr = (uint8_t *)buff; 276 274 … … 333 331 { 334 332 BYTE s = 0; 335 333 336 334 /* Write protected */ 337 335 if (WP()) … … 377 375 case FFS_RETRY_WAIT: 378 376 if (ffarch_retry_count == 0) { 379 ntstdio_printf(&ntstdio,"SD card (1:) initialize tired...\n");377 printf("SD card (1:) initialize tired...\n"); 380 378 381 379 ffarch_state = FFS_IDLE; … … 390 388 if ((sdfs._is_initialized & STA_NOINIT) 391 389 || (((sdfs_prev_status & STA_NODISK) != 0) && ((sdfs_new_status & STA_NODISK) == 0))) { 392 ntstdio_printf(&ntstdio,"SD card initializing ...\n");390 printf("SD card initializing ...\n"); 393 391 394 392 if (SD_begin()) { 395 ntstdio_printf(&ntstdio,"SD card (1:) OK!\n");393 printf("SD card (1:) OK!\n"); 396 394 397 395 /* uploadディレクトリを作成しておく */ … … 403 401 } 404 402 else { 405 ntstdio_printf(&ntstdio,"SD card (1:) NG!\n");403 printf("SD card (1:) NG!\n"); 406 404 ffarch_state = FFS_RETRY_WAIT; 407 405 ffarch_timer = 1000 * 1000; … … 410 408 /* SDカードが抜かれた場合 */ 411 409 else if (((sdfs_prev_status & STA_NODISK) == 0) && ((sdfs_new_status & STA_NODISK) != 0)) { 412 ntstdio_printf(&ntstdio,"SD card unmount\n");410 printf("SD card unmount\n"); 413 411 414 412 f_mount(&Sd.FatFs, "1:", 0); … … 428 426 } 429 427 430 int ff_cre_syncobj(BYTE vol, _SYNC_t* sobj)428 int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj) 431 429 { 432 430 return 1; 433 431 } 434 432 435 int ff_req_grant( _SYNC_t sobj)433 int ff_req_grant(FF_SYNC_t sobj) 436 434 { 437 435 ER ret; … … 440 438 } 441 439 442 void ff_rel_grant( _SYNC_t sobj)440 void ff_rel_grant(FF_SYNC_t sobj) 443 441 { 444 442 sig_sem(SEM_FILESYSTEM); 445 443 } 446 444 447 int ff_del_syncobj( _SYNC_t sobj)445 int ff_del_syncobj(FF_SYNC_t sobj) 448 446 { 449 447 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.