feat: KT mBMS 펌웨어 3종(HW1/2/3) 및 통합 빌드 환경 초기 커밋 (V4.0.0.1)
This commit is contained in:
86
mBMS_APP_V3117/USMART/usmart_config.c
Normal file
86
mBMS_APP_V3117/USMART/usmart_config.c
Normal file
@@ -0,0 +1,86 @@
|
||||
#include "usmart.h"
|
||||
#include "usmart_str.h"
|
||||
////////////////////////////User Configuration area///////////////////////////////////////////////
|
||||
//Here you want to include the functions stated in the header file (allows you to add)
|
||||
#include "delay.h"
|
||||
#include "usart.h"
|
||||
#include "sys.h"
|
||||
#include "w25qxx.h"
|
||||
#include "fattester.h"
|
||||
|
||||
|
||||
//Function initializes the list (allows you to add)
|
||||
//Users directly in the input string to perform the function name and find
|
||||
struct _m_usmart_nametab usmart_nametab[]=
|
||||
{
|
||||
#if USMART_USE_WRFUNS==1 //If you enable the read and write operations
|
||||
(void*)read_addr ,(u8 *)"u32 read_addr(u32 addr)",
|
||||
(void*)write_addr ,(u8 *)"void write_addr(u32 addr,u32 val)",
|
||||
#endif
|
||||
(void*)delay_ms ,(u8 *)"void delay_ms(u16 nms)",
|
||||
(void*)delay_us ,(u8 *)"void delay_us(u32 nus)",
|
||||
|
||||
(void*)W25QXX_Erase_Chip,(u8 *)"void W25QXX_Erase_Chip(void)",
|
||||
(void*)mf_mount ,(u8 *)"u8 mf_mount(u8* path,u8 mt)",
|
||||
(void*)mf_open ,(u8 *)"u8 mf_open(u8*path,u8 mode)",
|
||||
(void*)mf_close ,(u8 *)"u8 mf_close(void)",
|
||||
(void*)mf_read ,(u8 *)"u8 mf_read(u16 len)",
|
||||
(void*)mf_write ,(u8 *)"u8 mf_write(u8*dat,u16 len)",
|
||||
(void*)mf_opendir ,(u8 *)"u8 mf_opendir(u8* path)",
|
||||
(void*)mf_closedir ,(u8 *)"u8 mf_closedir(void)",
|
||||
(void*)mf_readdir ,(u8 *)"u8 mf_readdir(void)",
|
||||
(void*)mf_scan_files,(u8 *)"u8 mf_scan_files(u8 * path)",
|
||||
(void*)mf_showfree ,(u8 *)"u32 mf_showfree(u8 *drv)",
|
||||
(void*)mf_lseek ,(u8 *)"u8 mf_lseek(u32 offset)",
|
||||
(void*)mf_tell ,(u8 *)"u32 mf_tell(void)",
|
||||
(void*)mf_size ,(u8 *)"u32 mf_size(void)",
|
||||
(void*)mf_mkdir ,(u8 *)"u8 mf_mkdir(u8*pname)",
|
||||
(void*)mf_fmkfs ,(u8 *)"u8 mf_fmkfs(u8* path,u8 mode,u16 au)",
|
||||
(void*)mf_unlink ,(u8 *)"u8 mf_unlink(u8 *pname)",
|
||||
(void*)mf_rename ,(u8 *)"u8 mf_rename(u8 *oldname,u8* newname)",
|
||||
(void*)mf_getlabel ,(u8 *)"void mf_getlabel(u8 *path)",
|
||||
(void*)mf_setlabel ,(u8 *)"void mf_setlabel(u8 *path)",
|
||||
(void*)mf_gets ,(u8 *)"void mf_gets(u16 size)",
|
||||
(void*)mf_putc ,(u8 *)"u8 mf_putc(u8 c)",
|
||||
(void*)mf_puts ,(u8 *)"u8 mf_puts(u8*c)",
|
||||
};
|
||||
|
||||
///////////////////////////////////END///////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
//Function control manager initialize
|
||||
//Each control function name
|
||||
//Get total number of functions
|
||||
struct _m_usmart_dev usmart_dev=
|
||||
{
|
||||
usmart_nametab,
|
||||
usmart_init,
|
||||
usmart_cmd_rec,
|
||||
usmart_exe,
|
||||
usmart_scan,
|
||||
sizeof(usmart_nametab)/sizeof(struct _m_usmart_nametab),//Function number
|
||||
0, //Number of parameters
|
||||
0, //Function ID
|
||||
1, //Parameter display type, 0,10-; 1,16-
|
||||
0, //Parameter type. BITX:,0, Figure 1, the string
|
||||
0, //The length of staging tables for each parameter, you need to MAX_PARM a initialize 0
|
||||
0, //Parameter of the function, you need to PARM_LEN a initialize 0
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user