chore: reorganize source organization to a more modern style
This commit is contained in:
parent
21cb610d31
commit
0425836642
12 changed files with 16 additions and 10 deletions
29
include/mqtt.h
Normal file
29
include/mqtt.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef ENSAHT_MQTT_H
|
||||
#define ENSAHT_MQTT_H
|
||||
|
||||
#include "lwip/apps/mqtt.h"
|
||||
|
||||
typedef struct {
|
||||
mqtt_client_t *client;
|
||||
ip_addr_t server_addr;
|
||||
const char *hostname;
|
||||
u16_t port;
|
||||
struct mqtt_connect_client_info_t client_info;
|
||||
mqtt_connection_cb_t connect_cb;
|
||||
void *connect_arg;
|
||||
} ensaht_mqtt_t;
|
||||
|
||||
void ensaht_mqtt_init(ensaht_mqtt_t *mqtt);
|
||||
err_t ensaht_mqtt_connect(ensaht_mqtt_t *mqtt, const char *hostname, u16_t port,
|
||||
const struct mqtt_connect_client_info_t *client_info,
|
||||
mqtt_connection_cb_t cb, void *arg);
|
||||
void ensaht_mqtt_disconnect(ensaht_mqtt_t *mqtt);
|
||||
|
||||
err_t ensaht_mqtt_publish(mqtt_client_t *client, const char *topic,
|
||||
const void *payload, u16_t payload_length,
|
||||
mqtt_request_cb_t cb, void *arg);
|
||||
err_t ensaht_mqtt_publish_client(ensaht_mqtt_t *mqtt, const char *topic,
|
||||
const void *payload, u16_t payload_length,
|
||||
mqtt_request_cb_t cb, void *arg);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue