gpio: add (most of) driver framework for boot sysmodule usage
This commit is contained in:
@@ -16,22 +16,14 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include "boot_fan_enable.hpp"
|
||||
|
||||
#include "gpio/gpio_utils.hpp"
|
||||
|
||||
namespace ams::boot {
|
||||
|
||||
namespace {
|
||||
|
||||
/* Convenience definitions. */
|
||||
constexpr u32 GpioPadName_FanEnable = 0x4B;
|
||||
|
||||
}
|
||||
|
||||
void SetFanEnabled() {
|
||||
if (spl::GetHardwareType() == spl::HardwareType::Copper) {
|
||||
boot::gpio::Configure(GpioPadName_FanEnable);
|
||||
boot::gpio::SetDirection(GpioPadName_FanEnable, GpioDirection_Output);
|
||||
boot::gpio::SetValue(GpioPadName_FanEnable, GpioValue_High);
|
||||
/* TODO */
|
||||
/* boot::gpio::Configure(GpioPadName_FanEnable); */
|
||||
/* boot::gpio::SetDirection(GpioPadName_FanEnable, GpioDirection_Output); */
|
||||
/* boot::gpio::SetValue(GpioPadName_FanEnable, GpioValue_High); */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user