diff --git a/applications/blink_raw/targets/freertos.armv7m.ti-launchpad-tm4c129/HwInit.cxx b/applications/blink_raw/targets/freertos.armv7m.ti-launchpad-tm4c129/HwInit.cxx index 5b3c1f19e..3853601fe 100644 --- a/applications/blink_raw/targets/freertos.armv7m.ti-launchpad-tm4c129/HwInit.cxx +++ b/applications/blink_raw/targets/freertos.armv7m.ti-launchpad-tm4c129/HwInit.cxx @@ -46,11 +46,11 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" #include "hardware.hxx" -#include "FreeRTOSTCP.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCP.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/applications/bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx b/applications/bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx index e7b20788b..3ac5eedc4 100644 --- a/applications/bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx +++ b/applications/bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" extern "C" { diff --git a/applications/bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx b/applications/bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx index 58c534b16..ec43b2469 100644 --- a/applications/bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx +++ b/applications/bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" extern "C" { diff --git a/applications/bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx b/applications/bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx index ec9759e49..9c9164f4f 100644 --- a/applications/bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx +++ b/applications/bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #define PINDEFS_ONLY #include "hardware.hxx" diff --git a/applications/bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx b/applications/bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx index bc5726f1e..53699c3e0 100644 --- a/applications/bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx +++ b/applications/bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #include "openlcb/If.hxx" //OVERRIDE_CONST(nmranet_can_bitrate, 1000000); diff --git a/applications/can_eth/targets/freertos.armv7m.ek-tm4c1294xl/HwInit.cxx b/applications/can_eth/targets/freertos.armv7m.ek-tm4c1294xl/HwInit.cxx index 03e8b34b5..94f0bea15 100644 --- a/applications/can_eth/targets/freertos.armv7m.ek-tm4c1294xl/HwInit.cxx +++ b/applications/can_eth/targets/freertos.armv7m.ek-tm4c1294xl/HwInit.cxx @@ -46,11 +46,11 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" #include "hardware.hxx" -#include "FreeRTOSTCP.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCP.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/HwInit.cxx b/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/HwInit.cxx index bba8ac252..1370b5d6f 100644 --- a/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/HwInit.cxx +++ b/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/HwInit.cxx @@ -35,7 +35,7 @@ #include #include -#include "stm32f0xx_hal_conf.h" +#include "freertos_drivers/st/stm32f0xx_hal_conf.h" #include "stm32f0xx_hal_rcc.h" #include "stm32f0xx_hal_flash.h" #include "stm32f0xx_hal_gpio.h" @@ -45,12 +45,12 @@ #include "stm32f0xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" -#include "Stm32RailcomSender.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32RailcomSender.hxx" #include "hardware.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" struct Debug { @@ -60,7 +60,7 @@ struct Debug typedef DummyPin CapTimerOverflow; }; -#include "Stm32DCCDecoder.hxx" +#include "freertos_drivers/st/Stm32DCCDecoder.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/hardware.hxx b/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/hardware.hxx index 646e67af0..13705f226 100644 --- a/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/hardware.hxx +++ b/applications/dcc_decoder/targets/freertos.armv6m.st-stm32f091rc-nucleo/hardware.hxx @@ -1,6 +1,6 @@ -#include "BlinkerGPIO.hxx" -#include "Stm32Gpio.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, A, 5); diff --git a/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx b/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx index 47389cb34..da1f2bf8e 100644 --- a/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx +++ b/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx @@ -49,13 +49,13 @@ #include "hardware.hxx" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" -#include "TivaEEPROMEmulation.hxx" -#include "TivaEEPROMBitSet.hxx" -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" -#include "bootloader_hal.h" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaEEPROMBitSet.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "openlcb/bootloader_hal.h" struct Debug { @@ -65,7 +65,7 @@ struct Debug typedef DummyPin CapTimerOverflow; }; -#include "TivaDCCDecoder.hxx" +#include "freertos_drivers/ti/TivaDCCDecoder.hxx" /** override stdin */ diff --git a/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/hardware.hxx b/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/hardware.hxx index 09e785f52..2c9c01a80 100644 --- a/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/hardware.hxx +++ b/applications/dcc_decoder/targets/freertos.armv7m.ek-tm4c123gxl/hardware.hxx @@ -1,9 +1,9 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/applications/dmx_controller/targets/custom-cc3220sf/HwInit.cxx b/applications/dmx_controller/targets/custom-cc3220sf/HwInit.cxx index 82f76b1ef..70d6653e6 100644 --- a/applications/dmx_controller/targets/custom-cc3220sf/HwInit.cxx +++ b/applications/dmx_controller/targets/custom-cc3220sf/HwInit.cxx @@ -47,14 +47,14 @@ #include "driverlib/pin.h" #include "driverlib/utils.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxSPI.hxx" -#include "CC32xxWiFi.hxx" -#include "MCP2515Can.hxx" -#include "CC32xxEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/common/MCP2515Can.hxx" +#include "freertos_drivers/ti/CC32xxEEPROMEmulation.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "CC3200_compat/simplelink.h" //#include "netapp.h" diff --git a/applications/dmx_controller/targets/custom-cc3220sf/hardware.hxx b/applications/dmx_controller/targets/custom-cc3220sf/hardware.hxx index 1dec339d5..9f08c3c57 100644 --- a/applications/dmx_controller/targets/custom-cc3220sf/hardware.hxx +++ b/applications/dmx_controller/targets/custom-cc3220sf/hardware.hxx @@ -1,8 +1,8 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" #include "driverlib/adc.h" diff --git a/applications/dmx_controller/targets/custom-cc3220sf/main.cxx b/applications/dmx_controller/targets/custom-cc3220sf/main.cxx index 6d82d6d91..09c8b061a 100644 --- a/applications/dmx_controller/targets/custom-cc3220sf/main.cxx +++ b/applications/dmx_controller/targets/custom-cc3220sf/main.cxx @@ -48,7 +48,7 @@ #include "config.hxx" #include "hardware.hxx" -#include "CC32xxWiFi.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" #include "utils/stdio_logging.h" #include "freertos/tc_ioctl.h" diff --git a/applications/io_board/targets/freertos.armv7m.lpc1768-mbed/main.cxx b/applications/io_board/targets/freertos.armv7m.lpc1768-mbed/main.cxx index 2645b3860..e0fa7eda0 100644 --- a/applications/io_board/targets/freertos.armv7m.lpc1768-mbed/main.cxx +++ b/applications/io_board/targets/freertos.armv7m.lpc1768-mbed/main.cxx @@ -39,10 +39,10 @@ #include "openlcb/ConfiguredConsumer.hxx" #include "openlcb/ConfiguredProducer.hxx" -#include "BlinkerGPIO.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "freertos_drivers/common/RamDisk.hxx" -#include "Lpc17xx40xxGPIO.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx" #include "config.hxx" // These preprocessor symbols are used to select which physical connections diff --git a/applications/io_board/targets/freertos.armv7m.lpc1769-lpcxpresso/main.cxx b/applications/io_board/targets/freertos.armv7m.lpc1769-lpcxpresso/main.cxx index ad499f769..5f18bc0f8 100644 --- a/applications/io_board/targets/freertos.armv7m.lpc1769-lpcxpresso/main.cxx +++ b/applications/io_board/targets/freertos.armv7m.lpc1769-lpcxpresso/main.cxx @@ -39,10 +39,10 @@ #include "openlcb/ConfiguredConsumer.hxx" #include "openlcb/ConfiguredProducer.hxx" -#include "BlinkerGPIO.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "freertos_drivers/common/RamDisk.hxx" -#include "Lpc17xx40xxGPIO.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx" #include "config.hxx" // These preprocessor symbols are used to select which physical connections diff --git a/applications/io_board/targets/freertos.armv7m.ti-launchpad-cc3220sf/main.cxx b/applications/io_board/targets/freertos.armv7m.ti-launchpad-cc3220sf/main.cxx index 5c45d05a3..10d797a86 100644 --- a/applications/io_board/targets/freertos.armv7m.ti-launchpad-cc3220sf/main.cxx +++ b/applications/io_board/targets/freertos.armv7m.ti-launchpad-cc3220sf/main.cxx @@ -46,7 +46,7 @@ #include "config.hxx" #include "hardware.hxx" -#include "CC32xxWiFi.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" #include "utils/stdio_logging.h" // These preprocessor symbols are used to select which physical connections diff --git a/applications/modbus_controller/targets/custom-cc3220sf/HwInit.cxx b/applications/modbus_controller/targets/custom-cc3220sf/HwInit.cxx index 73f42c599..a14e62832 100644 --- a/applications/modbus_controller/targets/custom-cc3220sf/HwInit.cxx +++ b/applications/modbus_controller/targets/custom-cc3220sf/HwInit.cxx @@ -47,14 +47,14 @@ #include "driverlib/pin.h" #include "driverlib/utils.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxSPI.hxx" -#include "CC32xxWiFi.hxx" -#include "MCP2515Can.hxx" -#include "CC32xxEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/common/MCP2515Can.hxx" +#include "freertos_drivers/ti/CC32xxEEPROMEmulation.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "CC3200_compat/simplelink.h" //#include "netapp.h" diff --git a/applications/modbus_controller/targets/custom-cc3220sf/hardware.hxx b/applications/modbus_controller/targets/custom-cc3220sf/hardware.hxx index 1dec339d5..9f08c3c57 100644 --- a/applications/modbus_controller/targets/custom-cc3220sf/hardware.hxx +++ b/applications/modbus_controller/targets/custom-cc3220sf/hardware.hxx @@ -1,8 +1,8 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" #include "driverlib/adc.h" diff --git a/applications/modbus_controller/targets/custom-cc3220sf/main.cxx b/applications/modbus_controller/targets/custom-cc3220sf/main.cxx index e119f4ea4..ae3474e28 100644 --- a/applications/modbus_controller/targets/custom-cc3220sf/main.cxx +++ b/applications/modbus_controller/targets/custom-cc3220sf/main.cxx @@ -52,7 +52,7 @@ #include "config.hxx" #include "hardware.hxx" -#include "CC32xxWiFi.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" #include "freertos_drivers/common/WifiDefs.hxx" #include "console/FileCommands.hxx" diff --git a/applications/nucleo_io/targets/freertos.armv6m.st-stm32f091rc-nucleo-dev-board/main.cxx b/applications/nucleo_io/targets/freertos.armv6m.st-stm32f091rc-nucleo-dev-board/main.cxx index 212aa8140..341ad810f 100644 --- a/applications/nucleo_io/targets/freertos.armv6m.st-stm32f091rc-nucleo-dev-board/main.cxx +++ b/applications/nucleo_io/targets/freertos.armv6m.st-stm32f091rc-nucleo-dev-board/main.cxx @@ -52,7 +52,7 @@ #include "os/MmapGpio.hxx" #include "config.hxx" #include "hardware.hxx" -#include "PWM.hxx" +#include "freertos_drivers/common/PWM.hxx" #include "i2c.h" #include "i2c-dev.h" diff --git a/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx b/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx index e7b20788b..3ac5eedc4 100644 --- a/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx +++ b/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc2/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" extern "C" { diff --git a/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx b/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx index 58c534b16..ec43b2469 100644 --- a/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx +++ b/applications/reflash_bootloader/targets/bare.armv7m.bracz-acc3/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" extern "C" { diff --git a/applications/reflash_bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx b/applications/reflash_bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx index ec9759e49..9c9164f4f 100644 --- a/applications/reflash_bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx +++ b/applications/reflash_bootloader/targets/bare.armv7m.bracz-railcom/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #define PINDEFS_ONLY #include "hardware.hxx" diff --git a/applications/reflash_bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx b/applications/reflash_bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx index d2e59ded1..73777c3fe 100644 --- a/applications/reflash_bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx +++ b/applications/reflash_bootloader/targets/bare.armv7m.ek-tm4c123gxl/BootloaderHal.cxx @@ -3,7 +3,7 @@ #define TARGET_IS_TM4C123_RB1 #include "../boards/ti-tm4c123-generic/BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -14,7 +14,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" //OVERRIDE_CONST(nmranet_can_bitrate, 1000000); diff --git a/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/HwInit.cxx b/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/HwInit.cxx index 400525f4e..9f0458141 100644 --- a/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/HwInit.cxx +++ b/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/HwInit.cxx @@ -43,10 +43,10 @@ #include "stm32f0xx_hal_tim.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32UsbCdc.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32UsbCdc.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/hardware.hxx b/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/hardware.hxx index b99fd9333..651030864 100644 --- a/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/hardware.hxx +++ b/applications/usb_can/targets/freertos.armv6m.stm32f072cb-gol/hardware.hxx @@ -1,5 +1,5 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, F, 0); diff --git a/boards/bracz-railcom/HwInit.cxx b/boards/bracz-railcom/HwInit.cxx index d955d7451..80b12ef7b 100644 --- a/boards/bracz-railcom/HwInit.cxx +++ b/boards/bracz-railcom/HwInit.cxx @@ -49,16 +49,16 @@ #include "driverlib/pin_map.h" #include "os/OS.hxx" #include "utils/Charlieplex.hxx" -#include "TivaDev.hxx" -#include "TivaEEPROMEmulation.hxx" -#include "TivaEEPROMBitSet.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaEEPROMBitSet.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "hardware.hxx" -#include "TivaDCCDecoder.hxx" -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaDCCDecoder.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" #include "custom/TivaGNDControl.hxx" #include "custom/TivaDAC.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" //#include "TivaDCC.hxx" @@ -77,7 +77,7 @@ // application. typedef DummyPin RailcomPackets; };*/ -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" // This symbol releases the charlieplex pins to do other stuff. //#define FAKE_CHARLIE diff --git a/boards/bracz-railcom/hardware.hxx b/boards/bracz-railcom/hardware.hxx index 1376eba4f..b1c0ffe7e 100644 --- a/boards/bracz-railcom/hardware.hxx +++ b/boards/bracz-railcom/hardware.hxx @@ -1,7 +1,7 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #include "driverlib/rom_map.h" #include "driverlib/timer.h" #include "utils/GpioInitializer.hxx" @@ -11,8 +11,8 @@ #include "inc/hw_timer.h" // note : this might cause problems in the bootloader compilation -#include "DummyGPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "utils/Debouncer.hxx" #define HARDWARE_REVA @@ -106,7 +106,7 @@ typedef GpioInitializer< // #ifndef PINDEFS_ONLY -#include "DummyGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" struct Debug { diff --git a/boards/esp-esp8266-32mbit-generic/user_init.cxx b/boards/esp-esp8266-32mbit-generic/user_init.cxx index 46f945542..4e2e707eb 100644 --- a/boards/esp-esp8266-32mbit-generic/user_init.cxx +++ b/boards/esp-esp8266-32mbit-generic/user_init.cxx @@ -5,7 +5,7 @@ extern "C" { #include #include #include -#include "ets_rom.h" +#include "esp8266/ets_rom.h" } #include diff --git a/boards/nxp-lpc11C24-lpcxpresso/hw_init.c b/boards/nxp-lpc11C24-lpcxpresso/hw_init.c index e3fa339c0..3a18acb22 100644 --- a/boards/nxp-lpc11C24-lpcxpresso/hw_init.c +++ b/boards/nxp-lpc11C24-lpcxpresso/hw_init.c @@ -1,514 +1,514 @@ -//***************************************************************************** -// +--+ -// | ++----+ -// +-++ | -// | | -// +-+--+ | -// | +--+--+ -// +----+ Copyright (c) 2009-12 Code Red Technologies Ltd. -// -// Microcontroller Startup code for use with Red Suite -// -// Version : 120126 -// -// Software License Agreement -// -// The software is owned by Code Red Technologies and/or its suppliers, and is -// protected under applicable copyright laws. All rights are reserved. Any -// use in violation of the foregoing restrictions may subject the user to -// criminal -// sanctions under applicable laws, as well as to civil liability for the breach -// of the terms and conditions of this license. -// -// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED -// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. -// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT -// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH -// CODE RED TECHNOLOGIES LTD. -// -//***************************************************************************** - -#include -#include - -#include "LPC11xx.h" -#include "core_cm0.h" -#include "FreeRTOSConfig.h" - -#if defined(__cplusplus) -#ifdef __REDLIB__ -#error Redlib does not support C++ -#else -//***************************************************************************** -// -// The entry point for the C++ library startup -// -//***************************************************************************** -#endif -#endif - -const unsigned long cpu_clock_hz = 48000000; - -// extern "C" { -extern void __libc_init_array(void); -//} -void raw_hw_init(void); - -#define WEAK __attribute__((weak)) -#define ALIAS(f) __attribute__((weak, alias(#f))) - -// Code Red - if CMSIS is being used, then SystemInit() routine -// will be called by startup code rather than in application's main() -#if defined(__USE_CMSIS) -#include "system_LPC11xx.h" -#endif - -//***************************************************************************** -#if defined(__cplusplus) -extern "C" { -#endif - -//***************************************************************************** -// -// Forward declaration of the default handlers. These are aliased. -// When the application defines a handler (with the same name), this will -// automatically take precedence over these weak definitions -// -//***************************************************************************** -void ResetISR(void); -WEAK void NMI_Handler(void); -WEAK void HardFault_Handler(void); -WEAK void SVC_Handler(void); -WEAK void PendSV_Handler(void); -WEAK void SysTick_Handler(void); -WEAK void IntDefaultHandler(void); -//***************************************************************************** -// -// Forward declaration of the specific IRQ handlers. These are aliased -// to the IntDefaultHandler, which is a 'forever' loop. When the application -// defines a handler (with the same name), this will automatically take -// precedence over these weak definitions -// -//***************************************************************************** - -void CAN_IRQHandler(void) ALIAS(IntDefaultHandler); -void SSP1_IRQHandler(void) ALIAS(IntDefaultHandler); -void I2C_IRQHandler(void) ALIAS(IntDefaultHandler); -void TIMER16_0_IRQHandler(void); -void TIMER16_1_IRQHandler(void) ALIAS(IntDefaultHandler); -void TIMER32_0_IRQHandler(void) ALIAS(IntDefaultHandler); -void TIMER32_1_IRQHandler(void) ALIAS(IntDefaultHandler); -void SSP0_IRQHandler(void) ALIAS(IntDefaultHandler); -void UART_IRQHandler(void) ALIAS(IntDefaultHandler); -void ADC_IRQHandler(void) ALIAS(IntDefaultHandler); -void WDT_IRQHandler(void) ALIAS(IntDefaultHandler); -void BOD_IRQHandler(void) ALIAS(IntDefaultHandler); -void PIOINT3_IRQHandler(void) ALIAS(IntDefaultHandler); -void PIOINT2_IRQHandler(void) ALIAS(IntDefaultHandler); -void PIOINT1_IRQHandler(void) ALIAS(IntDefaultHandler); -void PIOINT0_IRQHandler(void) ALIAS(IntDefaultHandler); -void WAKEUP_IRQHandler(void) ALIAS(IntDefaultHandler); - -//***************************************************************************** -// -// The entry point for the application. -// __main() is the entry point for redlib based applications -// main() is the entry point for newlib based applications -// -//***************************************************************************** -// -// The entry point for the application. -// __main() is the entry point for Redlib based applications -// main() is the entry point for Newlib based applications -// -//***************************************************************************** -#if defined(__REDLIB__) -extern void __main(void); -#endif -extern int main(void); -//***************************************************************************** -// -// External declaration for the pointer to the stack top from the Linker Script -// -//***************************************************************************** -extern void _vStackTop(void); - -//***************************************************************************** -#if defined(__cplusplus) -} // extern "C" -#endif -//***************************************************************************** -// -// The vector table. Note that the proper constructs must be placed on this to -// ensure that it ends up at physical address 0x0000.0000. -// -//***************************************************************************** -extern void (*const g_pfnVectors[])(void); -__attribute__((section(".isr_vector"))) void (*const g_pfnVectors[])(void) = { - &_vStackTop, // The initial stack pointer - ResetISR, // The reset handler - NMI_Handler, // The NMI handler - HardFault_Handler, // The hard fault handler - 0, // Reserved - 0, // Reserved - 0, // Reserved - 0, // Reserved - 0, // Reserved - 0, // Reserved - 0, // Reserved - SVC_Handler, // SVCall handler - 0, // Reserved - 0, // Reserved - PendSV_Handler, // The PendSV handler - SysTick_Handler, // The SysTick handler - - // Wakeup sources for the I/O pins: - // PIO0 (0:11) - // PIO1 (0) - WAKEUP_IRQHandler, // PIO0_0 Wakeup - WAKEUP_IRQHandler, // PIO0_1 Wakeup - WAKEUP_IRQHandler, // PIO0_2 Wakeup - WAKEUP_IRQHandler, // PIO0_3 Wakeup - WAKEUP_IRQHandler, // PIO0_4 Wakeup - WAKEUP_IRQHandler, // PIO0_5 Wakeup - WAKEUP_IRQHandler, // PIO0_6 Wakeup - WAKEUP_IRQHandler, // PIO0_7 Wakeup - WAKEUP_IRQHandler, // PIO0_8 Wakeup - WAKEUP_IRQHandler, // PIO0_9 Wakeup - WAKEUP_IRQHandler, // PIO0_10 Wakeup - WAKEUP_IRQHandler, // PIO0_11 Wakeup - WAKEUP_IRQHandler, // PIO1_0 Wakeup - CAN_IRQHandler, // C_CAN Interrupt - SSP1_IRQHandler, // SPI/SSP1 Interrupt - I2C_IRQHandler, // I2C0 - TIMER16_0_IRQHandler, // CT16B0 (16-bit Timer 0) - TIMER16_1_IRQHandler, // CT16B1 (16-bit Timer 1) - TIMER32_0_IRQHandler, // CT32B0 (32-bit Timer 0) - TIMER32_1_IRQHandler, // CT32B1 (32-bit Timer 1) - SSP0_IRQHandler, // SPI/SSP0 Interrupt - UART_IRQHandler, // UART0 - 0, // Reserved - 0, // Reserved - ADC_IRQHandler, // ADC (A/D Converter) - WDT_IRQHandler, // WDT (Watchdog Timer) - BOD_IRQHandler, // BOD (Brownout Detect) - 0, // Reserved - PIOINT3_IRQHandler, // PIO INT3 - PIOINT2_IRQHandler, // PIO INT2 - PIOINT1_IRQHandler, // PIO INT1 - PIOINT0_IRQHandler, // PIO INT0 -}; - -//***************************************************************************** -// Functions to carry out the initialization of RW and BSS data sections. These -// are written as separate functions rather than being inlined within the -// ResetISR() function in order to cope with MCUs with multiple banks of -// memory. -//***************************************************************************** -__attribute__((section(".after_vectors"))) void -data_init(unsigned int romstart, unsigned int start, unsigned int len) -{ - unsigned int* pulDest = (unsigned int*)start; - unsigned int* pulSrc = (unsigned int*)romstart; - unsigned int loop; - for (loop = 0; loop < len; loop = loop + 4) - *pulDest++ = *pulSrc++; -} - -__attribute__((section(".after_vectors"))) void bss_init(unsigned int start, - unsigned int len) -{ - unsigned int* pulDest = (unsigned int*)start; - unsigned int loop; - for (loop = 0; loop < len; loop = loop + 4) - *pulDest++ = 0; -} - -#ifndef USE_OLD_STYLE_DATA_BSS_INIT -//***************************************************************************** -// The following symbols are constructs generated by the linker, indicating -// the location of various points in the "Global Section Table". This table is -// created by the linker via the Code Red managed linker script mechanism. It -// contains the load address, execution address and length of each RW data -// section and the execution and length of each BSS (zero initialized) section. -//***************************************************************************** -extern unsigned int __data_section_table; -extern unsigned int __data_section_table_end; -extern unsigned int __bss_section_table; -extern unsigned int __bss_section_table_end; -#else -//***************************************************************************** -// The following symbols are constructs generated by the linker, indicating -// the load address, execution address and length of the RW data section and -// the execution and length of the BSS (zero initialized) section. -// Note that these symbols are not normally used by the managed linker script -// mechanism in Red Suite/LPCXpresso 3.6 (Windows) and LPCXpresso 3.8 (Linux). -// They are provide here simply so this startup code can be used with earlier -// versions of Red Suite which do not support the more advanced managed linker -// script mechanism introduced in the above version. To enable their use, -// define "USE_OLD_STYLE_DATA_BSS_INIT". -//***************************************************************************** -extern unsigned int _etext; -extern unsigned int _data; -extern unsigned int _edata; -extern unsigned int _bss; -extern unsigned int _ebss; -#endif - -extern uint32_t __start_ram; -extern uint32_t __end_ram; - -//***************************************************************************** -// Reset entry point for your code. -// Sets up a simple runtime environment and initializes the C/C++ -// library. -//***************************************************************************** -__attribute__((section(".after_vectors"))) __attribute__((naked)) void -ResetISR(void) -{ - // Fills the memory with a debug pattern. - for (uint32_t* d = &__start_ram; d < &__end_ram; ++d) - { - *d = 0xdbdbdbdb; - } - -#ifndef USE_OLD_STYLE_DATA_BSS_INIT - // - // Copy the data sections from flash to SRAM. - // - unsigned int LoadAddr, ExeAddr, SectionLen; - unsigned int* SectionTableAddr; - - // Load base address of Global Section Table - SectionTableAddr = &__data_section_table; - - // Copy the data sections from flash to SRAM. - while (SectionTableAddr < &__data_section_table_end) - { - LoadAddr = *SectionTableAddr++; - ExeAddr = *SectionTableAddr++; - SectionLen = *SectionTableAddr++; - data_init(LoadAddr, ExeAddr, SectionLen); - } - // At this point, SectionTableAddr = &__bss_section_table; - // Zero fill the bss segment - while (SectionTableAddr < &__bss_section_table_end) - { - ExeAddr = *SectionTableAddr++; - SectionLen = *SectionTableAddr++; - bss_init(ExeAddr, SectionLen); - } -#else - // Use Old Style Data and BSS section initialization. - // This will only initialize a single RAM bank. - unsigned int* LoadAddr, *ExeAddr, *EndAddr, SectionLen; - - // Copy the data segment from flash to SRAM. - LoadAddr = &_etext; - ExeAddr = &_data; - EndAddr = &_edata; - SectionLen = (void*)EndAddr - (void*)ExeAddr; - data_init((unsigned int)LoadAddr, (unsigned int)ExeAddr, SectionLen); - // Zero fill the bss segment - ExeAddr = &_bss; - EndAddr = &_ebss; - SectionLen = (void*)EndAddr - (void*)ExeAddr; - bss_init((unsigned int)ExeAddr, SectionLen); -#endif - -#ifdef __USE_CMSIS - SystemInit(); -#endif - - raw_hw_init(); - //#if defined (__cplusplus) - // - // Call C++ library initialisation - // - __libc_init_array(); -//#endif - -#if defined(__REDLIB__) - // Call the Redlib library, which in turn calls main() - __main(); -#else - main(); -#endif - // - // main() shouldn't return, but if it does, we'll just enter an infinite - // loop - // - while (1) - { - ; - } -} - -//***************************************************************************** -// Default exception handlers. Override the ones here by defining your own -// handler routines in your application code. -//***************************************************************************** -__attribute__((section(".after_vectors"))) void NMI_Handler(void) -{ - diewith(BLINK_DIE_NMI); -} -__attribute__((section(".after_vectors"))) void HardFault_Handler(void) -{ - diewith(BLINK_DIE_HARDFAULT); - // setblink(BLINK_DIE_HARDFAULT); -} -__attribute__((section(".after_vectors"))) void SVC_Handler(void) -{ - diewith(BLINK_DIE_SVC); -} -__attribute__((section(".after_vectors"))) void PendSV_Handler(void) -{ - diewith(BLINK_DIE_PENDSV); -} -__attribute__((section(".after_vectors"))) void SysTick_Handler(void) -{ - diewith(BLINK_DIE_TICK); -} - -//***************************************************************************** -// -// Processor ends up here if an unexpected interrupt occurs or a specific -// handler is not present in the application code. -// -//***************************************************************************** -__attribute__((section(".after_vectors"))) void IntDefaultHandler(void) -{ - diewith(BLINK_DIE_UNEXPIRQ); -} - -uint32_t blinker_pattern = 0; -static uint32_t rest_pattern = 0; - -void TIMER16_0_IRQHandler(void) -{ - LPC_GPIO0->MASKED_ACCESS[1 << 7] = (rest_pattern & 1) ? (1 << 7) : 0; - rest_pattern >>= 1; - if (!rest_pattern) - rest_pattern = blinker_pattern; - - LPC_TMR16B0->IR = 1; // Resets interrupt. - NVIC_ClearPendingIRQ(TIMER_16_0_IRQn); -} - -void setblink(uint32_t pattern) -{ - LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 7); - blinker_pattern = pattern; - rest_pattern = 0; - LPC_TMR16B0->TCR = 2; // stop & reset timer - LPC_TMR16B0->CTCR = 0; // timer mode - // prescale to 1 ms per tick - LPC_TMR16B0->PR = configCPU_CLOCK_HZ / 1000; // 48000 - fits the 16bit - LPC_TMR16B0->MR0 = 125; - LPC_TMR16B0->MCR = 3; // reset and interrupt on match 0 - - NVIC_SetPriority(TIMER_16_0_IRQn, 0); - NVIC_EnableIRQ(TIMER_16_0_IRQn); - - LPC_TMR16B0->TCR = 1; // Timer go. -} - -void resetblink(uint32_t pattern) -{ - blinker_pattern = pattern; - rest_pattern = pattern; - // Makes a timer event trigger immediately. - LPC_TMR16B0->TC = LPC_TMR16B0->MR0 - 2; -} - -void diewith(uint32_t pattern) -{ - SysTick->CTRL = 0; // Turns off systick to avoid task switching. - setblink(pattern); - __enable_irq(); - for (;;) - { - } -} - -extern void modules_init(void); -void modules_init(void) __attribute__((weak)); -void modules_init(void) -{ -} -extern uint32_t* heap_end; // Used from sbrk_r implementation. - -void hw_idle_hook(void) -{ - // We check that the main stack has not yet reached the top of heap. - if (*heap_end != 0xdbdbdbdb) - { - diewith(BLINK_DIE_STACKOVERFLOW); - } -} - -void appl_hw_init(void) -{ - // Re-initializes the top of heap space with debug bytes. - for (uint32_t* d = heap_end; d < &__end_ram; ++d) - { - *d = 0xdbdbdbdb; - } -} - -void raw_hw_init(void) -{ - /* Enable AHB clock to the GPIO domain. */ - LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6); - - // Turns on debug LED. - LPC_GPIO0->DIR |= (1 << 7); - LPC_GPIO0->MASKED_ACCESS[1 << 7] = (1 << 7); - __enable_irq(); - - setblink(0x8000000A); -} - -void hw_init(void) -{ - modules_init(); -} - -extern char __impure_data_size; - -struct _reent* allocate_reent(void) -{ - int reent_size = (int)&__impure_data_size; - struct _reent* data = malloc(reent_size); - // This is not particularly safe, but a good approximation of how reent is - // initialized. Unfortunately newlib-nano does not have an appropriate reent - // header. - memset(data, 0, reent_size); - return data; -} - -// This gets rid of about 50 kbytes of flash code that is unnecessarily -// linked into the binary. -void __wrap___cxa_pure_virtual(void) -{ - abort(); -} - -// This removes 400 bytes of memory allocated at startup for the atexit -// structure. -int __wrap___cxa_atexit(void) -{ - return 0; -} - -void __wrap_exit(int r) -{ - abort(); -} - -extern void destructor(void); - -void destructor() { - diewith(0x8000AAAA); -} +//***************************************************************************** +// +--+ +// | ++----+ +// +-++ | +// | | +// +-+--+ | +// | +--+--+ +// +----+ Copyright (c) 2009-12 Code Red Technologies Ltd. +// +// Microcontroller Startup code for use with Red Suite +// +// Version : 120126 +// +// Software License Agreement +// +// The software is owned by Code Red Technologies and/or its suppliers, and is +// protected under applicable copyright laws. All rights are reserved. Any +// use in violation of the foregoing restrictions may subject the user to +// criminal +// sanctions under applicable laws, as well as to civil liability for the breach +// of the terms and conditions of this license. +// +// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED +// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. +// USE OF THIS SOFTWARE FOR COMMERCIAL DEVELOPMENT AND/OR EDUCATION IS SUBJECT +// TO A CURRENT END USER LICENSE AGREEMENT (COMMERCIAL OR EDUCATIONAL) WITH +// CODE RED TECHNOLOGIES LTD. +// +//***************************************************************************** + +#include +#include + +#include "LPC11xx.h" +#include "core_cm0.h" +#include "FreeRTOSConfig.h" + +#if defined(__cplusplus) +#ifdef __REDLIB__ +#error Redlib does not support C++ +#else +//***************************************************************************** +// +// The entry point for the C++ library startup +// +//***************************************************************************** +#endif +#endif + +const unsigned long cpu_clock_hz = 48000000; + +// extern "C" { +extern void __libc_init_array(void); +//} +void raw_hw_init(void); + +#define WEAK __attribute__((weak)) +#define ALIAS(f) __attribute__((weak, alias(#f))) + +// Code Red - if CMSIS is being used, then SystemInit() routine +// will be called by startup code rather than in application's main() +#if defined(__USE_CMSIS) +#include "system_LPC11xx.h" +#endif + +//***************************************************************************** +#if defined(__cplusplus) +extern "C" { +#endif + +//***************************************************************************** +// +// Forward declaration of the default handlers. These are aliased. +// When the application defines a handler (with the same name), this will +// automatically take precedence over these weak definitions +// +//***************************************************************************** +void ResetISR(void); +WEAK void NMI_Handler(void); +WEAK void HardFault_Handler(void); +WEAK void SVC_Handler(void); +WEAK void PendSV_Handler(void); +WEAK void SysTick_Handler(void); +WEAK void IntDefaultHandler(void); +//***************************************************************************** +// +// Forward declaration of the specific IRQ handlers. These are aliased +// to the IntDefaultHandler, which is a 'forever' loop. When the application +// defines a handler (with the same name), this will automatically take +// precedence over these weak definitions +// +//***************************************************************************** + +void CAN_IRQHandler(void) ALIAS(IntDefaultHandler); +void SSP1_IRQHandler(void) ALIAS(IntDefaultHandler); +void I2C_IRQHandler(void) ALIAS(IntDefaultHandler); +void TIMER16_0_IRQHandler(void); +void TIMER16_1_IRQHandler(void) ALIAS(IntDefaultHandler); +void TIMER32_0_IRQHandler(void) ALIAS(IntDefaultHandler); +void TIMER32_1_IRQHandler(void) ALIAS(IntDefaultHandler); +void SSP0_IRQHandler(void) ALIAS(IntDefaultHandler); +void UART_IRQHandler(void) ALIAS(IntDefaultHandler); +void ADC_IRQHandler(void) ALIAS(IntDefaultHandler); +void WDT_IRQHandler(void) ALIAS(IntDefaultHandler); +void BOD_IRQHandler(void) ALIAS(IntDefaultHandler); +void PIOINT3_IRQHandler(void) ALIAS(IntDefaultHandler); +void PIOINT2_IRQHandler(void) ALIAS(IntDefaultHandler); +void PIOINT1_IRQHandler(void) ALIAS(IntDefaultHandler); +void PIOINT0_IRQHandler(void) ALIAS(IntDefaultHandler); +void WAKEUP_IRQHandler(void) ALIAS(IntDefaultHandler); + +//***************************************************************************** +// +// The entry point for the application. +// __main() is the entry point for redlib based applications +// main() is the entry point for newlib based applications +// +//***************************************************************************** +// +// The entry point for the application. +// __main() is the entry point for Redlib based applications +// main() is the entry point for Newlib based applications +// +//***************************************************************************** +#if defined(__REDLIB__) +extern void __main(void); +#endif +extern int main(void); +//***************************************************************************** +// +// External declaration for the pointer to the stack top from the Linker Script +// +//***************************************************************************** +extern void _vStackTop(void); + +//***************************************************************************** +#if defined(__cplusplus) +} // extern "C" +#endif +//***************************************************************************** +// +// The vector table. Note that the proper constructs must be placed on this to +// ensure that it ends up at physical address 0x0000.0000. +// +//***************************************************************************** +extern void (*const g_pfnVectors[])(void); +__attribute__((section(".isr_vector"))) void (*const g_pfnVectors[])(void) = { + &_vStackTop, // The initial stack pointer + ResetISR, // The reset handler + NMI_Handler, // The NMI handler + HardFault_Handler, // The hard fault handler + 0, // Reserved + 0, // Reserved + 0, // Reserved + 0, // Reserved + 0, // Reserved + 0, // Reserved + 0, // Reserved + SVC_Handler, // SVCall handler + 0, // Reserved + 0, // Reserved + PendSV_Handler, // The PendSV handler + SysTick_Handler, // The SysTick handler + + // Wakeup sources for the I/O pins: + // PIO0 (0:11) + // PIO1 (0) + WAKEUP_IRQHandler, // PIO0_0 Wakeup + WAKEUP_IRQHandler, // PIO0_1 Wakeup + WAKEUP_IRQHandler, // PIO0_2 Wakeup + WAKEUP_IRQHandler, // PIO0_3 Wakeup + WAKEUP_IRQHandler, // PIO0_4 Wakeup + WAKEUP_IRQHandler, // PIO0_5 Wakeup + WAKEUP_IRQHandler, // PIO0_6 Wakeup + WAKEUP_IRQHandler, // PIO0_7 Wakeup + WAKEUP_IRQHandler, // PIO0_8 Wakeup + WAKEUP_IRQHandler, // PIO0_9 Wakeup + WAKEUP_IRQHandler, // PIO0_10 Wakeup + WAKEUP_IRQHandler, // PIO0_11 Wakeup + WAKEUP_IRQHandler, // PIO1_0 Wakeup + CAN_IRQHandler, // C_CAN Interrupt + SSP1_IRQHandler, // SPI/SSP1 Interrupt + I2C_IRQHandler, // I2C0 + TIMER16_0_IRQHandler, // CT16B0 (16-bit Timer 0) + TIMER16_1_IRQHandler, // CT16B1 (16-bit Timer 1) + TIMER32_0_IRQHandler, // CT32B0 (32-bit Timer 0) + TIMER32_1_IRQHandler, // CT32B1 (32-bit Timer 1) + SSP0_IRQHandler, // SPI/SSP0 Interrupt + UART_IRQHandler, // UART0 + 0, // Reserved + 0, // Reserved + ADC_IRQHandler, // ADC (A/D Converter) + WDT_IRQHandler, // WDT (Watchdog Timer) + BOD_IRQHandler, // BOD (Brownout Detect) + 0, // Reserved + PIOINT3_IRQHandler, // PIO INT3 + PIOINT2_IRQHandler, // PIO INT2 + PIOINT1_IRQHandler, // PIO INT1 + PIOINT0_IRQHandler, // PIO INT0 +}; + +//***************************************************************************** +// Functions to carry out the initialization of RW and BSS data sections. These +// are written as separate functions rather than being inlined within the +// ResetISR() function in order to cope with MCUs with multiple banks of +// memory. +//***************************************************************************** +__attribute__((section(".after_vectors"))) void +data_init(unsigned int romstart, unsigned int start, unsigned int len) +{ + unsigned int* pulDest = (unsigned int*)start; + unsigned int* pulSrc = (unsigned int*)romstart; + unsigned int loop; + for (loop = 0; loop < len; loop = loop + 4) + *pulDest++ = *pulSrc++; +} + +__attribute__((section(".after_vectors"))) void bss_init(unsigned int start, + unsigned int len) +{ + unsigned int* pulDest = (unsigned int*)start; + unsigned int loop; + for (loop = 0; loop < len; loop = loop + 4) + *pulDest++ = 0; +} + +#ifndef USE_OLD_STYLE_DATA_BSS_INIT +//***************************************************************************** +// The following symbols are constructs generated by the linker, indicating +// the location of various points in the "Global Section Table". This table is +// created by the linker via the Code Red managed linker script mechanism. It +// contains the load address, execution address and length of each RW data +// section and the execution and length of each BSS (zero initialized) section. +//***************************************************************************** +extern unsigned int __data_section_table; +extern unsigned int __data_section_table_end; +extern unsigned int __bss_section_table; +extern unsigned int __bss_section_table_end; +#else +//***************************************************************************** +// The following symbols are constructs generated by the linker, indicating +// the load address, execution address and length of the RW data section and +// the execution and length of the BSS (zero initialized) section. +// Note that these symbols are not normally used by the managed linker script +// mechanism in Red Suite/LPCXpresso 3.6 (Windows) and LPCXpresso 3.8 (Linux). +// They are provide here simply so this startup code can be used with earlier +// versions of Red Suite which do not support the more advanced managed linker +// script mechanism introduced in the above version. To enable their use, +// define "USE_OLD_STYLE_DATA_BSS_INIT". +//***************************************************************************** +extern unsigned int _etext; +extern unsigned int _data; +extern unsigned int _edata; +extern unsigned int _bss; +extern unsigned int _ebss; +#endif + +extern uint32_t __start_ram; +extern uint32_t __end_ram; + +//***************************************************************************** +// Reset entry point for your code. +// Sets up a simple runtime environment and initializes the C/C++ +// library. +//***************************************************************************** +__attribute__((section(".after_vectors"))) __attribute__((naked)) void +ResetISR(void) +{ + // Fills the memory with a debug pattern. + for (uint32_t* d = &__start_ram; d < &__end_ram; ++d) + { + *d = 0xdbdbdbdb; + } + +#ifndef USE_OLD_STYLE_DATA_BSS_INIT + // + // Copy the data sections from flash to SRAM. + // + unsigned int LoadAddr, ExeAddr, SectionLen; + unsigned int* SectionTableAddr; + + // Load base address of Global Section Table + SectionTableAddr = &__data_section_table; + + // Copy the data sections from flash to SRAM. + while (SectionTableAddr < &__data_section_table_end) + { + LoadAddr = *SectionTableAddr++; + ExeAddr = *SectionTableAddr++; + SectionLen = *SectionTableAddr++; + data_init(LoadAddr, ExeAddr, SectionLen); + } + // At this point, SectionTableAddr = &__bss_section_table; + // Zero fill the bss segment + while (SectionTableAddr < &__bss_section_table_end) + { + ExeAddr = *SectionTableAddr++; + SectionLen = *SectionTableAddr++; + bss_init(ExeAddr, SectionLen); + } +#else + // Use Old Style Data and BSS section initialization. + // This will only initialize a single RAM bank. + unsigned int* LoadAddr, *ExeAddr, *EndAddr, SectionLen; + + // Copy the data segment from flash to SRAM. + LoadAddr = &_etext; + ExeAddr = &_data; + EndAddr = &_edata; + SectionLen = (void*)EndAddr - (void*)ExeAddr; + data_init((unsigned int)LoadAddr, (unsigned int)ExeAddr, SectionLen); + // Zero fill the bss segment + ExeAddr = &_bss; + EndAddr = &_ebss; + SectionLen = (void*)EndAddr - (void*)ExeAddr; + bss_init((unsigned int)ExeAddr, SectionLen); +#endif + +#ifdef __USE_CMSIS + SystemInit(); +#endif + + raw_hw_init(); + //#if defined (__cplusplus) + // + // Call C++ library initialisation + // + __libc_init_array(); +//#endif + +#if defined(__REDLIB__) + // Call the Redlib library, which in turn calls main() + __main(); +#else + main(); +#endif + // + // main() shouldn't return, but if it does, we'll just enter an infinite + // loop + // + while (1) + { + ; + } +} + +//***************************************************************************** +// Default exception handlers. Override the ones here by defining your own +// handler routines in your application code. +//***************************************************************************** +__attribute__((section(".after_vectors"))) void NMI_Handler(void) +{ + diewith(BLINK_DIE_NMI); +} +__attribute__((section(".after_vectors"))) void HardFault_Handler(void) +{ + diewith(BLINK_DIE_HARDFAULT); + // setblink(BLINK_DIE_HARDFAULT); +} +__attribute__((section(".after_vectors"))) void SVC_Handler(void) +{ + diewith(BLINK_DIE_SVC); +} +__attribute__((section(".after_vectors"))) void PendSV_Handler(void) +{ + diewith(BLINK_DIE_PENDSV); +} +__attribute__((section(".after_vectors"))) void SysTick_Handler(void) +{ + diewith(BLINK_DIE_TICK); +} + +//***************************************************************************** +// +// Processor ends up here if an unexpected interrupt occurs or a specific +// handler is not present in the application code. +// +//***************************************************************************** +__attribute__((section(".after_vectors"))) void IntDefaultHandler(void) +{ + diewith(BLINK_DIE_UNEXPIRQ); +} + +uint32_t blinker_pattern = 0; +static uint32_t rest_pattern = 0; + +void TIMER16_0_IRQHandler(void) +{ + LPC_GPIO0->MASKED_ACCESS[1 << 7] = (rest_pattern & 1) ? (1 << 7) : 0; + rest_pattern >>= 1; + if (!rest_pattern) + rest_pattern = blinker_pattern; + + LPC_TMR16B0->IR = 1; // Resets interrupt. + NVIC_ClearPendingIRQ(TIMER_16_0_IRQn); +} + +void setblink(uint32_t pattern) +{ + LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 7); + blinker_pattern = pattern; + rest_pattern = 0; + LPC_TMR16B0->TCR = 2; // stop & reset timer + LPC_TMR16B0->CTCR = 0; // timer mode + // prescale to 1 ms per tick + LPC_TMR16B0->PR = configCPU_CLOCK_HZ / 1000; // 48000 - fits the 16bit + LPC_TMR16B0->MR0 = 125; + LPC_TMR16B0->MCR = 3; // reset and interrupt on match 0 + + NVIC_SetPriority(TIMER_16_0_IRQn, 0); + NVIC_EnableIRQ(TIMER_16_0_IRQn); + + LPC_TMR16B0->TCR = 1; // Timer go. +} + +void resetblink(uint32_t pattern) +{ + blinker_pattern = pattern; + rest_pattern = pattern; + // Makes a timer event trigger immediately. + LPC_TMR16B0->TC = LPC_TMR16B0->MR0 - 2; +} + +void diewith(uint32_t pattern) +{ + SysTick->CTRL = 0; // Turns off systick to avoid task switching. + setblink(pattern); + __enable_irq(); + for (;;) + { + } +} + +extern void modules_init(void); +void modules_init(void) __attribute__((weak)); +void modules_init(void) +{ +} +extern uint32_t* heap_end; // Used from sbrk_r implementation. + +void hw_idle_hook(void) +{ + // We check that the main stack has not yet reached the top of heap. + if (*heap_end != 0xdbdbdbdb) + { + diewith(BLINK_DIE_STACKOVERFLOW); + } +} + +void appl_hw_init(void) +{ + // Re-initializes the top of heap space with debug bytes. + for (uint32_t* d = heap_end; d < &__end_ram; ++d) + { + *d = 0xdbdbdbdb; + } +} + +void raw_hw_init(void) +{ + /* Enable AHB clock to the GPIO domain. */ + LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6); + + // Turns on debug LED. + LPC_GPIO0->DIR |= (1 << 7); + LPC_GPIO0->MASKED_ACCESS[1 << 7] = (1 << 7); + __enable_irq(); + + setblink(0x8000000A); +} + +void hw_init(void) +{ + modules_init(); +} + +extern char __impure_data_size; + +struct _reent* allocate_reent(void) +{ + int reent_size = (int)&__impure_data_size; + struct _reent* data = malloc(reent_size); + // This is not particularly safe, but a good approximation of how reent is + // initialized. Unfortunately newlib-nano does not have an appropriate reent + // header. + memset(data, 0, reent_size); + return data; +} + +// This gets rid of about 50 kbytes of flash code that is unnecessarily +// linked into the binary. +void __wrap___cxa_pure_virtual(void) +{ + abort(); +} + +// This removes 400 bytes of memory allocated at startup for the atexit +// structure. +int __wrap___cxa_atexit(void) +{ + return 0; +} + +void __wrap_exit(int r) +{ + abort(); +} + +extern void destructor(void); + +void destructor() { + diewith(0x8000AAAA); +} diff --git a/boards/nxp-lpc175x-edetector/HwInit.cxx b/boards/nxp-lpc175x-edetector/HwInit.cxx index 6453f7c22..9d3af4a5f 100644 --- a/boards/nxp-lpc175x-edetector/HwInit.cxx +++ b/boards/nxp-lpc175x-edetector/HwInit.cxx @@ -37,10 +37,10 @@ #include "chip.h" #include "os/OS.hxx" -#include "Lpc17xx40xxUart.hxx" -#include "Lpc17xx40xxCan.hxx" -#include "Lpc17xx40xxGPIO.hxx" -#include "Lpc17xx40xxEEPROMEmulation.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxUart.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxCan.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/nxp-lpc1768-mbed/HwInit.cxx b/boards/nxp-lpc1768-mbed/HwInit.cxx index d30bd2ce6..7dfc12c7f 100644 --- a/boards/nxp-lpc1768-mbed/HwInit.cxx +++ b/boards/nxp-lpc1768-mbed/HwInit.cxx @@ -39,9 +39,9 @@ #include "chip.h" #include "os/OS.hxx" -#include "Lpc17xx40xxUart.hxx" -#include "Lpc17xx40xxCan.hxx" -#include "Lpc17xx40xxGPIO.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxUart.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxCan.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/nxp-lpc1769-lpcxpresso/HwInit.cxx b/boards/nxp-lpc1769-lpcxpresso/HwInit.cxx index b7ce81741..ff15beb40 100644 --- a/boards/nxp-lpc1769-lpcxpresso/HwInit.cxx +++ b/boards/nxp-lpc1769-lpcxpresso/HwInit.cxx @@ -37,10 +37,10 @@ #include "chip.h" #include "os/OS.hxx" -#include "Lpc17xx40xxUart.hxx" -#include "Lpc17xx40xxCan.hxx" -#include "Lpc17xx40xxGPIO.hxx" -#include "Lpc17xx40xxEEPROMEmulation.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxUart.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxCan.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/st-stm32f072b-discovery/HwInit.cxx b/boards/st-stm32f072b-discovery/HwInit.cxx index cd72123e4..36a3edd0c 100644 --- a/boards/st-stm32f072b-discovery/HwInit.cxx +++ b/boards/st-stm32f072b-discovery/HwInit.cxx @@ -43,9 +43,9 @@ #include "stm32f0xx_hal_tim.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32f072b-discovery/hardware.hxx b/boards/st-stm32f072b-discovery/hardware.hxx index dfd2464da..a5faf6363 100644 --- a/boards/st-stm32f072b-discovery/hardware.hxx +++ b/boards/st-stm32f072b-discovery/hardware.hxx @@ -1,5 +1,5 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" GPIO_PIN(LED_ORA, LedPin, C, 8); diff --git a/boards/st-stm32f091rc-nucleo-dev-board/HwInit.cxx b/boards/st-stm32f091rc-nucleo-dev-board/HwInit.cxx index 55afc49fb..222dec9f5 100644 --- a/boards/st-stm32f091rc-nucleo-dev-board/HwInit.cxx +++ b/boards/st-stm32f091rc-nucleo-dev-board/HwInit.cxx @@ -45,11 +45,11 @@ #include "stm32f0xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32SPI.hxx" -#include "Stm32EEPROMEmulation.hxx" -#include "Stm32PWM.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32SPI.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32PWM.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32f091rc-nucleo-dev-board/hardware.hxx b/boards/st-stm32f091rc-nucleo-dev-board/hardware.hxx index 48035d52c..1fd1d0e99 100644 --- a/boards/st-stm32f091rc-nucleo-dev-board/hardware.hxx +++ b/boards/st-stm32f091rc-nucleo-dev-board/hardware.hxx @@ -1,9 +1,9 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" -#include "DummyGPIO.hxx" -#include "PWM.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/PWM.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, A, 5); diff --git a/boards/st-stm32f091rc-nucleo/BootloaderHal.cxx b/boards/st-stm32f091rc-nucleo/BootloaderHal.cxx index 86fa2a5d8..8e17cfaa8 100644 --- a/boards/st-stm32f091rc-nucleo/BootloaderHal.cxx +++ b/boards/st-stm32f091rc-nucleo/BootloaderHal.cxx @@ -4,11 +4,11 @@ //#define BOOTLOADER_DATAGRAM #include "BootloaderHal.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "openlcb/Bootloader.hxx" #include "openlcb/If.hxx" #include "utils/GpioInitializer.hxx" diff --git a/boards/st-stm32f091rc-nucleo/HwInit.cxx b/boards/st-stm32f091rc-nucleo/HwInit.cxx index cd5b602aa..c18500587 100644 --- a/boards/st-stm32f091rc-nucleo/HwInit.cxx +++ b/boards/st-stm32f091rc-nucleo/HwInit.cxx @@ -35,7 +35,7 @@ #include #include -#include "stm32f0xx_hal_conf.h" +#include "freertos_drivers/st/stm32f0xx_hal_conf.h" #include "stm32f0xx_hal_rcc.h" #include "stm32f0xx_hal_flash.h" #include "stm32f0xx_hal_gpio.h" @@ -45,9 +45,9 @@ #include "stm32f0xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32f091rc-nucleo/hardware.hxx b/boards/st-stm32f091rc-nucleo/hardware.hxx index 98f53461b..2c500191b 100644 --- a/boards/st-stm32f091rc-nucleo/hardware.hxx +++ b/boards/st-stm32f091rc-nucleo/hardware.hxx @@ -1,7 +1,7 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, A, 5); diff --git a/boards/st-stm32f0x1_x2_x8-generic/BootloaderHal.hxx b/boards/st-stm32f0x1_x2_x8-generic/BootloaderHal.hxx index ed687cee3..0c527e009 100644 --- a/boards/st-stm32f0x1_x2_x8-generic/BootloaderHal.hxx +++ b/boards/st-stm32f0x1_x2_x8-generic/BootloaderHal.hxx @@ -41,13 +41,13 @@ #include -#include "bootloader_hal.h" -#include "stm32f0xx_hal_conf.h" +#include "openlcb/bootloader_hal.h" +#include "freertos_drivers/st/stm32f0xx_hal_conf.h" #include "nmranet_config.h" #include "openlcb/Defs.hxx" #include "utils/Crc.hxx" -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" extern "C" { diff --git a/boards/st-stm32f0x1_x2_x8-generic/bootloader_startup.c b/boards/st-stm32f0x1_x2_x8-generic/bootloader_startup.c index eb4160980..04783f8d6 100644 --- a/boards/st-stm32f0x1_x2_x8-generic/bootloader_startup.c +++ b/boards/st-stm32f0x1_x2_x8-generic/bootloader_startup.c @@ -33,7 +33,7 @@ #include -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" /* we define this our selves because TivaWare forces us to otherwise bring in * a device specific header to define this. We want to keep this file generic * to all Cortex-M based TI MCU's diff --git a/boards/st-stm32f103rb-olimexino/HwInit.cxx b/boards/st-stm32f103rb-olimexino/HwInit.cxx index e27515c5c..efe99ce70 100644 --- a/boards/st-stm32f103rb-olimexino/HwInit.cxx +++ b/boards/st-stm32f103rb-olimexino/HwInit.cxx @@ -45,8 +45,8 @@ #include "os/OS.hxx" //#include "Stm32F0xxUart.hxx" -#include "Stm32Can.hxx" -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/st-stm32f303-discovery/HwInit.cxx b/boards/st-stm32f303-discovery/HwInit.cxx index 43d04f9d6..26aa8ea3f 100644 --- a/boards/st-stm32f303-discovery/HwInit.cxx +++ b/boards/st-stm32f303-discovery/HwInit.cxx @@ -34,12 +34,12 @@ #include #include -#include "stm32f3xx_hal_conf.h" +#include "freertos_drivers/st/stm32f3xx_hal_conf.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" diff --git a/boards/st-stm32f303-discovery/hardware.hxx b/boards/st-stm32f303-discovery/hardware.hxx index 2e7a4bffa..3c88bf5d3 100644 --- a/boards/st-stm32f303-discovery/hardware.hxx +++ b/boards/st-stm32f303-discovery/hardware.hxx @@ -1,7 +1,7 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" GPIO_PIN(SW1, GpioInputPD, A, 0); diff --git a/boards/st-stm32f303re-nucleo-dev-board/HwInit.cxx b/boards/st-stm32f303re-nucleo-dev-board/HwInit.cxx index 06b2b6921..79efe8f40 100644 --- a/boards/st-stm32f303re-nucleo-dev-board/HwInit.cxx +++ b/boards/st-stm32f303re-nucleo-dev-board/HwInit.cxx @@ -38,16 +38,16 @@ #include #include -#include "stm32f3xx_hal_conf.h" +#include "freertos_drivers/st/stm32f3xx_hal_conf.h" #include "stm32f3xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32SPI.hxx" -#include "Stm32I2C.hxx" -#include "Stm32EEPROMEmulation.hxx" -#include "Stm32PWM.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32SPI.hxx" +#include "freertos_drivers/st/Stm32I2C.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32PWM.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32f303re-nucleo/HwInit.cxx b/boards/st-stm32f303re-nucleo/HwInit.cxx index 4429cace3..e210b3a04 100644 --- a/boards/st-stm32f303re-nucleo/HwInit.cxx +++ b/boards/st-stm32f303re-nucleo/HwInit.cxx @@ -36,13 +36,13 @@ #include #include -#include "stm32f3xx_hal_conf.h" +#include "freertos_drivers/st/stm32f3xx_hal_conf.h" #include "stm32f3xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32f303re-nucleo/hardware.hxx b/boards/st-stm32f303re-nucleo/hardware.hxx index 98f53461b..2c500191b 100644 --- a/boards/st-stm32f303re-nucleo/hardware.hxx +++ b/boards/st-stm32f303re-nucleo/hardware.hxx @@ -1,7 +1,7 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, A, 5); diff --git a/boards/st-stm32f767zi-nucleo/HwInit.cxx b/boards/st-stm32f767zi-nucleo/HwInit.cxx index 6bebfca3c..cb970d2d8 100644 --- a/boards/st-stm32f767zi-nucleo/HwInit.cxx +++ b/boards/st-stm32f767zi-nucleo/HwInit.cxx @@ -36,11 +36,11 @@ #include #include -#include "stm32f7xx_hal_conf.h" +#include "freertos_drivers/st/stm32f7xx_hal_conf.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" #include "freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.hxx" #include "hardware.hxx" diff --git a/boards/st-stm32f767zi-nucleo/hardware.hxx b/boards/st-stm32f767zi-nucleo/hardware.hxx index 0e5dcb2b2..1332d6462 100644 --- a/boards/st-stm32f767zi-nucleo/hardware.hxx +++ b/boards/st-stm32f767zi-nucleo/hardware.hxx @@ -1,7 +1,7 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED1_RAW, LedPin, B, 0); GPIO_PIN(LED2, LedPin, B, 7); diff --git a/boards/st-stm32g0b1rc-railcom/HwInit.cxx b/boards/st-stm32g0b1rc-railcom/HwInit.cxx index a32dfbe0b..68e198518 100644 --- a/boards/st-stm32g0b1rc-railcom/HwInit.cxx +++ b/boards/st-stm32g0b1rc-railcom/HwInit.cxx @@ -37,15 +37,15 @@ #include #include -#include "stm32g0xx_hal_conf.h" +#include "freertos_drivers/st/stm32g0xx_hal_conf.h" #include "stm32g0xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" -#include "Stm32SpiPixelStrip.hxx" -#include "Stm32MCan.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32SpiPixelStrip.hxx" +#include "freertos_drivers/st/Stm32MCan.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32g0b1rc-railcom/hardware.hxx b/boards/st-stm32g0b1rc-railcom/hardware.hxx index 658aee166..bd394f3fd 100644 --- a/boards/st-stm32g0b1rc-railcom/hardware.hxx +++ b/boards/st-stm32g0b1rc-railcom/hardware.hxx @@ -35,9 +35,9 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, B, 3); diff --git a/boards/st-stm32g0b1re-nucleo/HwInit.cxx b/boards/st-stm32g0b1re-nucleo/HwInit.cxx index 8ce0bc9b9..ba6d43673 100644 --- a/boards/st-stm32g0b1re-nucleo/HwInit.cxx +++ b/boards/st-stm32g0b1re-nucleo/HwInit.cxx @@ -37,13 +37,13 @@ #include #include -#include "stm32g0xx_hal_conf.h" +#include "freertos_drivers/st/stm32g0xx_hal_conf.h" #include "stm32g0xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32g0b1re-nucleo/hardware.hxx b/boards/st-stm32g0b1re-nucleo/hardware.hxx index 51bac7576..a61dc4e57 100644 --- a/boards/st-stm32g0b1re-nucleo/hardware.hxx +++ b/boards/st-stm32g0b1re-nucleo/hardware.hxx @@ -36,9 +36,9 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, A, 5); diff --git a/boards/st-stm32l432kc-nucleo/HwInit.cxx b/boards/st-stm32l432kc-nucleo/HwInit.cxx index 79d98b533..031681b6b 100644 --- a/boards/st-stm32l432kc-nucleo/HwInit.cxx +++ b/boards/st-stm32l432kc-nucleo/HwInit.cxx @@ -40,9 +40,9 @@ #include "stm32l4xx_hal.h" #include "os/OS.hxx" -#include "Stm32Uart.hxx" -#include "Stm32Can.hxx" -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/st-stm32l432kc-nucleo/hardware.hxx b/boards/st-stm32l432kc-nucleo/hardware.hxx index 0598aa2ba..cbada4bcb 100644 --- a/boards/st-stm32l432kc-nucleo/hardware.hxx +++ b/boards/st-stm32l432kc-nucleo/hardware.hxx @@ -1,7 +1,7 @@ -#include "Stm32Gpio.hxx" +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(LED_GREEN_RAW, LedPin, B, 3); diff --git a/boards/ti-bracz-acc/HwInit.cxx b/boards/ti-bracz-acc/HwInit.cxx index 3c666cb96..f325efe49 100644 --- a/boards/ti-bracz-acc/HwInit.cxx +++ b/boards/ti-bracz-acc/HwInit.cxx @@ -45,7 +45,7 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/ti-bracz-acc3/HwInit.cxx b/boards/ti-bracz-acc3/HwInit.cxx index 5063d802a..fa0687124 100644 --- a/boards/ti-bracz-acc3/HwInit.cxx +++ b/boards/ti-bracz-acc3/HwInit.cxx @@ -47,12 +47,12 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" #include "hardware.hxx" -#include "TivaEEPROMEmulation.hxx" -#include "TivaDCCDecoder.hxx" -#include "TivaRailcom.hxx" -#include "bootloader_hal.h" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaDCCDecoder.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" +#include "openlcb/bootloader_hal.h" //#define ERASE_ALL_EEPROM diff --git a/boards/ti-bracz-acc3/hardware.v2.hxx b/boards/ti-bracz-acc3/hardware.v2.hxx index edc4c3749..23827386f 100644 --- a/boards/ti-bracz-acc3/hardware.v2.hxx +++ b/boards/ti-bracz-acc3/hardware.v2.hxx @@ -1,8 +1,8 @@ #ifndef _ACC_TIVA_2_HARDWARE_HXX_ #define _ACC_TIVA_2_HARDWARE_HXX_ -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "inc/hw_memmap.h" #include "inc/hw_ints.h" diff --git a/boards/ti-bracz-acc3/hardware.v3.hxx b/boards/ti-bracz-acc3/hardware.v3.hxx index 7d676dd9b..6dd138409 100644 --- a/boards/ti-bracz-acc3/hardware.v3.hxx +++ b/boards/ti-bracz-acc3/hardware.v3.hxx @@ -3,8 +3,8 @@ #define USE_WII_CHUCK -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "inc/hw_types.h" #include "inc/hw_memmap.h" diff --git a/boards/ti-bracz-cs-123/HwInit.cxx b/boards/ti-bracz-cs-123/HwInit.cxx index 9c70c7330..8d87b27f9 100644 --- a/boards/ti-bracz-cs-123/HwInit.cxx +++ b/boards/ti-bracz-cs-123/HwInit.cxx @@ -47,15 +47,15 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" #include "hardware.hxx" #include "DccHardware.hxx" -#include "DummyGPIO.hxx" -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" -#include "TivaRailcom.hxx" -#include "TivaDCC.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaDCC.hxx" /** override stdin */ diff --git a/boards/ti-bracz-cs-connected/HwInit.cxx b/boards/ti-bracz-cs-connected/HwInit.cxx index e5f244d19..41b001702 100644 --- a/boards/ti-bracz-cs-connected/HwInit.cxx +++ b/boards/ti-bracz-cs-connected/HwInit.cxx @@ -50,15 +50,15 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaDCC.hxx" -#include "TivaGPIO.hxx" -#include "TivaFlash.hxx" -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaFlash.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" #include "commandstation/dcc_control.hxx" #include "DccHardware.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" struct Debug { @@ -75,7 +75,7 @@ struct Debug { typedef DummyPin RailcomPackets; typedef DummyPin RailcomRxActivate; }; -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/ti-bracz-cs-connected/hardware.hxx b/boards/ti-bracz-cs-connected/hardware.hxx index d9f4ba026..edc4dead4 100644 --- a/boards/ti-bracz-cs-connected/hardware.hxx +++ b/boards/ti-bracz-cs-connected/hardware.hxx @@ -3,8 +3,8 @@ #ifndef _BRACZ_CS_TIVA_HARDWARE_HXX_ #define _BRACZ_CS_TIVA_HARDWARE_HXX_ -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" #include "utils/GpioInitializer.hxx" /* diff --git a/boards/ti-cc3200-launchpad/HwInit.cxx b/boards/ti-cc3200-launchpad/HwInit.cxx index 3f53fe065..ab47f9a62 100644 --- a/boards/ti-cc3200-launchpad/HwInit.cxx +++ b/boards/ti-cc3200-launchpad/HwInit.cxx @@ -46,16 +46,16 @@ #include "driverlib/interrupt.h" #include "driverlib/pin.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxWiFi.hxx" -#include "MCP2515Can.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/common/MCP2515Can.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" //#define USE_MCP2515 #if defined(USE_MCP2515) -#include "CC32xxSPI.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" #endif /** override stdin */ diff --git a/boards/ti-cc3200-launchpad/hardware.hxx b/boards/ti-cc3200-launchpad/hardware.hxx index bc4ea0460..3c4dd2c94 100644 --- a/boards/ti-cc3200-launchpad/hardware.hxx +++ b/boards/ti-cc3200-launchpad/hardware.hxx @@ -1,7 +1,7 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/boards/ti-cc3220sf-launchpad/HwInit.cxx b/boards/ti-cc3220sf-launchpad/HwInit.cxx index 8896c3f5b..006fe8516 100644 --- a/boards/ti-cc3220sf-launchpad/HwInit.cxx +++ b/boards/ti-cc3220sf-launchpad/HwInit.cxx @@ -46,14 +46,14 @@ #include "driverlib/interrupt.h" #include "driverlib/pin.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxSPI.hxx" -#include "CC32xxWiFi.hxx" -#include "MCP2515Can.hxx" -#include "CC32xxEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/common/MCP2515Can.hxx" +#include "freertos_drivers/ti/CC32xxEEPROMEmulation.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/ti-cc3220sf-launchpad/hardware.hxx b/boards/ti-cc3220sf-launchpad/hardware.hxx index bcf22b1fc..5165575d1 100644 --- a/boards/ti-cc3220sf-launchpad/hardware.hxx +++ b/boards/ti-cc3220sf-launchpad/hardware.hxx @@ -1,8 +1,8 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx b/boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx index 1f5b0f68c..9e7a1592f 100644 --- a/boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx +++ b/boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx @@ -49,17 +49,17 @@ #include "hardware.hxx" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" #define TIVADCC_TIVA -#include "TivaDCC.hxx" -#include "TivaEEPROMEmulation.hxx" -#include "TivaEEPROMBitSet.hxx" -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" -#include "GpioWrapper.hxx" -#include "bootloader_hal.h" +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaEEPROMBitSet.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" +#include "openlcb/bootloader_hal.h" #include "dcc/DccOutput.hxx" struct Debug { @@ -80,7 +80,7 @@ struct Debug { typedef DummyPin RailcomCh2Data; typedef DummyPin RailcomRxActivate; }; -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/ti-ek-tm4c123gxl-launchpad/hardware.hxx b/boards/ti-ek-tm4c123gxl-launchpad/hardware.hxx index 50deae3fd..d7be8366e 100644 --- a/boards/ti-ek-tm4c123gxl-launchpad/hardware.hxx +++ b/boards/ti-ek-tm4c123gxl-launchpad/hardware.hxx @@ -1,9 +1,9 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/boards/ti-ek-tm4c123gxl-z-dev-board/HwInit.cxx b/boards/ti-ek-tm4c123gxl-z-dev-board/HwInit.cxx index e34c0e604..06ab5c0b8 100644 --- a/boards/ti-ek-tm4c123gxl-z-dev-board/HwInit.cxx +++ b/boards/ti-ek-tm4c123gxl-z-dev-board/HwInit.cxx @@ -51,11 +51,11 @@ #define TIVADCC_TIVA -#include "TivaDev.hxx" -#include "TivaDCC.hxx" -#include "TivaEEPROMEmulation.hxx" -#include "DummyGPIO.hxx" -#include "bootloader_hal.h" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "openlcb/bootloader_hal.h" struct Debug { // High between start_cutout and end_cutout from the TivaRailcom driver. @@ -75,7 +75,7 @@ struct Debug { typedef DummyPin RailcomCh2Data; typedef DummyPin RailcomRxActivate; }; -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/boards/ti-ek-tm4c123gxl-z-dev-board/hardware.hxx b/boards/ti-ek-tm4c123gxl-z-dev-board/hardware.hxx index 437ef9fef..dfd6c8c44 100644 --- a/boards/ti-ek-tm4c123gxl-z-dev-board/hardware.hxx +++ b/boards/ti-ek-tm4c123gxl-z-dev-board/hardware.hxx @@ -1,9 +1,9 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "TivaGPIO.hxx" -#include "DummyGPIO.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/boards/ti-ek-tm4c1294xl-launchpad/HwInit.cxx b/boards/ti-ek-tm4c1294xl-launchpad/HwInit.cxx index d672c025b..d34b3591a 100644 --- a/boards/ti-ek-tm4c1294xl-launchpad/HwInit.cxx +++ b/boards/ti-ek-tm4c1294xl-launchpad/HwInit.cxx @@ -46,8 +46,8 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" #include "hardware.hxx" /** override stdin */ diff --git a/boards/ti-ek-tm4c1294xl-launchpad/hardware.hxx b/boards/ti-ek-tm4c1294xl-launchpad/hardware.hxx index 985c787b7..586150b71 100644 --- a/boards/ti-ek-tm4c1294xl-launchpad/hardware.hxx +++ b/boards/ti-ek-tm4c1294xl-launchpad/hardware.hxx @@ -1,7 +1,7 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" diff --git a/boards/ti-tm4c123-generic/BootloaderHal.hxx b/boards/ti-tm4c123-generic/BootloaderHal.hxx index ea3a5d4bc..c13f910a1 100644 --- a/boards/ti-tm4c123-generic/BootloaderHal.hxx +++ b/boards/ti-tm4c123-generic/BootloaderHal.hxx @@ -41,7 +41,7 @@ #include -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/gpio.h" @@ -52,7 +52,7 @@ #include "nmranet_config.h" #include "openlcb/Defs.hxx" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" extern "C" { diff --git a/boards/ti-tm4c123-generic/bootloader_startup.c b/boards/ti-tm4c123-generic/bootloader_startup.c index b15f6d884..9d80f4595 100644 --- a/boards/ti-tm4c123-generic/bootloader_startup.c +++ b/boards/ti-tm4c123-generic/bootloader_startup.c @@ -33,7 +33,7 @@ #include -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" /* we define this our selves because TivaWare forces us to otherwise bring in * a device specific header to define this. We want to keep this file generic * to all Cortex-M based TI MCU's diff --git a/boards/ti-tm4c123-generic/reflash_bootloader_startup.c b/boards/ti-tm4c123-generic/reflash_bootloader_startup.c index 457c023d4..b3bbf0c14 100644 --- a/boards/ti-tm4c123-generic/reflash_bootloader_startup.c +++ b/boards/ti-tm4c123-generic/reflash_bootloader_startup.c @@ -33,7 +33,7 @@ #include -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" /* we define this our selves because TivaWare forces us to otherwise bring in * a device specific header to define this. We want to keep this file generic * to all Cortex-M based TI MCU's diff --git a/fix_includes.py b/fix_includes.py new file mode 100644 index 000000000..5706e67f7 --- /dev/null +++ b/fix_includes.py @@ -0,0 +1,97 @@ +import os +import re +import sys + +def get_header_map(header_files_list): + header_map = {} + with open(header_files_list, 'r') as f: + for line in f: + full_path = line.strip() + if not full_path: + continue + filename = os.path.basename(full_path) + if filename not in header_map: + header_map[filename] = [] + header_map[filename].append(full_path) + return header_map + +def process_files(files_to_process_list, header_map): + with open(files_to_process_list, 'r') as f: + for line in f: + filepath = line.strip() + if not filepath: + continue + process_file(filepath, header_map) + +def process_file(filepath, header_map): + try: + with open(filepath, 'r') as f: + lines = f.readlines() + except IOError: + print(f"Could not read file: {filepath}") + return + + new_lines = [] + changed = False + for line in lines: + match = re.match(r'\s*#\s*include\s*"([^"]+)"', line) + if match: + include_path = match.group(1) + + # Skip if it's already a relative path with subdirectories + if '/' in include_path: + new_lines.append(line) + continue + + filename = os.path.basename(include_path) + + if filename == 'endian.h' or filename == 'stm32f_hal_conf.hxx': + new_lines.append(line) + continue + + if filename in header_map and len(header_map[filename]) == 1: + new_include_path = header_map[filename][0] + + if 'include/freertos/' in new_include_path: + new_lines.append(line) + continue + + if new_include_path.startswith('src/'): + new_include_path = new_include_path[len('src/'):] + elif new_include_path.startswith('include/'): + new_include_path = new_include_path[len('include/'):] + + new_line = f'#include "{new_include_path}"\n' + if line.strip() != new_line.strip(): + new_lines.append(new_line) + changed = True + print(f'Changed "{include_path}" to "{new_include_path}" in {filepath}') + else: + new_lines.append(line) + else: + if filename in header_map: + print(f"Skipping ambiguous include '{include_path}' in {filepath}. Candidates: {header_map[filename]}") + new_lines.append(line) + else: + new_lines.append(line) + + if changed: + try: + with open(filepath, 'w') as f: + f.writelines(new_lines) + except IOError: + print(f"Could not write to file: {filepath}") + +def main(): + # Chunks are passed as arguments now. + if len(sys.argv) < 2: + print("Usage: python fix_includes.py ...") + return + + header_map = get_header_map('/tmp/header_files.txt') + for file_list in sys.argv[1:]: + process_files(file_list, header_map) + + +if __name__ == "__main__": + main() diff --git a/src/executor/AsyncNotifiableBlock.cxx b/src/executor/AsyncNotifiableBlock.cxx index b8282b123..d585b7a6f 100644 --- a/src/executor/AsyncNotifiableBlock.cxx +++ b/src/executor/AsyncNotifiableBlock.cxx @@ -39,7 +39,7 @@ #define _DEFAULT_SOURCE #endif -#include "AsyncNotifiableBlock.hxx" +#include "executor/AsyncNotifiableBlock.hxx" #include "os/sleep.h" diff --git a/src/freertos_drivers/common/BitBangI2C.hxx b/src/freertos_drivers/common/BitBangI2C.hxx index 6aacbefa0..2115cd7ef 100644 --- a/src/freertos_drivers/common/BitBangI2C.hxx +++ b/src/freertos_drivers/common/BitBangI2C.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_COMMON_BITBANG_I2C_HXX_ #define _FREERTOS_DRIVERS_COMMON_BITBANG_I2C_HXX_ -#include "I2C.hxx" +#include "freertos_drivers/common/I2C.hxx" #include "os/Gpio.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/common/BlinkerGPIO.hxx b/src/freertos_drivers/common/BlinkerGPIO.hxx index 8c18cecdd..804183639 100644 --- a/src/freertos_drivers/common/BlinkerGPIO.hxx +++ b/src/freertos_drivers/common/BlinkerGPIO.hxx @@ -37,7 +37,7 @@ #include "utils/blinker.h" #include "os/Gpio.hxx" -#include "GpioWrapper.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" /** GPIO-abstraction implementation for the blinker bit. This allows a * GPIO-style usage of the LED that is controlled by the blinker code in the diff --git a/src/freertos_drivers/common/Can.cxx b/src/freertos_drivers/common/Can.cxx index 9b2e734f2..2fd99af4b 100644 --- a/src/freertos_drivers/common/Can.cxx +++ b/src/freertos_drivers/common/Can.cxx @@ -34,7 +34,7 @@ #include #include #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "Can.hxx" #include "can_frame.h" diff --git a/src/freertos_drivers/common/Can.hxx b/src/freertos_drivers/common/Can.hxx index ed923a692..528d84754 100644 --- a/src/freertos_drivers/common/Can.hxx +++ b/src/freertos_drivers/common/Can.hxx @@ -34,12 +34,12 @@ #ifndef _FREERTOS_DRIVERS_COMMON_CAN_HXX_ #define _FREERTOS_DRIVERS_COMMON_CAN_HXX_ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "can_frame.h" #include "nmranet_config.h" #include "os/OS.hxx" #include "executor/Notifiable.hxx" -#include "DeviceBuffer.hxx" +#include "freertos_drivers/common/DeviceBuffer.hxx" /** Private data for a can device */ class Can : public NonBlockNode diff --git a/src/freertos_drivers/common/CpuLoad.cxx b/src/freertos_drivers/common/CpuLoad.cxx index 654437af1..02d116082 100644 --- a/src/freertos_drivers/common/CpuLoad.cxx +++ b/src/freertos_drivers/common/CpuLoad.cxx @@ -32,7 +32,7 @@ */ -#include "CpuLoad.hxx" +#include "freertos_drivers/common/CpuLoad.hxx" #ifdef OPENMRN_FEATURE_THREAD_FREERTOS diff --git a/src/freertos_drivers/common/DccDecoder.hxx b/src/freertos_drivers/common/DccDecoder.hxx index 45a9cdf3a..b104b6b67 100644 --- a/src/freertos_drivers/common/DccDecoder.hxx +++ b/src/freertos_drivers/common/DccDecoder.hxx @@ -33,7 +33,7 @@ * @date 8 April 2020 */ -#include "RailcomDriver.hxx" // for debug pins +#include "freertos_drivers/common/RailcomDriver.hxx" #include "dcc/Receiver.hxx" #include "dcc/PacketProcessor.hxx" #include "dcc/packet.h" diff --git a/src/freertos_drivers/common/Device.cxx b/src/freertos_drivers/common/Device.cxx index 8b0347945..dfb5508c6 100644 --- a/src/freertos_drivers/common/Device.cxx +++ b/src/freertos_drivers/common/Device.cxx @@ -31,7 +31,7 @@ * @date 31 January 2015 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include #include diff --git a/src/freertos_drivers/common/DeviceBuffer.cxx b/src/freertos_drivers/common/DeviceBuffer.cxx index 249690619..aa8b21733 100644 --- a/src/freertos_drivers/common/DeviceBuffer.cxx +++ b/src/freertos_drivers/common/DeviceBuffer.cxx @@ -32,7 +32,7 @@ * @date 2 March 2015 */ -#include "DeviceBuffer.hxx" +#include "freertos_drivers/common/DeviceBuffer.hxx" #include "openmrn_features.h" diff --git a/src/freertos_drivers/common/DeviceBuffer.hxx b/src/freertos_drivers/common/DeviceBuffer.hxx index ac7d70688..5cf4e6e83 100644 --- a/src/freertos_drivers/common/DeviceBuffer.hxx +++ b/src/freertos_drivers/common/DeviceBuffer.hxx @@ -44,7 +44,7 @@ #include "utils/macros.h" #ifdef OPENMRN_FEATURE_DEVTAB -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #endif // OPENMRN_FEATURE_DEVTAB /** Helper for DeviceBuffer which allows for methods to not be inlined. diff --git a/src/freertos_drivers/common/DeviceFile.cxx b/src/freertos_drivers/common/DeviceFile.cxx index 3f81eb2fd..5dec3bdd2 100644 --- a/src/freertos_drivers/common/DeviceFile.cxx +++ b/src/freertos_drivers/common/DeviceFile.cxx @@ -31,7 +31,7 @@ * @date 16 July 2016 */ -#include "DeviceFile.hxx" +#include "freertos_drivers/common/DeviceFile.hxx" #include diff --git a/src/freertos_drivers/common/DeviceFile.hxx b/src/freertos_drivers/common/DeviceFile.hxx index 2d1c5fe2b..a465167c8 100644 --- a/src/freertos_drivers/common/DeviceFile.hxx +++ b/src/freertos_drivers/common/DeviceFile.hxx @@ -38,7 +38,7 @@ #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" /** * Base class for implementing block devices and other file drivers which can diff --git a/src/freertos_drivers/common/DummyGPIO.hxx b/src/freertos_drivers/common/DummyGPIO.hxx index 3029726f6..eef4d4ae0 100644 --- a/src/freertos_drivers/common/DummyGPIO.hxx +++ b/src/freertos_drivers/common/DummyGPIO.hxx @@ -35,7 +35,7 @@ #ifndef _FREERTOS_DRIVERS_COMMON_DUMMYGPIO_HXX_ #define _FREERTOS_DRIVERS_COMMON_DUMMYGPIO_HXX_ -#include "GpioWrapper.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" /// GPIO Pin definition structure with no actual pin behind it. All writes to /// this pin will be silently ignored. Reads from this pin will not compile. diff --git a/src/freertos_drivers/common/EEPROM.cxx b/src/freertos_drivers/common/EEPROM.cxx index 33171b430..cb5e3be91 100644 --- a/src/freertos_drivers/common/EEPROM.cxx +++ b/src/freertos_drivers/common/EEPROM.cxx @@ -31,7 +31,7 @@ * @date 22 January 2015 */ -#include "EEPROM.hxx" +#include "freertos_drivers/common/EEPROM.hxx" #include diff --git a/src/freertos_drivers/common/EEPROM.hxx b/src/freertos_drivers/common/EEPROM.hxx index 86c40db66..61124e059 100644 --- a/src/freertos_drivers/common/EEPROM.hxx +++ b/src/freertos_drivers/common/EEPROM.hxx @@ -36,7 +36,7 @@ #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" /** Common base class for all EEPROM access. */ diff --git a/src/freertos_drivers/common/EEPROMEmulation.cxx b/src/freertos_drivers/common/EEPROMEmulation.cxx index 1f371d39f..933fe2119 100644 --- a/src/freertos_drivers/common/EEPROMEmulation.cxx +++ b/src/freertos_drivers/common/EEPROMEmulation.cxx @@ -31,7 +31,7 @@ * @date 24 June 2015 */ -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" #include diff --git a/src/freertos_drivers/common/EEPROMEmulation.hxx b/src/freertos_drivers/common/EEPROMEmulation.hxx index 9631e70f1..c1c8ed279 100644 --- a/src/freertos_drivers/common/EEPROMEmulation.hxx +++ b/src/freertos_drivers/common/EEPROMEmulation.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_COMMON_EEPROMEMULATION_HXX_ #define _FREERTOS_DRIVERS_COMMON_EEPROMEMULATION_HXX_ -#include "EEPROM.hxx" +#include "freertos_drivers/common/EEPROM.hxx" /// Linker-defined symbol where in the memory space (flash) the eeprom /// emulation data starts. diff --git a/src/freertos_drivers/common/EEPROMEmulation_weak.cxx b/src/freertos_drivers/common/EEPROMEmulation_weak.cxx index b7b4aca61..e338f0d4d 100644 --- a/src/freertos_drivers/common/EEPROMEmulation_weak.cxx +++ b/src/freertos_drivers/common/EEPROMEmulation_weak.cxx @@ -31,7 +31,7 @@ * @date 20 Mar 2016 */ -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" // This weak definition was moved out of the compilation unit of eeprom // emulation implementation to prevent GCC from mistakenly optimizing away the diff --git a/src/freertos_drivers/common/FileSystem.cxx b/src/freertos_drivers/common/FileSystem.cxx index 67b19b54a..e4fede23b 100644 --- a/src/freertos_drivers/common/FileSystem.cxx +++ b/src/freertos_drivers/common/FileSystem.cxx @@ -31,7 +31,7 @@ * @date 31 January 2015 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include #include diff --git a/src/freertos_drivers/common/Fileio.cxx b/src/freertos_drivers/common/Fileio.cxx index d6c64b692..a0b7a3a8c 100644 --- a/src/freertos_drivers/common/Fileio.cxx +++ b/src/freertos_drivers/common/Fileio.cxx @@ -31,7 +31,7 @@ * @date 27 December 2012 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include #include diff --git a/src/freertos_drivers/common/FileioWeak.cxx b/src/freertos_drivers/common/FileioWeak.cxx index 0976075fd..7d7d5985e 100644 --- a/src/freertos_drivers/common/FileioWeak.cxx +++ b/src/freertos_drivers/common/FileioWeak.cxx @@ -32,7 +32,7 @@ * @date 18 September 2020 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" // Override both of these symbols in a .cxx file in your application (without // the weak attribute) if you want to change the nuber of open files. diff --git a/src/freertos_drivers/common/FixedQueue.hxx b/src/freertos_drivers/common/FixedQueue.hxx index 5ed018deb..bf03f83dd 100644 --- a/src/freertos_drivers/common/FixedQueue.hxx +++ b/src/freertos_drivers/common/FixedQueue.hxx @@ -37,7 +37,7 @@ #include #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "executor/Notifiable.hxx" /// This structure is safe to use from an interrupt context and a regular diff --git a/src/freertos_drivers/common/I2C.cxx b/src/freertos_drivers/common/I2C.cxx index d08c0249f..143b70522 100644 --- a/src/freertos_drivers/common/I2C.cxx +++ b/src/freertos_drivers/common/I2C.cxx @@ -33,8 +33,8 @@ #include #include -#include "Devtab.hxx" -#include "I2C.hxx" +#include "freertos_drivers/common/Devtab.hxx" +#include "freertos_drivers/common/I2C.hxx" /** Read from a file or device. * @param file file reference for this device diff --git a/src/freertos_drivers/common/I2C.hxx b/src/freertos_drivers/common/I2C.hxx index 9a3cae37a..1abb0c5e5 100644 --- a/src/freertos_drivers/common/I2C.hxx +++ b/src/freertos_drivers/common/I2C.hxx @@ -36,9 +36,9 @@ -#include "BlockOrWakeUp.hxx" -#include "SimpleLog.hxx" -#include "Devtab.hxx" +#include "freertos_drivers/common/BlockOrWakeUp.hxx" +#include "freertos_drivers/common/SimpleLog.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "nmranet_config.h" #include "os/OS.hxx" #include "i2c.h" diff --git a/src/freertos_drivers/common/LoggingGPIO.hxx b/src/freertos_drivers/common/LoggingGPIO.hxx index adf4de990..503a625cd 100644 --- a/src/freertos_drivers/common/LoggingGPIO.hxx +++ b/src/freertos_drivers/common/LoggingGPIO.hxx @@ -35,7 +35,7 @@ #ifndef _FREERTOS_DRIVERS_COMMON_LOGGINGGPIO_HXX_ #define _FREERTOS_DRIVERS_COMMON_LOGGINGGPIO_HXX_ -#include "GpioWrapper.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" /// GPIO Pin definition structure with no actual pin behind it. All writes to /// this pin will be logged to stdout. Reads from this pin will not compile. diff --git a/src/freertos_drivers/common/MCAN.cxx b/src/freertos_drivers/common/MCAN.cxx index c5dfee94c..f6bec54ff 100644 --- a/src/freertos_drivers/common/MCAN.cxx +++ b/src/freertos_drivers/common/MCAN.cxx @@ -35,7 +35,7 @@ #define _DEFAULT_SOURCE #endif -#include "MCAN.hxx" +#include "freertos_drivers/common/MCAN.hxx" #include #include diff --git a/src/freertos_drivers/common/MCAN.hxx b/src/freertos_drivers/common/MCAN.hxx index 8f40c287a..32e26abbf 100644 --- a/src/freertos_drivers/common/MCAN.hxx +++ b/src/freertos_drivers/common/MCAN.hxx @@ -38,8 +38,8 @@ #include #include "Can.hxx" -#include "DummyGPIO.hxx" -#include "SPI.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "os/Gpio.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/common/MCP2515Can.cxx b/src/freertos_drivers/common/MCP2515Can.cxx index 7b6df878d..aad17d5cf 100644 --- a/src/freertos_drivers/common/MCP2515Can.cxx +++ b/src/freertos_drivers/common/MCP2515Can.cxx @@ -33,7 +33,7 @@ #define _DEFAULT_SOURCE -#include "MCP2515Can.hxx" +#include "freertos_drivers/common/MCP2515Can.hxx" #include #include diff --git a/src/freertos_drivers/common/MCP2515Can.hxx b/src/freertos_drivers/common/MCP2515Can.hxx index 1e65094a0..47d6821b0 100644 --- a/src/freertos_drivers/common/MCP2515Can.hxx +++ b/src/freertos_drivers/common/MCP2515Can.hxx @@ -38,7 +38,7 @@ #include #include "Can.hxx" -#include "SPI.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "os/Gpio.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/common/Node.cxx b/src/freertos_drivers/common/Node.cxx index 585d13b95..0e6752d1c 100644 --- a/src/freertos_drivers/common/Node.cxx +++ b/src/freertos_drivers/common/Node.cxx @@ -31,7 +31,7 @@ * @date 31 January 2015 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include #include diff --git a/src/freertos_drivers/common/Null.cxx b/src/freertos_drivers/common/Null.cxx index cc2df0701..d336e91fb 100644 --- a/src/freertos_drivers/common/Null.cxx +++ b/src/freertos_drivers/common/Null.cxx @@ -31,7 +31,7 @@ * @date 31 January 2015 */ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include diff --git a/src/freertos_drivers/common/PCA9685PWM.cxx b/src/freertos_drivers/common/PCA9685PWM.cxx index 22f0b0e11..08ead6b6a 100644 --- a/src/freertos_drivers/common/PCA9685PWM.cxx +++ b/src/freertos_drivers/common/PCA9685PWM.cxx @@ -31,7 +31,7 @@ * @date 6 January 2018 */ -#include "PCA9685PWM.hxx" +#include "freertos_drivers/common/PCA9685PWM.hxx" // // entry() diff --git a/src/freertos_drivers/common/PCA9685PWM.hxx b/src/freertos_drivers/common/PCA9685PWM.hxx index 506638099..41b9caa03 100644 --- a/src/freertos_drivers/common/PCA9685PWM.hxx +++ b/src/freertos_drivers/common/PCA9685PWM.hxx @@ -37,7 +37,7 @@ #include "i2c.h" #include "i2c-dev.h" -#include "PWM.hxx" +#include "freertos_drivers/common/PWM.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/common/Pipe.cxx b/src/freertos_drivers/common/Pipe.cxx index c56f3c091..57a7b915b 100644 --- a/src/freertos_drivers/common/Pipe.cxx +++ b/src/freertos_drivers/common/Pipe.cxx @@ -35,7 +35,7 @@ #include #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "utils/constants.hxx" #include "utils/RingBuffer.hxx" diff --git a/src/freertos_drivers/common/Railcom.hxx b/src/freertos_drivers/common/Railcom.hxx index ecabfde77..a0b3057cb 100644 --- a/src/freertos_drivers/common/Railcom.hxx +++ b/src/freertos_drivers/common/Railcom.hxx @@ -61,9 +61,9 @@ #error must define either TIVADCC_TIVA or TIVADCC_CC3200 #endif -#include "TivaDCC.hxx" // for FixedQueue +#include "freertos_drivers/ti/TivaDCC.hxx" -#include "RailcomDriver.hxx" +#include "freertos_drivers/common/RailcomDriver.hxx" #include "dcc/RailCom.hxx" /* diff --git a/src/freertos_drivers/common/RamDisk.hxx b/src/freertos_drivers/common/RamDisk.hxx index 3ac7cdced..02cea8316 100644 --- a/src/freertos_drivers/common/RamDisk.hxx +++ b/src/freertos_drivers/common/RamDisk.hxx @@ -35,7 +35,7 @@ #define _FREERTOS_DRIVERS_COMMON_RAMDISK_HXX_ #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" /// A simple device driver that reads/write data from a block of memory in RAM. /// diff --git a/src/freertos_drivers/common/SN74HC595GPO.cxx b/src/freertos_drivers/common/SN74HC595GPO.cxx index 6c8db00cc..dcb126ece 100644 --- a/src/freertos_drivers/common/SN74HC595GPO.cxx +++ b/src/freertos_drivers/common/SN74HC595GPO.cxx @@ -33,5 +33,5 @@ * @date 23 February 2020 */ -#include "SN74HC595GPO.hxx" +#include "freertos_drivers/common/SN74HC595GPO.hxx" diff --git a/src/freertos_drivers/common/SN74HC595GPO.hxx b/src/freertos_drivers/common/SN74HC595GPO.hxx index 71ac0ad53..703caf8ab 100644 --- a/src/freertos_drivers/common/SN74HC595GPO.hxx +++ b/src/freertos_drivers/common/SN74HC595GPO.hxx @@ -42,7 +42,7 @@ #include #include -#include "SPI.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "os/Gpio.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/common/SPI.cxx b/src/freertos_drivers/common/SPI.cxx index 1cef35765..b70ab9a90 100644 --- a/src/freertos_drivers/common/SPI.cxx +++ b/src/freertos_drivers/common/SPI.cxx @@ -37,8 +37,8 @@ #include #include -#include "Devtab.hxx" -#include "SPI.hxx" +#include "freertos_drivers/common/Devtab.hxx" +#include "freertos_drivers/common/SPI.hxx" /** Conduct multiple message transfers with one stop at the end. * @param msgs array of messages to transfer diff --git a/src/freertos_drivers/common/SPI.hxx b/src/freertos_drivers/common/SPI.hxx index 58319a21d..fa3c49003 100644 --- a/src/freertos_drivers/common/SPI.hxx +++ b/src/freertos_drivers/common/SPI.hxx @@ -37,9 +37,9 @@ #include #include -#include "BlockOrWakeUp.hxx" -#include "SimpleLog.hxx" -#include "Devtab.hxx" +#include "freertos_drivers/common/BlockOrWakeUp.hxx" +#include "freertos_drivers/common/SimpleLog.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "nmranet_config.h" #include "os/OS.hxx" #include "spi/spidev.h" diff --git a/src/freertos_drivers/common/Select.cxx b/src/freertos_drivers/common/Select.cxx index b98979da0..1de96c234 100644 --- a/src/freertos_drivers/common/Select.cxx +++ b/src/freertos_drivers/common/Select.cxx @@ -34,7 +34,7 @@ #include #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" /** event used to wakeup select calls */ static OSEvent wakeup; diff --git a/src/freertos_drivers/common/Serial.cxx b/src/freertos_drivers/common/Serial.cxx index 02b3c1e1d..7aa081865 100644 --- a/src/freertos_drivers/common/Serial.cxx +++ b/src/freertos_drivers/common/Serial.cxx @@ -33,8 +33,8 @@ #include #include -#include "Devtab.hxx" -#include "Serial.hxx" +#include "freertos_drivers/common/Devtab.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "can_ioctl.h" /** Flush the receive and transmit buffers for this device. diff --git a/src/freertos_drivers/common/Serial.hxx b/src/freertos_drivers/common/Serial.hxx index c1f2a5acf..8deffcd4f 100644 --- a/src/freertos_drivers/common/Serial.hxx +++ b/src/freertos_drivers/common/Serial.hxx @@ -34,12 +34,12 @@ #ifndef _FREERTOS_DRIVERS_COMMON_SERIAL_HXX_ #define _FREERTOS_DRIVERS_COMMON_SERIAL_HXX_ -#include "BlockOrWakeUp.hxx" -#include "SimpleLog.hxx" -#include "Devtab.hxx" +#include "freertos_drivers/common/BlockOrWakeUp.hxx" +#include "freertos_drivers/common/SimpleLog.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "nmranet_config.h" #include "os/OS.hxx" -#include "DeviceBuffer.hxx" +#include "freertos_drivers/common/DeviceBuffer.hxx" /** Private data for a serial device */ class Serial : public Node diff --git a/src/freertos_drivers/common/Socket.cxx b/src/freertos_drivers/common/Socket.cxx index 870a87cc8..7dcfcde71 100644 --- a/src/freertos_drivers/common/Socket.cxx +++ b/src/freertos_drivers/common/Socket.cxx @@ -36,8 +36,8 @@ #include #include -#include "Devtab.hxx" -#include "Socket.hxx" +#include "freertos_drivers/common/Devtab.hxx" +#include "freertos_drivers/common/Socket.hxx" #include "can_ioctl.h" /** Read from a file or device. diff --git a/src/freertos_drivers/common/Socket.hxx b/src/freertos_drivers/common/Socket.hxx index c8f57dadf..7b0e1491b 100644 --- a/src/freertos_drivers/common/Socket.hxx +++ b/src/freertos_drivers/common/Socket.hxx @@ -34,9 +34,9 @@ #ifndef _FREERTOS_DRIVERS_COMMON_SOCKET_HXX_ #define _FREERTOS_DRIVERS_COMMON_SOCKET_HXX_ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "os/OS.hxx" -#include "DeviceBuffer.hxx" +#include "freertos_drivers/common/DeviceBuffer.hxx" #include diff --git a/src/freertos_drivers/common/TCAN4550Can.cxx b/src/freertos_drivers/common/TCAN4550Can.cxx index 1693837b5..940fd2585 100644 --- a/src/freertos_drivers/common/TCAN4550Can.cxx +++ b/src/freertos_drivers/common/TCAN4550Can.cxx @@ -35,7 +35,7 @@ #define _DEFAULT_SOURCE #endif -#include "TCAN4550Can.hxx" +#include "freertos_drivers/common/TCAN4550Can.hxx" #include #include diff --git a/src/freertos_drivers/common/TCAN4550Can.hxx b/src/freertos_drivers/common/TCAN4550Can.hxx index 6dcfe5165..26f4bf0c9 100644 --- a/src/freertos_drivers/common/TCAN4550Can.hxx +++ b/src/freertos_drivers/common/TCAN4550Can.hxx @@ -35,8 +35,8 @@ #define _FREERTOS_DRIVERS_COMMON_TCAN4550CAN_HXX_ #include "Can.hxx" -#include "DummyGPIO.hxx" -#include "SPI.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "os/Gpio.hxx" #include "os/OS.hxx" diff --git a/src/freertos_drivers/esp32/Esp32HardwareI2C.cxx b/src/freertos_drivers/esp32/Esp32HardwareI2C.cxx index 58600b553..f47f42f87 100644 --- a/src/freertos_drivers/esp32/Esp32HardwareI2C.cxx +++ b/src/freertos_drivers/esp32/Esp32HardwareI2C.cxx @@ -35,7 +35,7 @@ #if defined(ESP_PLATFORM) -#include "Esp32HardwareI2C.hxx" +#include "freertos_drivers/esp32/Esp32HardwareI2C.hxx" // stropts.h must be included before i2c.h #include "stropts.h" #include "i2c.h" diff --git a/src/freertos_drivers/esp32/Esp32Ledc.cxx b/src/freertos_drivers/esp32/Esp32Ledc.cxx index 558147a43..530e0c5ec 100644 --- a/src/freertos_drivers/esp32/Esp32Ledc.cxx +++ b/src/freertos_drivers/esp32/Esp32Ledc.cxx @@ -35,7 +35,7 @@ // Ensure we only compile this code for the ESP32 family of MCUs. #if defined(ESP_PLATFORM) -#include "Esp32Ledc.hxx" +#include "freertos_drivers/esp32/Esp32Ledc.hxx" #include namespace openmrn_arduino diff --git a/src/freertos_drivers/esp32/Esp32WiFiManager.cxx b/src/freertos_drivers/esp32/Esp32WiFiManager.cxx index 98c4e5d67..c0713de3f 100644 --- a/src/freertos_drivers/esp32/Esp32WiFiManager.cxx +++ b/src/freertos_drivers/esp32/Esp32WiFiManager.cxx @@ -35,7 +35,7 @@ // Ensure we only compile this code for ESP32 MCUs #ifdef ESP_PLATFORM -#include "Esp32WiFiManager.hxx" +#include "freertos_drivers/esp32/Esp32WiFiManager.hxx" #include "openlcb/SimpleStack.hxx" #include "openlcb/TcpDefs.hxx" #include "os/MDNS.hxx" diff --git a/src/freertos_drivers/net_cc32xx/CC32xxSocket.cxx b/src/freertos_drivers/net_cc32xx/CC32xxSocket.cxx index 51ae25256..635b9b826 100644 --- a/src/freertos_drivers/net_cc32xx/CC32xxSocket.cxx +++ b/src/freertos_drivers/net_cc32xx/CC32xxSocket.cxx @@ -33,9 +33,9 @@ #define SUPPORT_SL_R1_API -#include "CC32xxSocket.hxx" -#include "CC32xxWiFi.hxx" -#include "CC32xxHelper.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxSocket.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/ti/CC32xxHelper.hxx" #include #include diff --git a/src/freertos_drivers/net_cc32xx/CC32xxSocket.hxx b/src/freertos_drivers/net_cc32xx/CC32xxSocket.hxx index 7392d1c82..fc7845245 100644 --- a/src/freertos_drivers/net_cc32xx/CC32xxSocket.hxx +++ b/src/freertos_drivers/net_cc32xx/CC32xxSocket.hxx @@ -31,7 +31,7 @@ * @date 18 March 2016 */ -#include "Socket.hxx" +#include "freertos_drivers/common/Socket.hxx" #include diff --git a/src/freertos_drivers/net_cc32xx/CC32xxWiFi.cxx b/src/freertos_drivers/net_cc32xx/CC32xxWiFi.cxx index 97c966caf..232478f46 100644 --- a/src/freertos_drivers/net_cc32xx/CC32xxWiFi.cxx +++ b/src/freertos_drivers/net_cc32xx/CC32xxWiFi.cxx @@ -35,8 +35,8 @@ #define SUPPORT_SL_R1_API -#include "CC32xxWiFi.hxx" -#include "CC32xxSocket.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxSocket.hxx" #include "freertos_drivers/common/WifiDefs.hxx" #include "freertos_drivers/ti/CC32xxHelper.hxx" diff --git a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCP.cxx b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCP.cxx index ec41a0fc3..4e9ee8116 100644 --- a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCP.cxx +++ b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCP.cxx @@ -44,8 +44,8 @@ #include "FreeRTOS_IP.h" #include "FreeRTOS_Sockets.h" -#include "FreeRTOSTCP.hxx" -#include "FreeRTOSTCPSocket.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCP.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx" static SocketSet_t socket_set = NULL; diff --git a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.cxx b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.cxx index b4bb1010b..7fd8a9c85 100644 --- a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.cxx +++ b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.cxx @@ -47,8 +47,8 @@ #include "FreeRTOS_IP.h" #include "FreeRTOS_Sockets.h" -#include "FreeRTOSTCPSocket.hxx" -#include "FreeRTOSTCP.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx" +#include "freertos_drivers/net_freertos_tcp/FreeRTOSTCP.hxx" static FreeRTOSTCPSocket *FreeRTOSTCPSockets[MAX_SOCKETS]; diff --git a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx index c28ba7641..040aab3d1 100644 --- a/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx +++ b/src/freertos_drivers/net_freertos_tcp/FreeRTOSTCPSocket.hxx @@ -31,7 +31,7 @@ * @date 21 March 2016 */ -#include "Socket.hxx" +#include "freertos_drivers/common/Socket.hxx" #include diff --git a/src/freertos_drivers/nxp/11CXX_rom_can.c b/src/freertos_drivers/nxp/11CXX_rom_can.c index fae96682b..79c56f9e9 100644 --- a/src/freertos_drivers/nxp/11CXX_rom_can.c +++ b/src/freertos_drivers/nxp/11CXX_rom_can.c @@ -35,7 +35,7 @@ #ifdef TARGET_LPC11Cxx -#include "11CXX_rom_driver_CAN.h" +#include "freertos_drivers/nxp/11CXX_rom_driver_CAN.h" #include "can.h" typedef struct _ROM { diff --git a/src/freertos_drivers/nxp/11cxx_async_can.cxx b/src/freertos_drivers/nxp/11cxx_async_can.cxx index 35cb3ab63..162f48dc5 100644 --- a/src/freertos_drivers/nxp/11cxx_async_can.cxx +++ b/src/freertos_drivers/nxp/11cxx_async_can.cxx @@ -34,7 +34,7 @@ #ifdef TARGET_LPC11Cxx -#include "11CXX_rom_driver_CAN.h" +#include "freertos_drivers/nxp/11CXX_rom_driver_CAN.h" #include "nmranet_config.h" #include "executor/StateFlow.hxx" diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxCan.cxx b/src/freertos_drivers/nxp/Lpc17xx40xxCan.cxx index 86cd981be..b7dad10d2 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxCan.cxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxCan.cxx @@ -34,7 +34,7 @@ #include -#include "Lpc17xx40xxCan.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxCan.hxx" #include "chip.h" #include "nmranet_config.h" diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx index cf075701e..a222bf1f8 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx @@ -31,7 +31,7 @@ * @date 15 June 2015 */ -#include "Lpc17xx40xxEEPROMEmulation.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx" #include diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx index 4ae294263..253cb07e4 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_NXP_LPC17xx40xxEEPROMEMULATION_HXX_ #define _FREERTOS_DRIVERS_NXP_LPC17xx40xxEEPROMEMULATION_HXX_ -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" /** Emulates EEPROM in FLASH for the LPC17xx and LPC40xx platforms. * The EEPROM file size is limited to the @ref SECTOR_SIZE / 2. diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx b/src/freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx index b2f9ac254..81ba1d0e8 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxGPIO.hxx @@ -41,7 +41,7 @@ #include "gpio_17xx_40xx.h" #include "iocon_17xx_40xx.h" #include "os/Gpio.hxx" -#include "GpioWrapper.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" /// Static GPIO implementation for the NXP LPC microcontrollers. /// @param PORT is the port number (like 0, 1, 2). E.g. for P1.12 this is 1. diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxUart.cxx b/src/freertos_drivers/nxp/Lpc17xx40xxUart.cxx index 478dba64a..0417b6a50 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxUart.cxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxUart.cxx @@ -32,7 +32,7 @@ * @date 9 April 2015 */ -#include "Lpc17xx40xxUart.hxx" +#include "freertos_drivers/nxp/Lpc17xx40xxUart.hxx" #include diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxUart.hxx b/src/freertos_drivers/nxp/Lpc17xx40xxUart.hxx index ce4a4ee4b..61ba2565f 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxUart.hxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxUart.hxx @@ -37,7 +37,7 @@ #include -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "cmsis.h" #if defined (CHIP_LPC175X_6X) diff --git a/src/freertos_drivers/nxp/mbed_async_usbserial.cxx b/src/freertos_drivers/nxp/mbed_async_usbserial.cxx index a6d9834d2..94d9da2e0 100644 --- a/src/freertos_drivers/nxp/mbed_async_usbserial.cxx +++ b/src/freertos_drivers/nxp/mbed_async_usbserial.cxx @@ -34,7 +34,7 @@ #include "mbed.h" #include "USBSerial.h" -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "os/os.h" #include "utils/macros.h" #include "portmacro.h" diff --git a/src/freertos_drivers/pic32mx/Pic32mxCan.cxx b/src/freertos_drivers/pic32mx/Pic32mxCan.cxx index f1bcaccd4..d9302b4a3 100644 --- a/src/freertos_drivers/pic32mx/Pic32mxCan.cxx +++ b/src/freertos_drivers/pic32mx/Pic32mxCan.cxx @@ -35,7 +35,7 @@ #include "freertos_drivers/pic32mx/Pic32mxCan.hxx" -#include "DeviceBuffer.hxx" +#include "freertos_drivers/common/DeviceBuffer.hxx" #include "nmranet_config.h" #include "can_frame.h" #include diff --git a/src/freertos_drivers/pic32mx/Pic32mxCan.hxx b/src/freertos_drivers/pic32mx/Pic32mxCan.hxx index ebf17852d..93745b804 100644 --- a/src/freertos_drivers/pic32mx/Pic32mxCan.hxx +++ b/src/freertos_drivers/pic32mx/Pic32mxCan.hxx @@ -35,7 +35,7 @@ #ifndef _FREERTOS_DRIVERS_PIC32MX_PIC32MXCAN_HXX_ #define _FREERTOS_DRIVERS_PIC32MX_PIC32MXCAN_HXX_ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "GenericTypeDefs.h" #include diff --git a/src/freertos_drivers/pic32mx/Pic32mxUart.hxx b/src/freertos_drivers/pic32mx/Pic32mxUart.hxx index 8daed90e7..ab096d5bf 100644 --- a/src/freertos_drivers/pic32mx/Pic32mxUart.hxx +++ b/src/freertos_drivers/pic32mx/Pic32mxUart.hxx @@ -36,7 +36,7 @@ #ifndef _FREERTOS_DRIVERS_PIC32MX_PIC32MXUART_HXX_ #define _FREERTOS_DRIVERS_PIC32MX_PIC32MXUART_HXX_ -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "peripheral/uart.h" extern "C" diff --git a/src/freertos_drivers/spiffs/SPIFFS.cxx b/src/freertos_drivers/spiffs/SPIFFS.cxx index c48ee7882..c82884a87 100644 --- a/src/freertos_drivers/spiffs/SPIFFS.cxx +++ b/src/freertos_drivers/spiffs/SPIFFS.cxx @@ -31,7 +31,7 @@ * @date 1 January 2018 */ -#include "SPIFFS.hxx" +#include "freertos_drivers/spiffs/SPIFFS.hxx" #include diff --git a/src/freertos_drivers/spiffs/SPIFFS.hxx b/src/freertos_drivers/spiffs/SPIFFS.hxx index 85f5d2b8e..bfac88ef4 100644 --- a/src/freertos_drivers/spiffs/SPIFFS.hxx +++ b/src/freertos_drivers/spiffs/SPIFFS.hxx @@ -36,7 +36,7 @@ #include -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "utils/Atomic.hxx" extern "C" { diff --git a/src/freertos_drivers/spiffs/cc32x0sf/CC32x0SFSPIFFS.cxx b/src/freertos_drivers/spiffs/cc32x0sf/CC32x0SFSPIFFS.cxx index 77aee9694..86823a12a 100644 --- a/src/freertos_drivers/spiffs/cc32x0sf/CC32x0SFSPIFFS.cxx +++ b/src/freertos_drivers/spiffs/cc32x0sf/CC32x0SFSPIFFS.cxx @@ -43,7 +43,7 @@ #include "driverlib/rom.h" #include "driverlib/cpu.h" -#include "CC32x0SFSPIFFS.hxx" +#include "freertos_drivers/spiffs/cc32x0sf/CC32x0SFSPIFFS.hxx" #include "../cc32x0sf/TiSPIFFSImpl.hxx" /// Explicit instantion of the template so that the functions get compiled and diff --git a/src/freertos_drivers/spiffs/cc32x0sf/TiSPIFFSImpl.hxx b/src/freertos_drivers/spiffs/cc32x0sf/TiSPIFFSImpl.hxx index 3d96fe26b..2d4ddb179 100644 --- a/src/freertos_drivers/spiffs/cc32x0sf/TiSPIFFSImpl.hxx +++ b/src/freertos_drivers/spiffs/cc32x0sf/TiSPIFFSImpl.hxx @@ -35,7 +35,7 @@ #include "utils/logging.h" -#include "TiSPIFFS.hxx" +#include "freertos_drivers/spiffs/cc32x0sf/TiSPIFFS.hxx" #include "freertos_drivers/ti/TiFlash.hxx" #include "spiffs.h" diff --git a/src/freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.cxx b/src/freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.cxx index 5ab80be6b..a144d240d 100644 --- a/src/freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.cxx +++ b/src/freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.cxx @@ -33,7 +33,7 @@ * @date 13 July 2019 */ -#include "Stm32SPIFFS.hxx" +#include "freertos_drivers/spiffs/stm32f7/Stm32SPIFFS.hxx" #include "spiffs.h" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/spiffs/tm4c129/TM4C129xSPIFFS.cxx b/src/freertos_drivers/spiffs/tm4c129/TM4C129xSPIFFS.cxx index 79696e36b..4c0d1627e 100644 --- a/src/freertos_drivers/spiffs/tm4c129/TM4C129xSPIFFS.cxx +++ b/src/freertos_drivers/spiffs/tm4c129/TM4C129xSPIFFS.cxx @@ -44,7 +44,7 @@ #include "driverlib/rom_map.h" #include "driverlib/cpu.h" -#include "TM4C129xSPIFFS.hxx" +#include "freertos_drivers/spiffs/tm4c129/TM4C129xSPIFFS.hxx" #include "../cc32x0sf/TiSPIFFSImpl.hxx" /// Explicit instantion of the template so that the functions get compiled and diff --git a/src/freertos_drivers/st/Stm32Can.cxx b/src/freertos_drivers/st/Stm32Can.cxx index ff3b36cdd..f5d1ba043 100644 --- a/src/freertos_drivers/st/Stm32Can.cxx +++ b/src/freertos_drivers/st/Stm32Can.cxx @@ -33,7 +33,7 @@ #if (!defined(ARDUINO)) || defined(ARDUINO_ARCH_STM32) -#include "Stm32Can.hxx" +#include "freertos_drivers/st/Stm32Can.hxx" #include diff --git a/src/freertos_drivers/st/Stm32DCCDecoder.hxx b/src/freertos_drivers/st/Stm32DCCDecoder.hxx index 71f72ee37..00fdcf8e9 100644 --- a/src/freertos_drivers/st/Stm32DCCDecoder.hxx +++ b/src/freertos_drivers/st/Stm32DCCDecoder.hxx @@ -33,7 +33,7 @@ */ #include "FreeRTOSConfig.h" -#include "Stm32Gpio.hxx" // for pin definitions +#include "freertos_drivers/st/Stm32Gpio.hxx" #include "freertos_drivers/common/DccDecoder.hxx" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32EEPROMEmulation.cxx b/src/freertos_drivers/st/Stm32EEPROMEmulation.cxx index 035f50656..f9f1983ef 100644 --- a/src/freertos_drivers/st/Stm32EEPROMEmulation.cxx +++ b/src/freertos_drivers/st/Stm32EEPROMEmulation.cxx @@ -31,7 +31,7 @@ * @date 24 June 2015 */ -#include "Stm32EEPROMEmulation.hxx" +#include "freertos_drivers/st/Stm32EEPROMEmulation.hxx" #include diff --git a/src/freertos_drivers/st/Stm32EEPROMEmulation.hxx b/src/freertos_drivers/st/Stm32EEPROMEmulation.hxx index 13c1aafdb..c5f7cd6a1 100644 --- a/src/freertos_drivers/st/Stm32EEPROMEmulation.hxx +++ b/src/freertos_drivers/st/Stm32EEPROMEmulation.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_ST_STM32F0xxEEPROMEMULATION_HXX_ #define _FREERTOS_DRIVERS_ST_STM32F0xxEEPROMEMULATION_HXX_ -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" /** Emulates EEPROM in FLASH for the STM32F0xx platform. The EEPROM file size * is limited to the @ref SECTOR_SIZE / 2. For the STM32, the erase size is diff --git a/src/freertos_drivers/st/Stm32Gpio.hxx b/src/freertos_drivers/st/Stm32Gpio.hxx index 352fe064a..f80bafde3 100644 --- a/src/freertos_drivers/st/Stm32Gpio.hxx +++ b/src/freertos_drivers/st/Stm32Gpio.hxx @@ -36,7 +36,7 @@ #ifndef _FREERTOS_DRIVERS_ST_STM32GPIO_HXX_ #define _FREERTOS_DRIVERS_ST_STM32GPIO_HXX_ -#include "GpioWrapper.hxx" +#include "freertos_drivers/common/GpioWrapper.hxx" #include "os/Gpio.hxx" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32I2C.cxx b/src/freertos_drivers/st/Stm32I2C.cxx index f732845a5..084b41d63 100644 --- a/src/freertos_drivers/st/Stm32I2C.cxx +++ b/src/freertos_drivers/st/Stm32I2C.cxx @@ -33,7 +33,7 @@ * @date 28 Oct 2018 */ -#include "Stm32I2C.hxx" +#include "freertos_drivers/st/Stm32I2C.hxx" #if defined(STM32F072xB) || defined(STM32F091xC) #include "stm32f0xx_ll_rcc.h" diff --git a/src/freertos_drivers/st/Stm32I2C.hxx b/src/freertos_drivers/st/Stm32I2C.hxx index 062ba81cd..bf1502e08 100644 --- a/src/freertos_drivers/st/Stm32I2C.hxx +++ b/src/freertos_drivers/st/Stm32I2C.hxx @@ -36,7 +36,7 @@ #ifndef _FREERTOS_DRIVERS_ST_STM32I2C_HXX_ #define _FREERTOS_DRIVERS_ST_STM32I2C_HXX_ -#include "I2C.hxx" +#include "freertos_drivers/common/I2C.hxx" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32PWM.hxx b/src/freertos_drivers/st/Stm32PWM.hxx index e5ef3e798..ee491d5bb 100644 --- a/src/freertos_drivers/st/Stm32PWM.hxx +++ b/src/freertos_drivers/st/Stm32PWM.hxx @@ -34,7 +34,7 @@ #ifndef _FREEERTOS_DRIVERS_ST_STM32PWM_HXX_ #define _FREEERTOS_DRIVERS_ST_STM32PWM_HXX_ -#include "PWM.hxx" +#include "freertos_drivers/common/PWM.hxx" #include "utils/Uninitialized.hxx" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32SPI.cxx b/src/freertos_drivers/st/Stm32SPI.cxx index 8ae000e60..18c710189 100644 --- a/src/freertos_drivers/st/Stm32SPI.cxx +++ b/src/freertos_drivers/st/Stm32SPI.cxx @@ -33,7 +33,7 @@ * @date 29 April 2018 */ -#include "Stm32SPI.hxx" +#include "freertos_drivers/st/Stm32SPI.hxx" #if defined(STM32F072xB) || defined(STM32F091xC) #include "stm32f0xx_ll_rcc.h" diff --git a/src/freertos_drivers/st/Stm32SPI.hxx b/src/freertos_drivers/st/Stm32SPI.hxx index 33154da2e..a6bd937a8 100644 --- a/src/freertos_drivers/st/Stm32SPI.hxx +++ b/src/freertos_drivers/st/Stm32SPI.hxx @@ -36,7 +36,7 @@ #ifndef _FREERTOS_DRIVERS_ST_STM32SPI_HXX_ #define _FREERTOS_DRIVERS_ST_STM32SPI_HXX_ -#include "SPI.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32Uart.cxx b/src/freertos_drivers/st/Stm32Uart.cxx index 149d27229..48fe13d52 100644 --- a/src/freertos_drivers/st/Stm32Uart.cxx +++ b/src/freertos_drivers/st/Stm32Uart.cxx @@ -33,7 +33,7 @@ * @date August 27, 2023 */ -#include "Stm32Uart.hxx" +#include "freertos_drivers/st/Stm32Uart.hxx" #include "freertos/tc_ioctl.h" #include "stm32f_hal_conf.hxx" diff --git a/src/freertos_drivers/st/Stm32Uart.hxx b/src/freertos_drivers/st/Stm32Uart.hxx index 15b250d39..d9a0f89e3 100644 --- a/src/freertos_drivers/st/Stm32Uart.hxx +++ b/src/freertos_drivers/st/Stm32Uart.hxx @@ -38,7 +38,7 @@ #include "stm32f_hal_conf.hxx" -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #if defined (STM32F030x6) || defined (STM32F031x6) || defined (STM32F038xx) #define NUM_USART 1 diff --git a/src/freertos_drivers/st/stm32f_hal_conf.hxx b/src/freertos_drivers/st/stm32f_hal_conf.hxx index 31d2aa898..6eec7a704 100644 --- a/src/freertos_drivers/st/stm32f_hal_conf.hxx +++ b/src/freertos_drivers/st/stm32f_hal_conf.hxx @@ -40,17 +40,17 @@ defined(STM32F070x6) || defined(STM32F070xB) || defined(STM32F071xB) || \ defined(STM32F072xB) || defined(STM32F078xx) || defined(STM32F091xC) || \ defined(STM32F098xx) -#include "stm32f0xx_hal_conf.h" +#include "freertos_drivers/st/stm32f0xx_hal_conf.h" #elif defined(STM32F103xB) -#include "stm32f1xx_hal_conf.h" +#include "freertos_drivers/st/stm32f1xx_hal_conf.h" #elif defined(STM32F303xC) || defined(STM32F303xE) -#include "stm32f3xx_hal_conf.h" +#include "freertos_drivers/st/stm32f3xx_hal_conf.h" #elif defined(STM32F767xx) -#include "stm32f7xx_hal_conf.h" +#include "freertos_drivers/st/stm32f7xx_hal_conf.h" #elif defined(STM32L432xx) || defined(STM32L431xx) -#include "stm32l4xx_hal_conf.h" +#include "freertos_drivers/st/stm32l4xx_hal_conf.h" #elif defined(STM32G0B1xx) -#include "stm32g0xx_hal_conf.h" +#include "freertos_drivers/st/stm32g0xx_hal_conf.h" #else #error "STM32F_HAL_CONF unsupported STM32 device" #endif diff --git a/src/freertos_drivers/ti/CC32xxDeviceFile.cxx b/src/freertos_drivers/ti/CC32xxDeviceFile.cxx index eb2a8b75d..1b9842cc9 100644 --- a/src/freertos_drivers/ti/CC32xxDeviceFile.cxx +++ b/src/freertos_drivers/ti/CC32xxDeviceFile.cxx @@ -33,8 +33,8 @@ #define SUPPORT_SL_R1_API -#include "CC32xxDeviceFile.hxx" -#include "CC32xxHelper.hxx" +#include "freertos_drivers/ti/CC32xxDeviceFile.hxx" +#include "freertos_drivers/ti/CC32xxHelper.hxx" #include diff --git a/src/freertos_drivers/ti/CC32xxDeviceFile.hxx b/src/freertos_drivers/ti/CC32xxDeviceFile.hxx index 8252beb13..695bf44db 100644 --- a/src/freertos_drivers/ti/CC32xxDeviceFile.hxx +++ b/src/freertos_drivers/ti/CC32xxDeviceFile.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_TI_CC32XXDEVICEFILE_HXX_ #define _FREERTOS_DRIVERS_TI_CC32XXDEVICEFILE_HXX_ -#include "DeviceFile.hxx" +#include "freertos_drivers/common/DeviceFile.hxx" /** Common base class for all CC32xxDeviceFile access. */ diff --git a/src/freertos_drivers/ti/CC32xxEEPROMEmulation.hxx b/src/freertos_drivers/ti/CC32xxEEPROMEmulation.hxx index 6d77ebf99..5f1d0266d 100644 --- a/src/freertos_drivers/ti/CC32xxEEPROMEmulation.hxx +++ b/src/freertos_drivers/ti/CC32xxEEPROMEmulation.hxx @@ -35,7 +35,7 @@ #define _FREERTOS_DRIVERS_TI_CC32XXEEPROMEMULATION_HXX_ //#define FLASH_SIZE CC32xx_EEPROM_SIZE -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" #include "freertos_drivers/ti/CC32xxHelper.hxx" /** Emulates EEPROM in SPI-FLASH for the CC32xx platform. diff --git a/src/freertos_drivers/ti/CC32xxSPI.cxx b/src/freertos_drivers/ti/CC32xxSPI.cxx index 356a9c3e6..909c87cf6 100644 --- a/src/freertos_drivers/ti/CC32xxSPI.cxx +++ b/src/freertos_drivers/ti/CC32xxSPI.cxx @@ -31,7 +31,7 @@ * @date 30 May 2016 */ -#include "CC32xxSPI.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" #include #include diff --git a/src/freertos_drivers/ti/CC32xxSPI.hxx b/src/freertos_drivers/ti/CC32xxSPI.hxx index c8476b780..f006263e4 100644 --- a/src/freertos_drivers/ti/CC32xxSPI.hxx +++ b/src/freertos_drivers/ti/CC32xxSPI.hxx @@ -40,7 +40,7 @@ #include -#include "SPI.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "inc/hw_mcspi.h" #include "inc/hw_types.h" diff --git a/src/freertos_drivers/ti/CC32xxUart.cxx b/src/freertos_drivers/ti/CC32xxUart.cxx index 04abfcd22..c7ddae877 100644 --- a/src/freertos_drivers/ti/CC32xxUart.cxx +++ b/src/freertos_drivers/ti/CC32xxUart.cxx @@ -45,7 +45,7 @@ #include "freertos/tc_ioctl.h" #include "executor/Notifiable.hxx" -#include "CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" /** Instance pointers help us get context from the interrupt handler(s) */ static CC32xxUart *instances[2] = {NULL}; diff --git a/src/freertos_drivers/ti/CC32xxUart.hxx b/src/freertos_drivers/ti/CC32xxUart.hxx index 6f812d48a..042c37ed5 100644 --- a/src/freertos_drivers/ti/CC32xxUart.hxx +++ b/src/freertos_drivers/ti/CC32xxUart.hxx @@ -40,7 +40,7 @@ #include -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "driverlib/uart.h" diff --git a/src/freertos_drivers/ti/Tiva1294Ethernet.cxx b/src/freertos_drivers/ti/Tiva1294Ethernet.cxx index c59ac3e6d..0833d85e4 100644 --- a/src/freertos_drivers/ti/Tiva1294Ethernet.cxx +++ b/src/freertos_drivers/ti/Tiva1294Ethernet.cxx @@ -66,7 +66,7 @@ #include "semphr.h" #include "timers.h" -#include "Tiva1294Ethernet.hxx" +#include "freertos_drivers/ti/Tiva1294Ethernet.hxx" #include "FreeRTOSIPConfig.h" #include "FreeRTOS_IP.h" #include "NetworkInterface.h" diff --git a/src/freertos_drivers/ti/TivaCan.cxx b/src/freertos_drivers/ti/TivaCan.cxx index 45a8a8c74..0ba2ba89e 100644 --- a/src/freertos_drivers/ti/TivaCan.cxx +++ b/src/freertos_drivers/ti/TivaCan.cxx @@ -45,7 +45,7 @@ #include "inc/hw_types.h" #include "nmranet_config.h" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" /** Instance pointers help us get context from the interrupt handler(s) */ static TivaCan *instances[2] = {NULL}; diff --git a/src/freertos_drivers/ti/TivaDCC.hxx b/src/freertos_drivers/ti/TivaDCC.hxx index 29b122afe..008514693 100644 --- a/src/freertos_drivers/ti/TivaDCC.hxx +++ b/src/freertos_drivers/ti/TivaDCC.hxx @@ -58,15 +58,15 @@ #ifdef TIVADCC_TIVA #include "driverlib/sysctl.h" -#include "TivaGPIO.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #else #include "driverlib/prcm.h" #include "driverlib/utils.h" #endif #include "freertos_drivers/common/FixedQueue.hxx" -#include "Devtab.hxx" -#include "RailcomDriver.hxx" +#include "freertos_drivers/common/Devtab.hxx" +#include "freertos_drivers/common/RailcomDriver.hxx" #include "dcc/DccOutput.hxx" #include "dcc/Packet.hxx" #include "dcc/RailCom.hxx" diff --git a/src/freertos_drivers/ti/TivaDCCDecoder.hxx b/src/freertos_drivers/ti/TivaDCCDecoder.hxx index 74203105a..31d319eeb 100644 --- a/src/freertos_drivers/ti/TivaDCCDecoder.hxx +++ b/src/freertos_drivers/ti/TivaDCCDecoder.hxx @@ -32,8 +32,8 @@ * @date 29 Nov 2014 */ -#include "TivaDCC.hxx" // for FixedQueue -#include "TivaGPIO.hxx" // for pin definitions +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/ti/TivaGPIO.hxx" #include "freertos_drivers/common/DccDecoder.hxx" typedef DummyPin PIN_RailcomCutout; diff --git a/src/freertos_drivers/ti/TivaDev.hxx b/src/freertos_drivers/ti/TivaDev.hxx index 080a89840..a9971f7f2 100644 --- a/src/freertos_drivers/ti/TivaDev.hxx +++ b/src/freertos_drivers/ti/TivaDev.hxx @@ -51,9 +51,9 @@ #include "usblib/device/usbdevice.h" #include "usblib/device/usbdcdc.h" -#include "Serial.hxx" +#include "freertos_drivers/common/Serial.hxx" #include "Can.hxx" -#include "I2C.hxx" +#include "freertos_drivers/common/I2C.hxx" /** Private data for this implementation of serial. */ diff --git a/src/freertos_drivers/ti/TivaEEPROMEmulation.cxx b/src/freertos_drivers/ti/TivaEEPROMEmulation.cxx index 4525b4f84..68f09a7c6 100644 --- a/src/freertos_drivers/ti/TivaEEPROMEmulation.cxx +++ b/src/freertos_drivers/ti/TivaEEPROMEmulation.cxx @@ -31,7 +31,7 @@ * @date 21 January 2015 */ -#include "TivaEEPROMEmulation.hxx" +#include "freertos_drivers/ti/TivaEEPROMEmulation.hxx" #include diff --git a/src/freertos_drivers/ti/TivaEEPROMEmulation.hxx b/src/freertos_drivers/ti/TivaEEPROMEmulation.hxx index 6218c2379..950bfe3ca 100644 --- a/src/freertos_drivers/ti/TivaEEPROMEmulation.hxx +++ b/src/freertos_drivers/ti/TivaEEPROMEmulation.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_TI_TIVAEEPROMEMULATION_HXX_ #define _FREERTOS_DRIVERS_TI_TIVAEEPROMEMULATION_HXX_ -#include "EEPROMEmulation.hxx" +#include "freertos_drivers/common/EEPROMEmulation.hxx" #include "driverlib/rom.h" #include "driverlib/rom_map.h" diff --git a/src/freertos_drivers/ti/TivaFlash.cxx b/src/freertos_drivers/ti/TivaFlash.cxx index 4d043baea..7111b4b6f 100644 --- a/src/freertos_drivers/ti/TivaFlash.cxx +++ b/src/freertos_drivers/ti/TivaFlash.cxx @@ -31,7 +31,7 @@ * @date 2 May 2015 */ -#include "TivaFlash.hxx" +#include "freertos_drivers/ti/TivaFlash.hxx" #include "driverlib/rom.h" #include "driverlib/rom_map.h" diff --git a/src/freertos_drivers/ti/TivaFlash.hxx b/src/freertos_drivers/ti/TivaFlash.hxx index 781b719bd..dd1f38b63 100644 --- a/src/freertos_drivers/ti/TivaFlash.hxx +++ b/src/freertos_drivers/ti/TivaFlash.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_TI_TIVAFLASH_HXX_ #define _FREERTOS_DRIVERS_TI_TIVAFLASH_HXX_ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" /** Flash-backed file. * diff --git a/src/freertos_drivers/ti/TivaI2C.cxx b/src/freertos_drivers/ti/TivaI2C.cxx index 3808056d6..aff62b126 100644 --- a/src/freertos_drivers/ti/TivaI2C.cxx +++ b/src/freertos_drivers/ti/TivaI2C.cxx @@ -45,7 +45,7 @@ #include "driverlib/interrupt.h" #include "driverlib/sysctl.h" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" /** Constructor. * @param name name of this device instance in the file system diff --git a/src/freertos_drivers/ti/TivaNRZ.hxx b/src/freertos_drivers/ti/TivaNRZ.hxx index c5a73d7df..fb54e1d8b 100644 --- a/src/freertos_drivers/ti/TivaNRZ.hxx +++ b/src/freertos_drivers/ti/TivaNRZ.hxx @@ -35,7 +35,7 @@ * @date 29 Nov 2014 */ -#include "TivaDCC.hxx" // for FixedQueue +#include "freertos_drivers/ti/TivaDCC.hxx" /* struct DCCDecode diff --git a/src/freertos_drivers/ti/TivaPWM.hxx b/src/freertos_drivers/ti/TivaPWM.hxx index c94bb720b..c0cbe2d71 100644 --- a/src/freertos_drivers/ti/TivaPWM.hxx +++ b/src/freertos_drivers/ti/TivaPWM.hxx @@ -35,7 +35,7 @@ #ifndef _FREEERTOS_DRIVERS_TI_TIVAPWM_HXX_ #define _FREEERTOS_DRIVERS_TI_TIVAPWM_HXX_ -#include "PWM.hxx" +#include "freertos_drivers/common/PWM.hxx" #include "driverlib/timer.h" diff --git a/src/freertos_drivers/ti/TivaSPI.cxx b/src/freertos_drivers/ti/TivaSPI.cxx index 337f5e844..8f9534814 100644 --- a/src/freertos_drivers/ti/TivaSPI.cxx +++ b/src/freertos_drivers/ti/TivaSPI.cxx @@ -31,7 +31,7 @@ * @date 18 Aug 2021 */ -#include "TivaSPI.hxx" +#include "freertos_drivers/ti/TivaSPI.hxx" #include "inc/hw_memmap.h" #include "driverlib/sysctl.h" diff --git a/src/freertos_drivers/ti/TivaSPI.hxx b/src/freertos_drivers/ti/TivaSPI.hxx index c2e8443b9..4d4d81b38 100644 --- a/src/freertos_drivers/ti/TivaSPI.hxx +++ b/src/freertos_drivers/ti/TivaSPI.hxx @@ -35,7 +35,7 @@ #define _FREERTOS_DRIVERS_TI_TIVASPI_HXX_ -#include "SPI.hxx" +#include "freertos_drivers/common/SPI.hxx" #include "driverlib/ssi.h" #include "inc/hw_ssi.h" #include "inc/hw_types.h" diff --git a/src/freertos_drivers/ti/TivaUart.cxx b/src/freertos_drivers/ti/TivaUart.cxx index 597e51b3f..abad3cb16 100644 --- a/src/freertos_drivers/ti/TivaUart.cxx +++ b/src/freertos_drivers/ti/TivaUart.cxx @@ -46,7 +46,7 @@ #include "driverlib/interrupt.h" #include "driverlib/sysctl.h" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" /** Instance pointers help us get context from the interrupt handler(s) */ static TivaUart *instances[8] = {NULL}; diff --git a/src/freertos_drivers/ti/TivaUsbCdcDevice.cxx b/src/freertos_drivers/ti/TivaUsbCdcDevice.cxx index f12c4a317..bbf7cef99 100644 --- a/src/freertos_drivers/ti/TivaUsbCdcDevice.cxx +++ b/src/freertos_drivers/ti/TivaUsbCdcDevice.cxx @@ -52,7 +52,7 @@ #include "usblib/device/usbdevice.h" #include "usblib/device/usbdcdc.h" -#include "TivaDev.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" /** This is fixed and equals the USB packet size that the CDC device will * advertise to be able to receive. This is a performance parameter, 64 is the diff --git a/src/freertos_drivers/tinyusb/TinyUsbCdc.hxx b/src/freertos_drivers/tinyusb/TinyUsbCdc.hxx index e17e2c7e8..c9f34100b 100644 --- a/src/freertos_drivers/tinyusb/TinyUsbCdc.hxx +++ b/src/freertos_drivers/tinyusb/TinyUsbCdc.hxx @@ -34,7 +34,7 @@ #ifndef _FREERTOS_DRIVERS_TINYUSB_TINYUSBCDC_HXX_ #define _FREERTOS_DRIVERS_TINYUSB_TINYUSBCDC_HXX_ -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #include "os/OS.hxx" #include "utils/Singleton.hxx" diff --git a/src/openlcb/BroadcastTimeDefs.cxx b/src/openlcb/BroadcastTimeDefs.cxx index 0f7f21178..6e6bbde26 100644 --- a/src/openlcb/BroadcastTimeDefs.cxx +++ b/src/openlcb/BroadcastTimeDefs.cxx @@ -33,7 +33,7 @@ * @date 30 July 2022 */ -#include "BroadcastTimeDefs.hxx" +#include "openlcb/BroadcastTimeDefs.hxx" #include diff --git a/src/openlcb/SimpleNodeInfoMockUserFile.hxx b/src/openlcb/SimpleNodeInfoMockUserFile.hxx index 8b798985b..9ad0fc8c0 100644 --- a/src/openlcb/SimpleNodeInfoMockUserFile.hxx +++ b/src/openlcb/SimpleNodeInfoMockUserFile.hxx @@ -37,7 +37,7 @@ #ifndef _OPENLCB_SIMPLENODEINFOMOCKUSERFILE_HXX_ #define _OPENLCB_SIMPLENODEINFOMOCKUSERFILE_HXX_ -#include "SimpleNodeInfo.hxx" +#include "openlcb/SimpleNodeInfo.hxx" #ifdef __FreeRTOS__ #include "freertos_drivers/common/RamDisk.hxx" #endif diff --git a/src/os/OSSelectWakeup.hxx b/src/os/OSSelectWakeup.hxx index ed45a6adf..8bdc3e0fd 100644 --- a/src/os/OSSelectWakeup.hxx +++ b/src/os/OSSelectWakeup.hxx @@ -41,7 +41,7 @@ #include "os/os.h" #if OPENMRN_FEATURE_DEVICE_SELECT -#include "Devtab.hxx" +#include "freertos_drivers/common/Devtab.hxx" #endif #if OPENMRN_HAVE_PSELECT diff --git a/src/os/os.c b/src/os/os.c index fa67a7e9f..1d23898d0 100644 --- a/src/os/os.c +++ b/src/os/os.c @@ -47,7 +47,7 @@ #endif // !GCC_MEGA_AVR #if defined (__FreeRTOS__) -#include "devtab.h" +#include "freertos_drivers/common/devtab.h" #include "FreeRTOS.h" #include "task.h" diff --git a/src/utils/FdUtils.cxx b/src/utils/FdUtils.cxx index 4f5748005..3521301b3 100644 --- a/src/utils/FdUtils.cxx +++ b/src/utils/FdUtils.cxx @@ -32,7 +32,7 @@ * @date 29 Dec 2023 */ -#include "FdUtils.hxx" +#include "utils/FdUtils.hxx" #ifdef __linux__ #include diff --git a/src/utils/logging.cxx b/src/utils/logging.cxx index ca433da3b..b4c66307c 100644 --- a/src/utils/logging.cxx +++ b/src/utils/logging.cxx @@ -31,7 +31,7 @@ * @date 3 August 2013 */ -#include "logging.h" +#include "utils/logging.h" #if defined(__linux__) || defined(__MACH__) char logbuffer[4096]; diff --git a/test/cc32xx_aes/targets/freertos.armv7m.cc3200/HwInit.cxx b/test/cc32xx_aes/targets/freertos.armv7m.cc3200/HwInit.cxx index 4aff18d80..be39ae16c 100644 --- a/test/cc32xx_aes/targets/freertos.armv7m.cc3200/HwInit.cxx +++ b/test/cc32xx_aes/targets/freertos.armv7m.cc3200/HwInit.cxx @@ -39,14 +39,14 @@ #include "driverlib/pin.h" #include "driverlib/utils.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxSPI.hxx" -#include "CC32xxWiFi.hxx" -#include "CC32xxDeviceFile.hxx" -#include "CC32xxEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/ti/CC32xxDeviceFile.hxx" +#include "freertos_drivers/ti/CC32xxEEPROMEmulation.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "portmacro.h" static_assert(INT_PRIORITY_LVL_1 >= configMAX_SYSCALL_INTERRUPT_PRIORITY, diff --git a/test/cc32xx_aes/targets/freertos.armv7m.cc3200/hardware.hxx b/test/cc32xx_aes/targets/freertos.armv7m.cc3200/hardware.hxx index d7e481ff1..0201ebdf2 100644 --- a/test/cc32xx_aes/targets/freertos.armv7m.cc3200/hardware.hxx +++ b/test/cc32xx_aes/targets/freertos.armv7m.cc3200/hardware.hxx @@ -27,10 +27,10 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(KEY_WAKEUP, GpioInputPin, A0, 4); diff --git a/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/HwInit.cxx b/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/HwInit.cxx index 4aff18d80..be39ae16c 100644 --- a/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/HwInit.cxx +++ b/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/HwInit.cxx @@ -39,14 +39,14 @@ #include "driverlib/pin.h" #include "driverlib/utils.h" #include "os/OS.hxx" -#include "DummyGPIO.hxx" -#include "CC32xxUart.hxx" -#include "CC32xxSPI.hxx" -#include "CC32xxWiFi.hxx" -#include "CC32xxDeviceFile.hxx" -#include "CC32xxEEPROMEmulation.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" +#include "freertos_drivers/ti/CC32xxUart.hxx" +#include "freertos_drivers/ti/CC32xxSPI.hxx" +#include "freertos_drivers/net_cc32xx/CC32xxWiFi.hxx" +#include "freertos_drivers/ti/CC32xxDeviceFile.hxx" +#include "freertos_drivers/ti/CC32xxEEPROMEmulation.hxx" #include "hardware.hxx" -#include "bootloader_hal.h" +#include "openlcb/bootloader_hal.h" #include "portmacro.h" static_assert(INT_PRIORITY_LVL_1 >= configMAX_SYSCALL_INTERRUPT_PRIORITY, diff --git a/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/hardware.hxx b/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/hardware.hxx index d7e481ff1..0201ebdf2 100644 --- a/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/hardware.hxx +++ b/test/cc32xx_eeprom/targets/freertos.armv7m.cc3200/hardware.hxx @@ -27,10 +27,10 @@ #ifndef _HARDWARE_HXX_ #define _HARDWARE_HXX_ -#include "CC3200GPIO.hxx" +#include "freertos_drivers/ti/CC3200GPIO.hxx" #include "driverlib/rom_map.h" #include "utils/GpioInitializer.hxx" -#include "BlinkerGPIO.hxx" +#include "freertos_drivers/common/BlinkerGPIO.hxx" GPIO_PIN(KEY_WAKEUP, GpioInputPin, A0, 4); diff --git a/test/tiva_uart/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx b/test/tiva_uart/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx index 7664e786d..fa0af5329 100644 --- a/test/tiva_uart/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx +++ b/test/tiva_uart/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx @@ -45,9 +45,9 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaDCC.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" struct Debug { // High between start_cutout and end_cutout from the TivaRailcom driver. @@ -64,7 +64,7 @@ struct Debug { // application. typedef DummyPin RailcomPackets; }; -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0"; diff --git a/test/tiva_usb_cdc/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx b/test/tiva_usb_cdc/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx index 56658a985..12012e6d3 100644 --- a/test/tiva_usb_cdc/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx +++ b/test/tiva_usb_cdc/targets/freertos.armv7m.ek-tm4c123gxl/HwInit.cxx @@ -45,9 +45,9 @@ #include "driverlib/interrupt.h" #include "driverlib/pin_map.h" #include "os/OS.hxx" -#include "TivaDev.hxx" -#include "TivaDCC.hxx" -#include "DummyGPIO.hxx" +#include "freertos_drivers/ti/TivaDev.hxx" +#include "freertos_drivers/ti/TivaDCC.hxx" +#include "freertos_drivers/common/DummyGPIO.hxx" struct Debug { // High between start_cutout and end_cutout from the TivaRailcom driver. @@ -64,7 +64,7 @@ struct Debug { // application. typedef DummyPin RailcomPackets; }; -#include "TivaRailcom.hxx" +#include "freertos_drivers/ti/TivaRailcom.hxx" /** override stdin */ const char *STDIN_DEVICE = "/dev/ser0";