Reduce the includes used in all files.

- To reduce the dependencies to the minimal the number of includes was
  reduced.
This commit is contained in:
Euripedes Rocha Filho
2021-04-07 10:49:49 +01:00
committed by Euripedes Rocha
parent fd2d04e687
commit 87fcce72c9
6 changed files with 36 additions and 42 deletions
+1
View File
@@ -6,6 +6,7 @@
#ifndef _MQTT_OUTOBX_H_
#define _MQTT_OUTOBX_H_
#include "platform.h"
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
+1 -13
View File
@@ -7,21 +7,9 @@
#define _ESP_PLATFORM_H__
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/event_groups.h"
#include "lwip/err.h"
#include "lwip/sockets.h"
#include "lwip/sys.h"
#include "lwip/netdb.h"
#include "lwip/dns.h"
#include "sys/queue.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_system.h"
#include <sys/time.h>
char *platform_create_id_string(void);
int platform_random(int max);
+1 -3
View File
@@ -5,8 +5,6 @@
#include "esp_log.h"
#ifndef CONFIG_MQTT_CUSTOM_OUTBOX
static const char *TAG = "OUTBOX";
typedef struct outbox_item {
@@ -151,7 +149,7 @@ esp_err_t outbox_set_tick(outbox_handle_t outbox, int msg_id, outbox_tick_t tick
item->tick = tick;
return ESP_OK;
}
return ESP_FAIL;
return ESP_FAIL;
}
esp_err_t outbox_delete_msgtype(outbox_handle_t outbox, int msg_type)
+3 -1
View File
@@ -1,9 +1,11 @@
#include "platform.h"
#ifdef ESP_PLATFORM
#include "esp_system.h"
#include "esp_log.h"
#include "esp_system.h"
#include <sys/time.h>
#include <stdlib.h>
#include <stdint.h>
static const char *TAG = "PLATFORM";