bsp/aarch64/raspberrypi: Add C++ header guards

Adds header guards to the installed headers in raspberrypi/include/bsp
This commit is contained in:
Shaunak Datar
2025-08-12 18:29:08 +05:30
committed by Kinsey Moore
parent fee83ad4fb
commit c8e5f206b4
8 changed files with 66 additions and 1 deletions

View File

@@ -40,6 +40,10 @@
#include <bspopts.h> #include <bspopts.h>
#include <bsp/raspberrypi-uart.h> #include <bsp/raspberrypi-uart.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define CONSOLE_DEVICES RASPBERRYPI_CONSOLE_DEVICES #define CONSOLE_DEVICES RASPBERRYPI_CONSOLE_DEVICES
#define CONSOLE_DEVICE_PORT2ENUM(port_no) UART##port_no #define CONSOLE_DEVICE_PORT2ENUM(port_no) UART##port_no
@@ -68,4 +72,8 @@ rtems_status_code raspberrypi_uart_init(
#undef CONSOLE_DEVICE_ENUM #undef CONSOLE_DEVICE_ENUM
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H */

View File

@@ -43,8 +43,12 @@
#include <rtems.h> #include <rtems.h>
#include <dev/irq/arm-gic-irq.h> #include <dev/irq/arm-gic-irq.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @defgroup raspberrypi_interrupt Interrrupt Support * @defgroup raspberrypi_interrupt Interrupt Support
* *
* @ingroup RTEMSBSPsARMRaspberryPi * @ingroup RTEMSBSPsARMRaspberryPi
* *
@@ -106,5 +110,9 @@
#define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ) #define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ASM */ #endif /* ASM */
#endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */ #endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */

View File

@@ -41,6 +41,10 @@
#include <bsp/utility.h> #include <bsp/utility.h>
#include <dev/i2c/i2c.h> #include <dev/i2c/i2c.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief I2C controller instances on Raspberry Pi 4. * @brief I2C controller instances on Raspberry Pi 4.
*/ */
@@ -89,4 +93,8 @@ rtems_status_code rpi_i2c_init(
uint32_t bus_clock uint32_t bus_clock
); );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_I2C_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_I2C_H */

View File

@@ -40,6 +40,10 @@
#include "bsp/rpi-gpio.h" #include "bsp/rpi-gpio.h"
#include "bsp/utility.h" #include "bsp/utility.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { raspberrypi_pwm0, raspberrypi_pwm1 } raspberrypi_pwm_channel; typedef enum { raspberrypi_pwm0, raspberrypi_pwm1 } raspberrypi_pwm_channel;
typedef enum { typedef enum {
@@ -107,4 +111,8 @@ rtems_status_code rpi_pwm_init(
uint32_t data uint32_t data
); );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H */

View File

@@ -39,6 +39,10 @@
#include <bsp/utility.h> #include <bsp/utility.h>
#include <bsp/rpi-gpio.h> #include <bsp/rpi-gpio.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct typedef struct
{ {
uint32_t spics; uint32_t spics;
@@ -119,4 +123,8 @@ typedef enum {
*/ */
rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device); rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H */

View File

@@ -42,6 +42,10 @@
#include <bsp/rpi-gpio.h> #include <bsp/rpi-gpio.h>
#include <dev/serial/arm-pl011.h> #include <dev/serial/arm-pl011.h>
#ifdef __cplusplus
extern "C" {
#endif
/* /*
* This macro exists to serve as a common point of definition for the * This macro exists to serve as a common point of definition for the
* parameters of the UARTs present in the Raspberry Pi 4. It is used in * parameters of the UARTs present in the Raspberry Pi 4. It is used in
@@ -69,4 +73,9 @@
5, "/dev/ttyAMA4", BCM2711_UART5_BASE, BCM2711_UART5_SIZE, \ 5, "/dev/ttyAMA4", BCM2711_UART5_BASE, BCM2711_UART5_SIZE, \
BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \ BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \
&arm_pl011_fns, arm_pl011_write_polled, 13, 12, GPIO_AF4) &arm_pl011_fns, arm_pl011_write_polled, 13, 12, GPIO_AF4)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H */

View File

@@ -42,6 +42,10 @@
#include <bspopts.h> #include <bspopts.h>
#include <stdint.h> #include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @defgroup raspberrypi_reg Register Definitions * @defgroup raspberrypi_reg Register Definitions
* *
@@ -581,4 +585,8 @@
/** @} */ /** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */ #endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */

View File

@@ -39,6 +39,10 @@
#include <bspopts.h> #include <bspopts.h>
#include <rtems/rtems/status.h> #include <rtems/rtems/status.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Raspberry Pi GPIO functions. * @brief Raspberry Pi GPIO functions.
*/ */
@@ -115,4 +119,8 @@ rtems_status_code raspberrypi_gpio_set_pull(
const raspberrypi_gpio_pull value const raspberrypi_gpio_pull value
); );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H */ #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H */