Skip to content

Commit

Permalink
Fix header includes (#1120)
Browse files Browse the repository at this point in the history
* Fix header includes

* Restore include config checks

---------

Co-authored-by: Tony Josi <[email protected]>
Co-authored-by: ActoryOu <[email protected]>
  • Loading branch information
3 people authored Mar 25, 2024
1 parent 04a4b54 commit 207f971
Show file tree
Hide file tree
Showing 37 changed files with 157 additions and 170 deletions.
6 changes: 3 additions & 3 deletions source/include/FreeRTOS_ARP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
#ifndef FREERTOS_ARP_H
#define FREERTOS_ARP_H

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"

/* *INDENT-OFF* */
Expand Down
3 changes: 3 additions & 0 deletions source/include/FreeRTOS_BitConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#ifndef FREERTOS_BITCONFIG_H
#define FREERTOS_BITCONFIG_H

/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
7 changes: 3 additions & 4 deletions source/include/FreeRTOS_DHCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
#ifndef FREERTOS_DHCP_H
#define FREERTOS_DHCP_H

#include "FreeRTOS.h"

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_Sockets.h"

/* *INDENT-OFF* */
Expand Down
6 changes: 4 additions & 2 deletions source/include/FreeRTOS_DHCPv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
#ifndef FREERTOS_DHCPV6_H
#define FREERTOS_DHCPV6_H

/* Application level configuration options. */
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DHCP.h"
#include "FreeRTOSIPConfig.h"

#ifdef __cplusplus
extern "C" {
Expand Down
9 changes: 5 additions & 4 deletions source/include/FreeRTOS_DNS.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
#ifndef FREERTOS_DNS_H
#define FREERTOS_DNS_H

#include "FreeRTOS.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Application level configuration options. */
#include "FreeRTOS_DNS_Globals.h"
#include "FreeRTOS_DNS_Callback.h"
/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DNS_Cache.h"
#include "FreeRTOS_DNS_Callback.h"
#include "FreeRTOS_DNS_Globals.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
Expand Down
8 changes: 3 additions & 5 deletions source/include/FreeRTOS_DNS_Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
#ifndef FREERTOS_DNS_CACHE_H
#define FREERTOS_DNS_CACHE_H

/* FreeRTOS includes. */
#include "FreeRTOS.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DNS_Globals.h"

/* Standard includes. */
#include <stdint.h>

#if ( ( ipconfigUSE_DNS_CACHE == 1 ) && ( ipconfigUSE_DNS != 0 ) )

/**
Expand Down
10 changes: 4 additions & 6 deletions source/include/FreeRTOS_DNS_Callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@
#ifndef FREERTOS_DNS_CALLBACK_H
#define FREERTOS_DNS_CALLBACK_H

/* FreeRTOS includes. */
#include "FreeRTOS.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* FreeRTOS+TCP includes. */
/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DNS_Globals.h"

/* Standard includes. */
#include <stdint.h>

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
Expand Down
7 changes: 3 additions & 4 deletions source/include/FreeRTOS_DNS_Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
#ifndef FREERTOS_DNS_GLOBALS_H
#define FREERTOS_DNS_GLOBALS_H

#include "FreeRTOS.h"

#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_Sockets.h"

#define dnsPARSE_ERROR 0UL
Expand Down
6 changes: 6 additions & 0 deletions source/include/FreeRTOS_DNS_Networking.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@
#ifndef FREERTOS_DNS_NETWORKING_H
#define FREERTOS_DNS_NETWORKING_H

/* Global Includes & Definitions */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DNS_Globals.h"

#if ( ipconfigUSE_DNS != 0 )
Expand Down
10 changes: 4 additions & 6 deletions source/include/FreeRTOS_DNS_Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@
#ifndef FREERTOS_DNS_PARSER_H
#define FREERTOS_DNS_PARSER_H

/* FreeRTOS includes. */
#include "FreeRTOS.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* FreeRTOS+TCP includes. */
/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DNS_Globals.h"

/* Standard includes. */
#include <stdint.h>

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
Expand Down
5 changes: 4 additions & 1 deletion source/include/FreeRTOS_ICMP.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
#ifndef FREERTOS_ICMP_H
#define FREERTOS_ICMP_H

/* FreeRTOS+TCP includes. */
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"
#include "FreeRTOS_IP_Private.h"

Expand Down
11 changes: 2 additions & 9 deletions source/include/FreeRTOS_IP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@
#ifndef FREERTOS_IP_H
#define FREERTOS_IP_H

#include "FreeRTOS.h"
#include "task.h"

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* *INDENT-OFF* */
Expand Down Expand Up @@ -485,11 +480,9 @@ extern NetworkBufferDescriptor_t * pxARPWaitingNetworkBuffer;
#define vPrintResourceStats() do {} while( ipFALSE_BOOL ) /**< ipconfigHAS_PRINTF is not defined. Define vPrintResourceStats to a do-while( 0 ). */
#endif

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP_Utils.h" /*TODO can be moved after other 2 includes */


#include "FreeRTOS_IPv4.h"

#include "FreeRTOS_IPv6.h"

/* *INDENT-OFF* */
Expand Down
16 changes: 16 additions & 0 deletions source/include/FreeRTOS_IP_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@
#ifndef FREERTOS_IP_COMMON_H
#define FREERTOS_IP_COMMON_H

/* Standard Includes. */
#include <stdint.h>
#include <stdio.h>
#include <string.h>

/* FreeRTOS Includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
#include "event_groups.h"

/* Application Level Configuration Options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
Expand Down
20 changes: 8 additions & 12 deletions source/include/FreeRTOS_IP_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,17 @@
#ifndef FREERTOS_IP_PRIVATE_H
#define FREERTOS_IP_PRIVATE_H

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_Routing.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_Stream_Buffer.h"
#include "FreeRTOS_Routing.h"

#if ( ipconfigUSE_TCP == 1 )
#include "FreeRTOS_TCP_WIN.h"
#include "FreeRTOS_TCP_IP.h"
#endif

#include "semphr.h"

#include "event_groups.h"
/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_TCP_WIN.h"
#include "FreeRTOS_TCP_IP.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
Expand Down
24 changes: 9 additions & 15 deletions source/include/FreeRTOS_IP_Timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,20 @@
#ifndef FREERTOS_IP_TIMERS_H
#define FREERTOS_IP_TIMERS_H

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
#include <string.h>

/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"

/* FreeRTOS+TCP includes. */
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_IP_Private.h"
#include "FreeRTOS_ARP.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_UDP_IP.h"
#include "FreeRTOS_DHCP.h"
#include "NetworkInterface.h"
#include "NetworkBufferManagement.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_ARP.h"
#include "FreeRTOS_DHCP.h"
#include "FreeRTOS_DNS.h"

/* *INDENT-OFF* */
Expand Down
25 changes: 9 additions & 16 deletions source/include/FreeRTOS_IP_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,21 @@
#ifndef FREERTOS_IP_UTILS_H
#define FREERTOS_IP_UTILS_H

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
#include <string.h>

/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"

/* FreeRTOS+TCP includes. */
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_Routing.h"
#include "FreeRTOS_IP_Private.h"
#include "FreeRTOS_Routing.h"
#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_UDP_IP.h"
#include "FreeRTOS_DHCP.h"
#include "NetworkInterface.h"
#include "NetworkBufferManagement.h"
#include "FreeRTOS_DNS.h"

/* Optional FreeRTOS+TCP Includes. */
#include "FreeRTOS_DHCP.h"
#include "FreeRTOS_DNS.h"
#include "FreeRTOS_IPv4_Utils.h"
#include "FreeRTOS_IPv6_Utils.h"

Expand Down
8 changes: 2 additions & 6 deletions source/include/FreeRTOS_IPv4.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@
#ifndef FREERTOS_IPV4_H
#define FREERTOS_IPV4_H

#include "FreeRTOS.h"
#include "task.h"

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
Expand Down
4 changes: 4 additions & 0 deletions source/include/FreeRTOS_IPv4_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#ifndef FREERTOS_IPV4_PRIVATE_H
#define FREERTOS_IPV4_PRIVATE_H

/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP_Private.h"

/* *INDENT-OFF* */
Expand Down
7 changes: 2 additions & 5 deletions source/include/FreeRTOS_IPv4_Sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@
#ifndef FREERTOS_IPV4_SOCKETS_H
#define FREERTOS_IPV4_SOCKETS_H

/* Standard includes. */
#include <string.h>

/* FreeRTOS includes. */
#include "FreeRTOS.h"
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

#ifdef __cplusplus
extern "C" {
Expand Down
10 changes: 3 additions & 7 deletions source/include/FreeRTOS_IPv4_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@
* @brief Implements the utility functions for FreeRTOS_IP.c
*/

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
/* Global Includes & Definitions. */
#include "FreeRTOS_IP_Common.h"

/* FreeRTOS includes. */
#include "FreeRTOS.h"

/* FreeRTOS+TCP includes. */
/* Core FreeRTOS+TCP Includes. */
#include "FreeRTOS_IP.h"

/* *INDENT-OFF* */
Expand Down
Loading

0 comments on commit 207f971

Please sign in to comment.