chore: housekeeping
This commit is contained in:
27
include/network.h
Normal file
27
include/network.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef NETWORK_H
|
||||
#define NETWORK_H
|
||||
|
||||
#include <MQTT/MQTTClient.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Definitions for socket indexes
|
||||
#define DHCP_SOCKET 0
|
||||
#define DNS_SOCKET 1
|
||||
#define TCP_SOCKET 2
|
||||
|
||||
typedef enum {
|
||||
DHCP_STATE_INIT,
|
||||
DHCP_STATE_DISCOVER,
|
||||
DHCP_STATE_REQUEST,
|
||||
DHCP_STATE_LEASED,
|
||||
DHCP_STATE_RENEW,
|
||||
DHCP_STATE_RELEASE
|
||||
} dhcp_state_t;
|
||||
|
||||
// Initializes the W5500 chip
|
||||
void configure_network(void);
|
||||
void network_init(void);
|
||||
void dhcp_process(void);
|
||||
uint8_t dhcp_get_state(void);
|
||||
|
||||
#endif // NETWORK_H
|
||||
Reference in New Issue
Block a user