TFTP
* Change typo * Format * Add doxygen
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
#define LOGGER_LEVEL_ALL
|
||||
#include "log.h"
|
||||
#include "llfs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "llfs.h"
|
||||
#include "log.h"
|
||||
|
||||
#define TFTP_READ 0
|
||||
|
||||
@@ -29,14 +29,47 @@ extern "C" {
|
||||
typedef struct tftp_custom_file_s {
|
||||
char* data;
|
||||
size_t len;
|
||||
char*name;
|
||||
size_t ofset;
|
||||
}tftp_custom_file_t;
|
||||
char* name;
|
||||
size_t offset;
|
||||
} tftp_custom_file_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize the TFTP server
|
||||
*/
|
||||
void tftp_server_init(void);
|
||||
|
||||
/**
|
||||
* @brief Uninitialize the TFTP server
|
||||
*/
|
||||
void tftp_server_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Custom fseek function
|
||||
*
|
||||
* @param handle The custom file handle
|
||||
* @param offset The offset
|
||||
* @param whence The whence
|
||||
*/
|
||||
void tftp_custom_fseek(tftp_custom_file_t* handle, size_t offset, int whence);
|
||||
|
||||
/**
|
||||
* @brief Custom fread function
|
||||
*
|
||||
* @param buf The buffer to read from
|
||||
* @param bytes The amount of bytes to read
|
||||
* @param handle The custom file handle
|
||||
* @return The amount of bytes read
|
||||
*/
|
||||
size_t tftp_custom_fread(void* buf, size_t bytes, tftp_custom_file_t* handle);
|
||||
|
||||
/**
|
||||
* @brief Custom fwrite function
|
||||
*
|
||||
* @param buf The buffer to write to
|
||||
* @param bytes The amount of bytes to write
|
||||
* @param handle The custom file handle
|
||||
* @return The amount of bytes written
|
||||
*/
|
||||
size_t tftp_custom_fwrite(const void* buf, size_t bytes, tftp_custom_file_t* handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user