From 78ce5a3f70176dc78524f457b449afab7c693637 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Wed, 2 May 2018 18:26:11 +0530 Subject: [PATCH] HAL_Empty: fix ambiguity of UARTDriver with the one defined in ChibiOS --- libraries/AP_HAL_Empty/UARTDriver.cpp | 28 +++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/libraries/AP_HAL_Empty/UARTDriver.cpp b/libraries/AP_HAL_Empty/UARTDriver.cpp index 73943d7536..6a3ac2f144 100644 --- a/libraries/AP_HAL_Empty/UARTDriver.cpp +++ b/libraries/AP_HAL_Empty/UARTDriver.cpp @@ -1,27 +1,25 @@ #include "UARTDriver.h" -using namespace Empty; +Empty::UARTDriver::UARTDriver() {} -UARTDriver::UARTDriver() {} - -void UARTDriver::begin(uint32_t b) {} -void UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS) {} -void UARTDriver::end() {} -void UARTDriver::flush() {} -bool UARTDriver::is_initialized() { return false; } -void UARTDriver::set_blocking_writes(bool blocking) {} -bool UARTDriver::tx_pending() { return false; } +void Empty::UARTDriver::begin(uint32_t b) {} +void Empty::UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS) {} +void Empty::UARTDriver::end() {} +void Empty::UARTDriver::flush() {} +bool Empty::UARTDriver::is_initialized() { return false; } +void Empty::UARTDriver::set_blocking_writes(bool blocking) {} +bool Empty::UARTDriver::tx_pending() { return false; } /* Empty implementations of Stream virtual methods */ -uint32_t UARTDriver::available() { return 0; } -uint32_t UARTDriver::txspace() { return 1; } -int16_t UARTDriver::read() { return -1; } +uint32_t Empty::UARTDriver::available() { return 0; } +uint32_t Empty::UARTDriver::txspace() { return 1; } +int16_t Empty::UARTDriver::read() { return -1; } /* Empty implementations of Print virtual methods */ -size_t UARTDriver::write(uint8_t c) { return 0; } +size_t Empty::UARTDriver::write(uint8_t c) { return 0; } -size_t UARTDriver::write(const uint8_t *buffer, size_t size) +size_t Empty::UARTDriver::write(const uint8_t *buffer, size_t size) { size_t n = 0; while (size--) {