mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
e7702bb0e2
- FAT changed to support the new opendir/readdir/closedir mechanism, and to use lseek directly instead of ioctl (also fixed a bug in FAT's lseek that always returned 0 instead of file position). - ET-STM32 console moved to UART2@19200bps (to allow RFS to run on UART0). If UART0 is needee for console, remember to disable RFS. - freed 700+ bytes of RAM by changing the devman implementation to keep pointers instead of actual DM_DEVICE structures - other minor code changes and fixes
27 lines
708 B
C
27 lines
708 B
C
// Remote filesystem client
|
|
|
|
#ifndef __CLIENT_H__
|
|
#define __CLIENT_H__
|
|
|
|
#include "type.h"
|
|
|
|
// Error codes
|
|
#define CLIENT_OK 0
|
|
#define CLIENT_ERR 1
|
|
|
|
// RFS client send/receive functions
|
|
typedef u32 ( *p_rfsc_send )( const u8 *p, u32 size );
|
|
typedef u32 ( *p_rfsc_recv )( u8 *p, u32 size, u32 timeout );
|
|
|
|
// Public interface
|
|
void rfsc_setup( u8 *pbuf, p_rfsc_send rfsc_send_func, p_rfsc_recv rfsc_recv_func, u32 timeout );
|
|
void rfsc_set_timeout( u32 timeout );
|
|
int rfsc_open( const char* pathname, int flags, int mode );
|
|
s32 rfsc_write( int fd, const void *buf, u32 count );
|
|
s32 rfsc_read( int fd, void *buf, u32 count );
|
|
s32 rfsc_lseek( int fd, s32 offset, int whence );
|
|
int rfsc_close( int fd );
|
|
|
|
#endif
|
|
|