chore: bloatify
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// MQTT configuration
|
||||
#define CLIENT_ID "ch32_node"
|
||||
|
||||
#define MQTT_TARGET_IP {192, 168, 102, 147}
|
||||
#define MQTT_TARGET_IP {192, 168, 102, 100}
|
||||
#define MQTT_TARGET_PORT 1883
|
||||
|
||||
#define MQTT_KEEP_ALIVE_INTERVAL 60
|
||||
|
||||
19
include/dhcp.h
Normal file
19
include/dhcp.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef DHCP_H
|
||||
#define DHCP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
DHCP_STATE_INIT,
|
||||
DHCP_STATE_DISCOVER,
|
||||
DHCP_STATE_REQUEST,
|
||||
DHCP_STATE_LEASED,
|
||||
DHCP_STATE_RENEW,
|
||||
DHCP_STATE_RELEASE
|
||||
} dhcp_state_t;
|
||||
|
||||
void dhcp_init(void);
|
||||
void dhcp_process(void);
|
||||
uint8_t dhcp_get_state(void);
|
||||
|
||||
#endif
|
||||
@@ -8,9 +8,8 @@
|
||||
(uint32_t)(FUNCONF_SYSTEM_CORE_CLOCK / TIMER_DELAY)
|
||||
#define millis() (systick_millis)
|
||||
|
||||
// ms counter incremented by SysTick
|
||||
extern volatile uint32_t systick_millis;
|
||||
void init_systick(void);
|
||||
|
||||
// ms counter incremented by SysTick
|
||||
// extern volatile uint32_t systick_millis;
|
||||
|
||||
#endif // SYSTICK_H
|
||||
|
||||
@@ -24,13 +24,16 @@ void handle_ip_assigned(void);
|
||||
// Initializes the W5500 chip
|
||||
void configure_network(void);
|
||||
|
||||
void configure_dhcp(void);
|
||||
// void configure_dhcp(void);
|
||||
void dhcp_init(void);
|
||||
void dhcp_process(void);
|
||||
|
||||
// resolves a domain name
|
||||
void resolve_domain_name(const char* domain_name);
|
||||
|
||||
// init and connect the MQTT client
|
||||
MQTTClient setup_mqtt_client(Network* network, ch32_mqtt_options_t* opts);
|
||||
int setup_mqtt_client(Network* network, ch32_mqtt_options_t* opts,
|
||||
MQTTClient* client);
|
||||
|
||||
int subscribe_to_topic(MQTTClient* client, const char* topic, enum QoS qos,
|
||||
messageHandler message_callback);
|
||||
|
||||
Reference in New Issue
Block a user