Skip to content

Commit

Permalink
Give header files a uniform indentation (#1034)
Browse files Browse the repository at this point in the history
* Give header files a uniform indentation

* Uncrustify: triggered by comment.

* A few more removals of /* ifndef ...*/

* After applying formattingChanges.patch

* Undo indent to avoid huge white space changes

* Undo more indent to avoid huge white space changes

* Undo two more indent to avoid huge white space changes

* Undo 15 more indent to avoid huge white space changes

* Undo 3 more indent to avoid huge white space changes

* Undo 4 more indent to avoid huge white space changes

* Undo 3 more indent to avoid huge white space changes

* It seems that core_cm55.h was not yet formatted

* More files in MPS3_AN552 were not yet formatted.

* And the last one

* Uncrustify: triggered by comment.

* Just a push to restart CI-checks

* Placed some extern "c" comments again

* Formatting fixes

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: ActoryOu <[email protected]>
Co-authored-by: Monika Singh <[email protected]>
  • Loading branch information
5 people authored Oct 25, 2023
1 parent 8761f51 commit 1474378
Show file tree
Hide file tree
Showing 41 changed files with 97 additions and 87 deletions.
4 changes: 2 additions & 2 deletions source/include/FreeRTOS_BitConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@


#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */
#endif /* FREERTOS_STREAM_BUFFER_H */
6 changes: 3 additions & 3 deletions source/include/FreeRTOS_DHCPv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

/** @brief Default v6 DHCP client port. */
#define ipDHCPv6_CLIENT_PORT 546U
/** @brief Default v6 DHCP server port. */
/** @brief Default v6 DHCP server port. */
#define ipDHCPv6_SERVER_PORT 547U

/** @brief The ID of a client or a server. */
Expand Down Expand Up @@ -159,12 +159,12 @@
void vDHCPv6Stop( struct xNetworkEndPoint * pxEndPoint );

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

/* The application should supply the following time-function.
* It must return the number of seconds that have passed since
* 1/1/1970. */
extern uint32_t ulApplicationTimeHook( void );

#endif /* FREERTOS_DHCPv6_H */
#endif /* FREERTOS_DHCPV6_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_DNS_Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
struct freertos_addrinfo ** ppxAddressInfo );
#endif /* if ( ipconfigUSE_DNS_CACHE == 1 ) */

#endif /* ifndef FREERTOS_DNS_CACHE_H */
#endif /* FREERTOS_DNS_CACHE_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_DNS_Callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@
#endif
/* *INDENT-ON* */

#endif /* ifndef FREERTOS_DNS_CALLBACK_H */
#endif /* FREERTOS_DNS_CALLBACK_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_DNS_Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,4 @@
#define ipMDNS_IP_ADDRESS 0xfb0000e0U /* 224.0.0.251 */
#endif

#endif /* ifndef FREERTOS_DNS_GLOBALS_H */
#endif /* FREERTOS_DNS_GLOBALS_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_DNS_Networking.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
void DNS_CloseSocket( Socket_t xDNSSocket );

#endif /* if ( ipconfigUSE_DNS != 0 ) */
#endif /* ifndef FREERTOS_DNS_NETWORKING_H */
#endif /* FREERTOS_DNS_NETWORKING_H */
16 changes: 15 additions & 1 deletion source/include/FreeRTOS_DNS_Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@

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

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#if ( ipconfigUSE_DNS != 0 )

/** @brief Flag DNS parsing errors in situations where an IPv4 address is the return
Expand Down Expand Up @@ -87,4 +94,11 @@
size_t * uxBytesRead );

#endif /* if ( ipconfigUSE_DNS != 0 ) */
#endif /* ifndef FREERTOS_DNS_PARSER_H */

