diff --git a/libraries/AP_HAL_Linux/AP_HAL_Linux_Namespace.h b/libraries/AP_HAL_Linux/AP_HAL_Linux_Namespace.h index dbfa310812..e9dc9bcc6f 100644 --- a/libraries/AP_HAL_Linux/AP_HAL_Linux_Namespace.h +++ b/libraries/AP_HAL_Linux/AP_HAL_Linux_Namespace.h @@ -38,7 +38,7 @@ namespace Linux { class LinuxSemaphore; class LinuxScheduler; class LinuxUtil; - class LinuxUtilNavio; + class LinuxUtilRPI; class ToneAlarm; //limit the scope of ToneAlarm driver to Linux_HAL only } diff --git a/libraries/AP_HAL_Linux/AP_HAL_Linux_Private.h b/libraries/AP_HAL_Linux/AP_HAL_Linux_Private.h index 0187dcc351..c332e43069 100644 --- a/libraries/AP_HAL_Linux/AP_HAL_Linux_Private.h +++ b/libraries/AP_HAL_Linux/AP_HAL_Linux_Private.h @@ -31,7 +31,7 @@ #include "Scheduler.h" #include "ToneAlarmDriver.h" #include "Util.h" -#include "Util_Navio.h" +#include "Util_RPI.h" #endif // __AP_HAL_LINUX_PRIVATE_H__ diff --git a/libraries/AP_HAL_Linux/GPIO_RPI.cpp b/libraries/AP_HAL_Linux/GPIO_RPI.cpp index de7f945260..f9164a266e 100644 --- a/libraries/AP_HAL_Linux/GPIO_RPI.cpp +++ b/libraries/AP_HAL_Linux/GPIO_RPI.cpp @@ -3,7 +3,7 @@ #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT #include "GPIO.h" -#include "Util_Navio.h" +#include "Util_RPI.h" #include #include @@ -24,7 +24,7 @@ LinuxGPIO_RPI::LinuxGPIO_RPI() void LinuxGPIO_RPI::init() { - int rpi_version = LinuxUtilNavio::from(hal.util)->get_rpi_version(); + int rpi_version = LinuxUtilRPI::from(hal.util)->get_rpi_version(); uint32_t gpio_address = rpi_version == 1 ? GPIO_BASE(BCM2708_PERI_BASE) : GPIO_BASE(BCM2709_PERI_BASE); uint32_t pwm_address = rpi_version == 1 ? PWM_BASE(BCM2708_PERI_BASE) : PWM_BASE(BCM2709_PERI_BASE); uint32_t clk_address = rpi_version == 1 ? CLOCK_BASE(BCM2708_PERI_BASE) : CLOCK_BASE(BCM2709_PERI_BASE); diff --git a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp index 55d0a8ce72..7a65b85b3e 100644 --- a/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp +++ b/libraries/AP_HAL_Linux/HAL_Linux_Class.cpp @@ -120,7 +120,7 @@ static Empty::EmptyRCOutput rcoutDriver; static LinuxScheduler schedulerInstance; #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO -static LinuxUtilNavio utilInstance; +static LinuxUtilRPI utilInstance; #else static LinuxUtil utilInstance; #endif diff --git a/libraries/AP_HAL_Linux/RCInput_Navio.cpp b/libraries/AP_HAL_Linux/RCInput_Navio.cpp index fd037618a8..2da07c27e9 100644 --- a/libraries/AP_HAL_Linux/RCInput_Navio.cpp +++ b/libraries/AP_HAL_Linux/RCInput_Navio.cpp @@ -3,7 +3,7 @@ #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO #include "GPIO.h" #include "RCInput_Navio.h" -#include "Util_Navio.h" +#include "Util_RPI.h" #include #include @@ -392,7 +392,7 @@ LinuxRCInput_Navio::LinuxRCInput_Navio(): last_signal(228), state(RCIN_NAVIO_INITIAL_STATE) { - int version = LinuxUtilNavio::from(hal.util)->get_rpi_version(); + int version = LinuxUtilRPI::from(hal.util)->get_rpi_version(); set_physical_addresses(version); //Init memory for buffer and for DMA control blocks. See comments in "init_ctrl_data()" to understand values "2" and "113" diff --git a/libraries/AP_HAL_Linux/Util_Navio.cpp b/libraries/AP_HAL_Linux/Util_RPI.cpp similarity index 83% rename from libraries/AP_HAL_Linux/Util_Navio.cpp rename to libraries/AP_HAL_Linux/Util_RPI.cpp index 1cbbc45e4b..40972dede9 100644 --- a/libraries/AP_HAL_Linux/Util_Navio.cpp +++ b/libraries/AP_HAL_Linux/Util_RPI.cpp @@ -1,6 +1,6 @@ #include -#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO +#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT #include #include @@ -10,19 +10,19 @@ #include #include -#include "Util_Navio.h" +#include "Util_RPI.h" extern const AP_HAL::HAL& hal; using namespace Linux; -LinuxUtilNavio::LinuxUtilNavio() +LinuxUtilRPI::LinuxUtilRPI() { _check_rpi_version(); } #define MAX_SIZE_LINE 50 -int LinuxUtilNavio::_check_rpi_version() +int LinuxUtilRPI::_check_rpi_version() { char buffer[MAX_SIZE_LINE]; const char* hardware_description_entry = "Hardware"; @@ -61,7 +61,7 @@ int LinuxUtilNavio::_check_rpi_version() return _rpi_version; } -int LinuxUtilNavio::get_rpi_version() const +int LinuxUtilRPI::get_rpi_version() const { return _rpi_version; } diff --git a/libraries/AP_HAL_Linux/Util_Navio.h b/libraries/AP_HAL_Linux/Util_RPI.h similarity index 57% rename from libraries/AP_HAL_Linux/Util_Navio.h rename to libraries/AP_HAL_Linux/Util_RPI.h index 7217102dcd..ac6775af1c 100644 --- a/libraries/AP_HAL_Linux/Util_Navio.h +++ b/libraries/AP_HAL_Linux/Util_RPI.h @@ -2,12 +2,12 @@ #include "Util.h" -class Linux::LinuxUtilNavio : public Linux::LinuxUtil { +class Linux::LinuxUtilRPI : public Linux::LinuxUtil { public: - LinuxUtilNavio(); + LinuxUtilRPI(); - static LinuxUtilNavio *from(AP_HAL::Util *util) { - return static_cast(util); + static LinuxUtilRPI *from(AP_HAL::Util *util) { + return static_cast(util); } /* return the Raspberry Pi version */