Files
2023-Webservices_And_Applic…/project/Core/Src/tftp.c
Sander Speetjens 315871af60 TFTP
Add logger and checks for initialising
2023-11-06 21:45:57 +01:00

38 lines
734 B
C

//
// Created by sanderspeetjens on 06/11/23.
//
#include "tftp.h"
static const char* TAG = "tftp_server";
void *tftp_open(const char *fname, const char *mode, u8_t write) {
}
void tftp_close(void *handle) {
}
int tftp_read(void* handle, void* buf, int bytes) {
}
int tftp_write(void* handle, struct pbuf* p) {
}
struct tftp_context tftpContext_s = {
tftp_open,
tftp_close,
tftp_read,
tftp_write
};
void tftp_server_init(void) {
LOG_INFO(TAG, "Initializing tftp server");
if (tftp_init(&tftpContext_s) != ERR_OK) {
LOG_FATAL(TAG, "Could not initialize tftp server");
return;
}
LOG_INFO(TAG, "tftp server initialized successfully");
}