added code to support FEC networking

This commit is contained in:
Markus Fröschle
2013-12-23 12:55:19 +00:00
parent 48f58a4e18
commit 4a22671053
11 changed files with 759 additions and 96 deletions

33
BaS_gcc/net/bootp.c Normal file
View File

@@ -0,0 +1,33 @@
#include "bas_types.h"
#include <stdint.h>
#include <stdbool.h>
static bool bootp_initialized = false;
/*
* bootp client state
*/
struct bootp_client
{
uint8_t state;
uint8_t mode;
uint8_t socket_handle;
uint16_t timer_handle;
uint16_t boot_secs;
};
static struct bootp_client client;
int bootpc_init(int mode)
{
if (bootp_initialized)
{
return true;
}
/*
* get socket handle
*/
client.socket_handle = udp_getsocket