gpio: add (most of) driver framework for boot sysmodule usage

This commit is contained in:
Michael Scire 2020-10-30 23:57:21 -07:00 committed by SciresM
parent ddf2f5f3c5
commit 4b4f05b4a6
58 changed files with 3380 additions and 836 deletions

View file

@ -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); */
}
}