TFTP code writing begin..
This commit is contained in:
@@ -20,6 +20,14 @@
|
||||
/* Extern Functions ---------------------------------------------*/
|
||||
#ifdef F_STORAGE
|
||||
extern void save_data(uint8_t *data, uint32_t data_len, uint16_t block_number);
|
||||
|
||||
void save_data(uint8_t *data, uint32_t data_len, uint16_t block_number)
|
||||
{
|
||||
//Nothing to do with received data yet..
|
||||
//TODO: Add your own handler here
|
||||
//Print out data as string
|
||||
PRINTF("Data #%d-%lu:\r\n%s\r\n", block_number, data_len, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Global Variable ----------------------------------------------*/
|
||||
|
||||
@@ -19,6 +19,13 @@ extern "C" {
|
||||
|
||||
#define F_STORAGE // If your target support a storage, you have to activate this feature and implement.
|
||||
|
||||
#if defined(F_STORAGE)
|
||||
#include "ff.h"
|
||||
FIL fil; // FatFs File objects
|
||||
FRESULT fr; // FatFs function common result code
|
||||
#endif
|
||||
|
||||
|
||||
#define SOCK_TFTP 2
|
||||
|
||||
#define INFO_DBG 0x01
|
||||
|
||||
Reference in New Issue
Block a user