mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
gpio: add (most of) driver framework for boot sysmodule usage
This commit is contained in:
parent
ddf2f5f3c5
commit
4b4f05b4a6
58 changed files with 3380 additions and 836 deletions
|
@ -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); */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue