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

This commit is contained in:
Michael Scire authored and SciresM committed 2020-11-14 03:37:51 -08:00
1 parent ddf2f5f3c5
commit 4b4f05b4a6
58 files changed
+3380 -836

No files matched your search

+4 -12
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); */
}
}