Format
This commit is contained in:
2023-11-06 22:30:29 +01:00
parent 1a6a2db34e
commit 12370baf22
2 changed files with 6 additions and 11 deletions

View File

@@ -7,10 +7,10 @@
#ifndef PROJECT_TFTP_H
#define PROJECT_TFTP_H
#define LOGGER_LEVEL_ALL
#include "log.h"
#include <tftp_server.h>
#include "log.h"
extern struct tftp_context tftpContext_s;
extern struct tftp_context tftpContext_s;
void tftp_server_init(void);
#endif //PROJECT_TFTP_H
#endif // PROJECT_TFTP_H

View File

@@ -8,11 +8,11 @@
static const char* TAG = "tftp_server";
void *tftp_open(const char *fname, const char *mode, u8_t write) {
void* tftp_open(const char* fname, const char* mode, u8_t write) {
LOG_INFO(TAG, "Opening %s", fname);
}
void tftp_close(void *handle) {
void tftp_close(void* handle) {
LOG_INFO(TAG, "closing file");
}
int tftp_read(void* handle, void* buf, int bytes) {
@@ -23,12 +23,7 @@ int tftp_write(void* handle, struct pbuf* p) {
LOG_INFO(TAG, "Writing file");
}
struct tftp_context tftpContext_s = {
.open = tftp_open,
.close = tftp_close,
.read = tftp_read,
.write = tftp_write
};
struct tftp_context tftpContext_s = {.open = tftp_open, .close = tftp_close, .read = tftp_read, .write = tftp_write};
void tftp_server_init(void) {
LOG_INFO(TAG, "Initializing tftp server");