/* *INDENT-OFF* */
#ifdef __cplusplus
} /* extern "C" */
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_DNS_PARSER_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv4.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ enum eFrameProcessingResult prvCheckIP4HeaderOptions( struct xNETWORK_BUFFER * c
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_H */
#endif /* FREERTOS_IPV4_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv4_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ typedef struct xTCP_PACKET TCPPacket_t;
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_PRIVATE_H */
#endif /* FREERTOS_IPV4_PRIVATE_H */
3 changes: 2 additions & 1 deletion source/include/FreeRTOS_IPv4_Sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
struct freertos_sockaddr * pxSourceAddress );

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* FREERTOS_IPV4_SOCKETS_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv4_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ BaseType_t prvChecksumIPv4Checks( uint8_t * pucEthernetBuffer,
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_UTILS_H */
#endif /* FREERTOS_IPV4_UTILS_H */
4 changes: 2 additions & 2 deletions source/include/FreeRTOS_IPv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ BaseType_t xGetExtensionOrder( uint8_t ucProtocol,

/* *INDENT-OFF* */
#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_H */
#endif /* FREERTOS_IPV6_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv6_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,4 @@ eFrameProcessingResult_t prvProcessICMPMessage_IPv6( NetworkBufferDescriptor_t *
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_PRIVATE_H */
#endif /* FREERTOS_IPV6_PRIVATE_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv6_Sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
struct freertos_sockaddr * pxSourceAddress );

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* FREERTOS_IPV6_SOCKETS_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_IPv6_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ size_t usGetExtensionHeaderLength( const uint8_t * pucEthernetBuffer,
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_IP_UTILS_H */
#endif /* FREERTOS_IPV6_UTILS_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_ND.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@

/* *INDENT-OFF* */
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/* *INDENT-ON* */

Expand Down
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_Routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
#endif

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* FREERTOS_ROUTING_H */
2 changes: 1 addition & 1 deletion source/include/FreeRTOS_Sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
#endif

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* FREERTOS_SOCKETS_H */
12 changes: 12 additions & 0 deletions source/include/FreeRTOS_errno_TCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#ifndef FREERTOS_ERRNO_TCP
#define FREERTOS_ERRNO_TCP

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* The following definitions will be included in the core FreeRTOS code in
* future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time
* this file will be removed. */
Expand Down Expand Up @@ -95,4 +101,10 @@ const char * FreeRTOS_strerror_r( BaseType_t xErrnum,
char * pcBuffer,
size_t uxLength );

/* *INDENT-OFF* */
#ifdef __cplusplus
} /* extern "C" */
#endif
/* *INDENT-ON* */

#endif /* FREERTOS_ERRNO_TCP */
12 changes: 6 additions & 6 deletions source/portable/NetworkInterface/ATSAM4E/ethernet_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
#include "instance/gmac.h"

/*/ @cond 0 */
/**INDENT-OFF**/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
/**INDENT-ON**/
/* *INDENT-ON* */
/*/ @endcond */

/**
Expand Down Expand Up @@ -506,11 +506,11 @@ uint8_t ethernet_phy_reset( Gmac * p_gmac,
}

/*/ @cond 0 */
/**INDENT-OFF**/
/* *INDENT-OFF* */
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/* *INDENT-ON* */
/*/ @endcond */

/**
Expand Down
2 changes: 1 addition & 1 deletion source/portable/NetworkInterface/ATSAM4E/ethernet_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
extern PhyProps_t phy_props;

#ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
#endif

#endif /* #ifndef ETHERNET_PHY_H_INCLUDED */
6 changes: 1 addition & 5 deletions source/portable/NetworkInterface/ATSAM4E/gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@
#include "ethernet_phy.h"

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
extern "C" {
#endif
/**INDENT-ON**/
/*/ @endcond */

#ifndef ARRAY_SIZE
Expand Down Expand Up @@ -1028,9 +1026,7 @@ void gmac_handler( gmac_device_t * p_gmac_dev )
/*@} */

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/*/ @endcond */
6 changes: 1 addition & 5 deletions source/portable/NetworkInterface/ATSAM4E/gmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@
#include "compiler.h"

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
extern "C" {
#endif
/**INDENT-ON**/
/*/ @endcond */

/** The buffer addresses written into the descriptors must be aligned, so the
Expand Down Expand Up @@ -1228,11 +1226,9 @@
void gmac_handler( gmac_device_t * p_gmac_dev );

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/*/ @endcond */

/**
Expand Down
6 changes: 1 addition & 5 deletions source/portable/NetworkInterface/ATSAM4E/instance/gmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@
#include "component/gmac.h"

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
extern "C" {
#endif
/**INDENT-ON**/
/*/ @endcond */

/** The buffer addresses written into the descriptors must be aligned, so the
Expand Down Expand Up @@ -1232,11 +1230,9 @@
void gmac_handler( gmac_device_t * p_gmac_dev );

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/*/ @endcond */

/**
Expand Down
12 changes: 6 additions & 6 deletions source/portable/NetworkInterface/DriverSAM/gmac_SAM.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
#endif

/*/ @cond 0 */
/**INDENT-OFF**/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
/**INDENT-ON**/
/* *INDENT-ON* */
/*/ @endcond */

#ifndef ARRAY_SIZE
Expand Down Expand Up @@ -1015,9 +1015,9 @@ void gmac_handler( gmac_device_t * p_gmac_dev )
/*@} */

/*/ @cond 0 */
/**INDENT-OFF**/
/* *INDENT-OFF* */
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/* *INDENT-ON* */
/*/ @endcond */
6 changes: 1 addition & 5 deletions source/portable/NetworkInterface/DriverSAM/gmac_SAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@
#include "compiler.h"

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
extern "C" {
#endif
/**INDENT-ON**/
/*/ @endcond */

/** The buffer addresses written into the descriptors must be aligned, so the
Expand Down Expand Up @@ -1545,11 +1543,9 @@
size_t uxLength );

/*/ @cond 0 */
/**INDENT-OFF**/
#ifdef __cplusplus
}
} /* extern "C" */
#endif
/**INDENT-ON**/
/*/ @endcond */

#ifndef GMAC_STATS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
smsc9220_eth_dev_t * dev );

#ifdef __cplusplus
}
} /* extern "C" */
#endif

#endif /* __SMSC9220_ETH_H__ */
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
#define DRIVER_ETH_MAC_H_

#ifdef __cplusplus
extern "C"
{
extern "C" {
#endif

#include "Driver_ETH.h"
Expand Down Expand Up @@ -310,7 +309,7 @@ typedef struct _ARM_DRIVER_ETH_MAC {
} const ARM_DRIVER_ETH_MAC;

#ifdef __cplusplus
}
} /* extern "C" */
#endif

#endif /* DRIVER_ETH_MAC_H_ */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ typedef struct _ARM_DRIVER_ETH_PHY {
} const ARM_DRIVER_ETH_PHY;

#ifdef __cplusplus
}
} /* extern "C" */
#endif

#endif /* DRIVER_ETH_PHY_H_ */
Expand Down
Loading

0 comments on commit 1474378

Please sign in to comment.