mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
HAL_ChibiOS: fixed namespace error
thanks to Peter for noticing
This commit is contained in:
parent
93bd546e6c
commit
9ab695b7ca
@ -30,9 +30,9 @@
|
||||
|
||||
#if HAL_USE_I2C == TRUE
|
||||
|
||||
using namespace ChibiOS;
|
||||
namespace ChibiOS {
|
||||
|
||||
class ChibiOS::I2CBus : public ChibiOS::DeviceBus {
|
||||
class I2CBus : public DeviceBus {
|
||||
public:
|
||||
I2CConfig i2ccfg;
|
||||
uint8_t busnum;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
static void clear_bus(ioline_t scl_line, uint8_t scl_af);
|
||||
};
|
||||
|
||||
class ChibiOS::I2CDevice : public AP_HAL::I2CDevice {
|
||||
class I2CDevice : public AP_HAL::I2CDevice {
|
||||
public:
|
||||
static I2CDevice *from(AP_HAL::I2CDevice *dev)
|
||||
{
|
||||
@ -102,7 +102,7 @@ private:
|
||||
uint32_t _timeout_ms;
|
||||
};
|
||||
|
||||
class ChibiOS::I2CDeviceManager : public AP_HAL::I2CDeviceManager {
|
||||
class I2CDeviceManager : public AP_HAL::I2CDeviceManager {
|
||||
public:
|
||||
friend class I2CDevice;
|
||||
|
||||
@ -121,6 +121,7 @@ public:
|
||||
bool use_smbus = false,
|
||||
uint32_t timeout_ms=4) override;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // HAL_USE_I2C
|
||||
|
||||
|
@ -23,9 +23,9 @@
|
||||
|
||||
#if HAL_USE_SPI == TRUE
|
||||
|
||||
using namespace ChibiOS;
|
||||
namespace ChibiOS {
|
||||
|
||||
class ChibiOS::SPIBus : public ChibiOS::DeviceBus {
|
||||
class SPIBus : public DeviceBus {
|
||||
public:
|
||||
SPIBus(uint8_t bus);
|
||||
struct spi_dev_s *dev;
|
||||
@ -36,7 +36,7 @@ public:
|
||||
bool spi_started;
|
||||
};
|
||||
|
||||
struct ChibiOS::SPIDesc {
|
||||
struct SPIDesc {
|
||||
SPIDesc(const char *_name, uint8_t _bus,
|
||||
uint8_t _device, ioline_t _pal_line,
|
||||
uint16_t _mode, uint32_t _lowspeed, uint32_t _highspeed)
|
||||
@ -56,7 +56,7 @@ struct ChibiOS::SPIDesc {
|
||||
};
|
||||
|
||||
|
||||
class ChibiOS::SPIDevice : public AP_HAL::SPIDevice {
|
||||
class SPIDevice : public AP_HAL::SPIDevice {
|
||||
public:
|
||||
SPIDevice(SPIBus &_bus, SPIDesc &_device_desc);
|
||||
|
||||
@ -101,7 +101,7 @@ private:
|
||||
uint16_t derive_freq_flag(uint32_t _frequency);
|
||||
};
|
||||
|
||||
class ChibiOS::SPIDeviceManager : public AP_HAL::SPIDeviceManager {
|
||||
class SPIDeviceManager : public AP_HAL::SPIDeviceManager {
|
||||
public:
|
||||
friend class SPIDevice;
|
||||
|
||||
@ -116,6 +116,6 @@ private:
|
||||
static SPIDesc device_table[];
|
||||
SPIBus *buses;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // HAL_USE_SPI
|
||||
|
Loading…
Reference in New Issue
Block a user