strat: fix board namespacing for nintendo::nx

This commit is contained in:
Michael Scire 2020-12-29 12:30:43 -08:00
parent a26e8ac54f
commit 30e70e20d8
46 changed files with 57 additions and 57 deletions

View File

@ -18,7 +18,7 @@
#include <stratosphere/gpio/gpio_types.hpp>
#include <stratosphere/gpio/driver/gpio_i_gpio_driver.hpp>
namespace ams::gpio::driver::board::nintendo_nx {
namespace ams::gpio::driver::board::nintendo::nx {
void Initialize(bool enable_interrupt_handlers);

View File

@ -26,7 +26,7 @@
namespace ams::gpio::driver::board {
using namespace ams::gpio::driver::board::nintendo_nx;
using namespace ams::gpio::driver::board::nintendo::nx;
}

View File

@ -17,7 +17,7 @@
#include <vapours.hpp>
#include <stratosphere/i2c/i2c_types.hpp>
namespace ams::i2c::driver::board::nintendo_nx {
namespace ams::i2c::driver::board::nintendo::nx {
void Initialize();

View File

@ -25,7 +25,7 @@
namespace ams::i2c::driver::board {
using namespace ams::i2c::driver::board::nintendo_nx;
using namespace ams::i2c::driver::board::nintendo::nx;
}

View File

@ -17,7 +17,7 @@
#include <vapours.hpp>
#include <stratosphere/pwm/pwm_types.hpp>
namespace ams::pwm::driver::board::nintendo_nx {
namespace ams::pwm::driver::board::nintendo::nx {
void Initialize();

View File

@ -24,7 +24,7 @@
namespace ams::pwm::driver::board {
using namespace ams::pwm::driver::board::nintendo_nx;
using namespace ams::pwm::driver::board::nintendo::nx;
}

View File

@ -18,11 +18,11 @@
#include "impl/gpio_initial_config.hpp"
#include "impl/gpio_tegra_pad.hpp"
namespace ams::gpio::driver::board::nintendo_nx {
namespace ams::gpio::driver::board::nintendo::nx {
namespace {
ams::gpio::driver::board::nintendo_nx::impl::DriverImpl *g_driver_impl = nullptr;
ams::gpio::driver::board::nintendo::nx::impl::DriverImpl *g_driver_impl = nullptr;
}
@ -38,7 +38,7 @@ namespace ams::gpio::driver::board::nintendo_nx {
AMS_ABORT_UNLESS(driver_storage != nullptr);
/* Construct the new driver. */
g_driver_impl = new (driver_storage) ams::gpio::driver::board::nintendo_nx::impl::DriverImpl(impl::GpioRegistersPhysicalAddress, impl::GpioRegistersSize);
g_driver_impl = new (driver_storage) ams::gpio::driver::board::nintendo::nx::impl::DriverImpl(impl::GpioRegistersPhysicalAddress, impl::GpioRegistersSize);
/* Register the driver. */
gpio::driver::RegisterDriver(g_driver_impl);

View File

@ -17,7 +17,7 @@
#include "gpio_driver_impl.hpp"
#include "gpio_register_accessor.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
void InterruptEventHandler::Initialize(DriverImpl *drv, os::InterruptName intr, int ctlr) {
/* Set fields. */

View File

@ -20,7 +20,7 @@
#include "gpio_register_accessor.hpp"
#include "gpio_suspend_handler.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
class DriverImpl;
@ -43,7 +43,7 @@ namespace ams::gpio::driver::board::nintendo_nx::impl {
class DriverImpl : public ::ams::gpio::driver::IGpioDriver {
NON_COPYABLE(DriverImpl);
NON_MOVEABLE(DriverImpl);
AMS_DDSF_CASTABLE_TRAITS(ams::gpio::driver::board::nintendo_nx::impl::DriverImpl, ::ams::gpio::driver::IGpioDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::gpio::driver::board::nintendo::nx::impl::DriverImpl, ::ams::gpio::driver::IGpioDriver);
friend class InterruptEventHandler;
private:
dd::PhysicalAddress gpio_physical_address;

View File

@ -18,7 +18,7 @@
#include "gpio_initial_config.hpp"
#include "gpio_wake_pin_config.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
namespace {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
struct GpioInitialConfig {
DeviceCode device_code;

View File

@ -18,7 +18,7 @@
#include "gpio_tegra_pad.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
constexpr inline dd::PhysicalAddress GpioRegistersPhysicalAddress = 0x6000D000;
constexpr inline size_t GpioRegistersSize = 4_KB;

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "gpio_suspend_handler.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
void SuspendHandler::Initialize(uintptr_t gpio_vaddr) {
/* Set our gpio virtual address. */

View File

@ -18,7 +18,7 @@
#include "gpio_tegra_pad.hpp"
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
class SuspendHandler {
NON_COPYABLE(SuspendHandler);

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
enum GpioPadPort {
GpioPadPort_A = 0,
@ -347,7 +347,7 @@ namespace ams::gpio::driver::board::nintendo_nx::impl {
};
class TegraPad : public ::ams::gpio::driver::Pad {
AMS_DDSF_CASTABLE_TRAITS(ams::gpio::driver::board::nintendo_nx::impl::TegraPad, ::ams::gpio::driver::Pad);
AMS_DDSF_CASTABLE_TRAITS(ams::gpio::driver::board::nintendo::nx::impl::TegraPad, ::ams::gpio::driver::Pad);
private:
using Base = ::ams::gpio::driver::Pad;
private:

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::gpio::driver::board::nintendo_nx::impl {
namespace ams::gpio::driver::board::nintendo::nx::impl {
struct WakePinConfig {
wec::WakeEvent wake_event;

View File

@ -17,7 +17,7 @@
#include "impl/i2c_bus_manager.hpp"
#include "impl/i2c_device_property_manager.hpp"
namespace ams::i2c::driver::board::nintendo_nx {
namespace ams::i2c::driver::board::nintendo::nx {
namespace {

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "i2c_bus_accessor.hpp"
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
namespace {

View File

@ -17,12 +17,12 @@
#include <stratosphere.hpp>
#include "i2c_i2c_registers.hpp"
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
class I2cBusAccessor : public ::ams::i2c::driver::II2cDriver {
NON_COPYABLE(I2cBusAccessor);
NON_MOVEABLE(I2cBusAccessor);
AMS_DDSF_CASTABLE_TRAITS(ams::i2c::driver::board::nintendo_nx::impl::I2cBusAccessor, ::ams::i2c::driver::II2cDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::i2c::driver::board::nintendo::nx::impl::I2cBusAccessor, ::ams::i2c::driver::II2cDriver);
private:
enum class State {
NotInitialized = 0,

View File

@ -18,7 +18,7 @@
#include "i2c_bus_accessor.hpp"
#include "i2c_i_allocator.hpp"
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
class I2cBusAccessorManager : public IAllocator<I2cBusAccessor::BusAccessorList> {
/* ... */

View File

@ -17,7 +17,7 @@
#include <stratosphere.hpp>
#include "i2c_i_allocator.hpp"
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
class I2cDevicePropertyManager : public IAllocator<I2cDeviceProperty::DevicePropertyList> {
/* ... */

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
struct I2cRegisters {
volatile u32 cnfg;

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::i2c::driver::board::nintendo_nx::impl {
namespace ams::i2c::driver::board::nintendo::nx::impl {
template<typename ListType>
class IAllocator {

View File

@ -18,7 +18,7 @@
#include "pinmux_board_driver_api.hpp"
#include "pinmux_platform_pads.hpp"
namespace ams::pinmux::driver::board::nintendo_nx {
namespace ams::pinmux::driver::board::nintendo::nx {
namespace {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::pinmux::driver::board::nintendo_nx {
namespace ams::pinmux::driver::board::nintendo::nx {
bool IsInitialized();

View File

@ -18,7 +18,7 @@
#include "pinmux_board_driver_api.hpp"
#include "pinmux_platform_pads.hpp"
namespace ams::pinmux::driver::board::nintendo_nx {
namespace ams::pinmux::driver::board::nintendo::nx {
namespace {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::pinmux::driver::board::nintendo_nx {
namespace ams::pinmux::driver::board::nintendo::nx {
struct PinmuxPadConfig {
u32 index;

View File

@ -20,7 +20,7 @@
#include "board/nintendo/nx/pinmux_board_driver_api.hpp"
namespace ams::pinmux::driver::board {
using namespace ams::pinmux::driver::board::nintendo_nx;
using namespace ams::pinmux::driver::board::nintendo::nx;
}
#else

View File

@ -19,7 +19,7 @@
#include "powctl_battery_driver.hpp"
#include "powctl_max17050_driver.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace {

View File

@ -18,12 +18,12 @@
#include "../../../powctl_i_power_control_driver.hpp"
#include "powctl_interrupt_event_handler.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
class BatteryDevice : public powctl::impl::IDevice {
NON_COPYABLE(BatteryDevice);
NON_MOVEABLE(BatteryDevice);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo_nx::BatteryDevice, ::ams::powctl::impl::IDevice);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo::nx::BatteryDevice, ::ams::powctl::impl::IDevice);
private:
bool use_event_handler;
std::optional<BatteryInterruptEventHandler> event_handler;
@ -43,7 +43,7 @@ namespace ams::powctl::impl::board::nintendo_nx {
class BatteryDriver : public IPowerControlDriver {
NON_COPYABLE(BatteryDriver);
NON_MOVEABLE(BatteryDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo_nx::BatteryDriver, ::ams::powctl::impl::IPowerControlDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo::nx::BatteryDriver, ::ams::powctl::impl::IPowerControlDriver);
public:
BatteryDriver(bool ev) : IPowerControlDriver(ev) { /* ... */ }

View File

@ -19,7 +19,7 @@
#include "powctl_battery_driver.hpp"
#include "powctl_charger_driver.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace {

View File

@ -18,7 +18,7 @@
#include "powctl_interrupt_event_handler.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
void Initialize(bool use_event_handlers);
void Finalize();

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "powctl_bq24193_driver.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace bq24193 {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace bq24193 {

View File

@ -19,7 +19,7 @@
#include "powctl_charger_driver.hpp"
#include "powctl_bq24193_driver.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace {

View File

@ -18,12 +18,12 @@
#include "../../../powctl_i_power_control_driver.hpp"
#include "powctl_interrupt_event_handler.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
class ChargerDevice : public powctl::impl::IDevice {
NON_COPYABLE(ChargerDevice);
NON_MOVEABLE(ChargerDevice);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo_nx::ChargerDevice, ::ams::powctl::impl::IDevice);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo::nx::ChargerDevice, ::ams::powctl::impl::IDevice);
private:
gpio::GpioPadSession gpio_pad_session;
bool watchdog_timer_enabled;
@ -54,7 +54,7 @@ namespace ams::powctl::impl::board::nintendo_nx {
class ChargerDriver : public IPowerControlDriver {
NON_COPYABLE(ChargerDriver);
NON_MOVEABLE(ChargerDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo_nx::ChargerDriver, ::ams::powctl::impl::IPowerControlDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::powctl::impl::board::nintendo::nx::ChargerDriver, ::ams::powctl::impl::IPowerControlDriver);
public:
ChargerDriver(bool ev) : IPowerControlDriver(ev) { /* ... */ }

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "powctl_interrupt_event_handler.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
void ChargerInterruptEventHandler::SignalEvent(IDevice *device) {
/* TODO */

View File

@ -17,7 +17,7 @@
#include <stratosphere.hpp>
#include "../../../powctl_i_power_control_driver.hpp"
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
template<typename Derived>
class InterruptEventHandler : public ddsf::IEventHandler {

View File

@ -20,7 +20,7 @@
#include <arm_neon.h>
#endif
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace max17050 {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::powctl::impl::board::nintendo_nx {
namespace ams::powctl::impl::board::nintendo::nx {
namespace max17050 {

View File

@ -22,7 +22,7 @@
#include "board/nintendo/nx/powctl_board_impl.hpp"
namespace ams::powctl::impl::board {
using namespace ams::powctl::impl::board::nintendo_nx;
using namespace ams::powctl::impl::board::nintendo::nx;
}
#else

View File

@ -17,7 +17,7 @@
#include "pwm_impl_pwm_driver_api.hpp"
#include "pwm_pwm_driver_impl.hpp"
namespace ams::pwm::driver::board::nintendo_nx::impl {
namespace ams::pwm::driver::board::nintendo::nx::impl {
namespace {

View File

@ -16,7 +16,7 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::pwm::driver::board::nintendo_nx::impl {
namespace ams::pwm::driver::board::nintendo::nx::impl {
struct ChannelDefinition {
DeviceCode device_code;

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "pwm_pwm_driver_impl.hpp"
namespace ams::pwm::driver::board::nintendo_nx::impl {
namespace ams::pwm::driver::board::nintendo::nx::impl {
namespace {

View File

@ -17,12 +17,12 @@
#include <stratosphere.hpp>
#include "pwm_impl_pwm_driver_api.hpp"
namespace ams::pwm::driver::board::nintendo_nx::impl {
namespace ams::pwm::driver::board::nintendo::nx::impl {
class PwmDeviceImpl : public ::ams::pwm::driver::IPwmDevice {
NON_COPYABLE(PwmDeviceImpl);
NON_MOVEABLE(PwmDeviceImpl);
AMS_DDSF_CASTABLE_TRAITS(ams::pwm::driver::board::nintendo_nx::impl::PwmDeviceImpl, ::ams::pwm::driver::IPwmDevice);
AMS_DDSF_CASTABLE_TRAITS(ams::pwm::driver::board::nintendo::nx::impl::PwmDeviceImpl, ::ams::pwm::driver::IPwmDevice);
private:
os::SdkMutex suspend_mutex;
u32 suspend_value;
@ -39,7 +39,7 @@ namespace ams::pwm::driver::board::nintendo_nx::impl {
class PwmDriverImpl : public ::ams::pwm::driver::IPwmDriver {
NON_COPYABLE(PwmDriverImpl);
NON_MOVEABLE(PwmDriverImpl);
AMS_DDSF_CASTABLE_TRAITS(ams::pwm::driver::board::nintendo_nx::impl::PwmDriverImpl, ::ams::pwm::driver::IPwmDriver);
AMS_DDSF_CASTABLE_TRAITS(ams::pwm::driver::board::nintendo::nx::impl::PwmDriverImpl, ::ams::pwm::driver::IPwmDriver);
private:
dd::PhysicalAddress registers_phys_addr;
size_t registers_size;

View File

@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "impl/pwm_impl_pwm_driver_api.hpp"
namespace ams::pwm::driver::board::nintendo_nx {
namespace ams::pwm::driver::board::nintendo::nx {
void Initialize() {
R_ABORT_UNLESS(impl::InitializePwmDriver());