diff --git a/bsps/aarch64/raspberrypi/include/bsp/console.h b/bsps/aarch64/raspberrypi/include/bsp/console.h index 92cfdeddca..19778b95b0 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/console.h +++ b/bsps/aarch64/raspberrypi/include/bsp/console.h @@ -40,6 +40,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define CONSOLE_DEVICES RASPBERRYPI_CONSOLE_DEVICES #define CONSOLE_DEVICE_PORT2ENUM(port_no) UART##port_no @@ -68,4 +72,8 @@ rtems_status_code raspberrypi_uart_init( #undef CONSOLE_DEVICE_ENUM +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_CONSOLE_H */ \ No newline at end of file diff --git a/bsps/aarch64/raspberrypi/include/bsp/irq.h b/bsps/aarch64/raspberrypi/include/bsp/irq.h index ef52e2425c..ad22d7f42f 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/irq.h +++ b/bsps/aarch64/raspberrypi/include/bsp/irq.h @@ -43,8 +43,12 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** - * @defgroup raspberrypi_interrupt Interrrupt Support + * @defgroup raspberrypi_interrupt Interrupt Support * * @ingroup RTEMSBSPsARMRaspberryPi * @@ -106,5 +110,9 @@ #define BSP_IRQ_COUNT (BCM2835_INTC_TOTAL_IRQ) +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* ASM */ #endif /* LIBBSP_ARM_RASPBERRYPI_IRQ_H */ diff --git a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-i2c.h b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-i2c.h index a763c299ac..47bf0edaa9 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-i2c.h +++ b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-i2c.h @@ -41,6 +41,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief I2C controller instances on Raspberry Pi 4. */ @@ -89,4 +93,8 @@ rtems_status_code rpi_i2c_init( uint32_t bus_clock ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_I2C_H */ \ No newline at end of file diff --git a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-pwm.h b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-pwm.h index fa804a8538..1cf71446b7 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-pwm.h +++ b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-pwm.h @@ -40,6 +40,10 @@ #include "bsp/rpi-gpio.h" #include "bsp/utility.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { raspberrypi_pwm0, raspberrypi_pwm1 } raspberrypi_pwm_channel; typedef enum { @@ -107,4 +111,8 @@ rtems_status_code rpi_pwm_init( uint32_t data ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_4_PWM_H */ \ No newline at end of file diff --git a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-spi.h b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-spi.h index 1ce301f898..ace225ddeb 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-spi.h +++ b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-spi.h @@ -39,6 +39,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { uint32_t spics; @@ -119,4 +123,8 @@ typedef enum { */ rtems_status_code raspberrypi_spi_init(raspberrypi_spi_device device); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_4_SPI_H */ \ No newline at end of file diff --git a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-uart.h b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-uart.h index 09452b72a3..a04626e60f 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-uart.h +++ b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi-uart.h @@ -42,6 +42,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* * 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 @@ -69,4 +73,9 @@ 5, "/dev/ttyAMA4", BCM2711_UART5_BASE, BCM2711_UART5_SIZE, \ BSP_PL011_CLOCK_FREQ, BCM2711_IRQ_PL011_UART, arm_pl011_context, \ &arm_pl011_fns, arm_pl011_write_polled, 13, 12, GPIO_AF4) + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RASPBERRYPI_UART_H */ diff --git a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi.h b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi.h index fcab38df53..ee30a3cf6c 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/raspberrypi.h +++ b/bsps/aarch64/raspberrypi/include/bsp/raspberrypi.h @@ -42,6 +42,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * @defgroup raspberrypi_reg Register Definitions * @@ -581,4 +585,8 @@ /** @} */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */ \ No newline at end of file diff --git a/bsps/aarch64/raspberrypi/include/bsp/rpi-gpio.h b/bsps/aarch64/raspberrypi/include/bsp/rpi-gpio.h index af49133a84..1818fe8b87 100644 --- a/bsps/aarch64/raspberrypi/include/bsp/rpi-gpio.h +++ b/bsps/aarch64/raspberrypi/include/bsp/rpi-gpio.h @@ -39,6 +39,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Raspberry Pi GPIO functions. */ @@ -115,4 +119,8 @@ rtems_status_code raspberrypi_gpio_set_pull( const raspberrypi_gpio_pull value ); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* LIBBSP_AARCH64_RASPBERRYPI_BSP_RPI_GPIO_H */