From 03d8f9193b2c855c50062584e1f29b2626c61b9e Mon Sep 17 00:00:00 2001 From: Thad House Date: Thu, 3 Nov 2016 23:01:13 -0700 Subject: [PATCH] Moves using namespace from ChipObject.h into hal namespace (#323) --- hal/lib/athena/Accelerometer.cpp | 2 ++ hal/lib/athena/ChipObject.h | 8 +++++--- hal/lib/athena/HAL.cpp | 2 ++ hal/lib/athena/Notifier.cpp | 2 ++ hal/lib/athena/Power.cpp | 2 ++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hal/lib/athena/Accelerometer.cpp b/hal/lib/athena/Accelerometer.cpp index 6cc71ac2cd..4b198cd0f9 100644 --- a/hal/lib/athena/Accelerometer.cpp +++ b/hal/lib/athena/Accelerometer.cpp @@ -16,6 +16,8 @@ #include "ChipObject.h" #include "HAL/HAL.h" +using namespace hal; + // The 7-bit I2C address with a 0 "send" bit static const uint8_t kSendAddress = (0x1c << 1) | 0; diff --git a/hal/lib/athena/ChipObject.h b/hal/lib/athena/ChipObject.h index 189c483676..b7bf3204ef 100644 --- a/hal/lib/athena/ChipObject.h +++ b/hal/lib/athena/ChipObject.h @@ -39,7 +39,9 @@ #include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSPI.h" #include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSysWatchdog.h" -// FIXME: these should not be here! -using namespace nFPGA; // NOLINT -using namespace nRoboRIO_FPGANamespace; // NOLINT +namespace hal { +using namespace nFPGA; +using namespace nRoboRIO_FPGANamespace; +} // namespace hal + #pragma GCC diagnostic pop diff --git a/hal/lib/athena/HAL.cpp b/hal/lib/athena/HAL.cpp index 4a3d5ad39c..2be97c5b53 100644 --- a/hal/lib/athena/HAL.cpp +++ b/hal/lib/athena/HAL.cpp @@ -27,6 +27,8 @@ #include "ctre/ctre.h" #include "visa/visa.h" +using namespace hal; + static std::unique_ptr global; static std::unique_ptr watchdog; diff --git a/hal/lib/athena/Notifier.cpp b/hal/lib/athena/Notifier.cpp index 4a19eeb132..cbde6ce978 100644 --- a/hal/lib/athena/Notifier.cpp +++ b/hal/lib/athena/Notifier.cpp @@ -21,6 +21,8 @@ #include "HAL/handles/UnlimitedHandleResource.h" #include "support/SafeThread.h" +using namespace hal; + static const int32_t kTimerInterruptNumber = 28; static priority_mutex notifierInterruptMutex; diff --git a/hal/lib/athena/Power.cpp b/hal/lib/athena/Power.cpp index 3eb7143734..53131572d8 100644 --- a/hal/lib/athena/Power.cpp +++ b/hal/lib/athena/Power.cpp @@ -11,6 +11,8 @@ #include "ChipObject.h" +using namespace hal; + static std::unique_ptr power; static void initializePower(int32_t* status) {