#ifndef 	__CSV_RW_H__
#define 	__CSV_RW_H__


#define ITEM_SPACE		12 //每个数据项的长度固定

typedef struct
{
	char* rw_buf;
	u8 item_space;	
	u16 row;
	u16 column;
	u16 cur_row;
	char path[32];
}CSV_RW;

int csv_rw_init(CSV_RW* csv,
						u8 item_space,
						u16 row,
						u16 column,
						char* path);
int csv_write_item(CSV_RW* csv, char* item_str, u16 row, u16 column);
int csv_write_row(CSV_RW* csv, char* row_str, u16 row);
u32 get_flie_rows(char* path);
int float_format(char* buf, u8 buf_size, char* fmt, float data, u8 end);
void float_format_row(char* fmt, u8 item_space, char* buf, float* data, u8 data_num);


#endif




