1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

fix timeout data type in the RFS implementation

This commit is contained in:
Bogdan Marinescu 2011-10-13 14:12:05 +03:00
parent 1a1ae155c9
commit a46cc203c8
3 changed files with 9 additions and 8 deletions

View File

@ -4,6 +4,7 @@
#define __CLIENT_H__
#include "type.h"
#include "platform.h"
// Error codes
#define CLIENT_OK 0
@ -11,11 +12,11 @@
// RFS client send/receive functions
typedef u32 ( *p_rfsc_send )( const u8 *p, u32 size );
typedef u32 ( *p_rfsc_recv )( u8 *p, u32 size, s32 timeout );
typedef u32 ( *p_rfsc_recv )( u8 *p, u32 size, timer_data_type 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 );
void rfsc_setup( u8 *pbuf, p_rfsc_send rfsc_send_func, p_rfsc_recv rfsc_recv_func, timer_data_type timeout );
void rfsc_set_timeout( timer_data_type 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 );

View File

@ -5,7 +5,7 @@
#include "client.h"
#include "os_io.h"
#include "eluarpc.h"
#include "platform.h"
#include <stdio.h>
#include "platform_conf.h"
#include "buf.h"
@ -26,7 +26,7 @@ void RFSDEBUG( const char* dummy, ... )
static u8 *rfsc_buffer;
static p_rfsc_send rfsc_send;
static p_rfsc_recv rfsc_recv;
static u32 rfsc_timeout;
static timer_data_type rfsc_timeout;
// ****************************************************************************
// Client helpers
@ -76,7 +76,7 @@ static int rfsch_send_request_read_response()
// ****************************************************************************
// Client public interface
void rfsc_setup( u8 *pbuf, p_rfsc_send rfsc_send_func, p_rfsc_recv rfsc_recv_func, u32 timeout )
void rfsc_setup( u8 *pbuf, p_rfsc_send rfsc_send_func, p_rfsc_recv rfsc_recv_func, timer_data_type timeout )
{
rfsc_buffer = pbuf;
rfsc_send = rfsc_send_func;
@ -84,7 +84,7 @@ void rfsc_setup( u8 *pbuf, p_rfsc_send rfsc_send_func, p_rfsc_recv rfsc_recv_fun
rfsc_timeout = timeout;
}
void rfsc_set_timeout( u32 timeout )
void rfsc_set_timeout( timer_data_type timeout )
{
rfsc_timeout = timeout;
}

View File

@ -135,7 +135,7 @@ static u32 rfs_send( const u8 *p, u32 size )
return size;
}
static u32 rfs_recv( u8 *p, u32 size, s32 timeout )
static u32 rfs_recv( u8 *p, u32 size, timer_data_type timeout )
{
u32 cnt = 0;
int data;