mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
boot: Implement initial gpio configuration
This commit is contained in:
parent
e58948a42b
commit
38159bdf9a
11 changed files with 769 additions and 1 deletions
|
@ -18,12 +18,25 @@
|
|||
#include <switch.h>
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
#include "boot_types.hpp"
|
||||
|
||||
class Boot {
|
||||
public:
|
||||
static constexpr u32 GpioPhysicalBase = 0x6000D000;
|
||||
public:
|
||||
/* Functions for actually booting. */
|
||||
static void ChangeGpioVoltageTo1_8v();
|
||||
static void SetInitialGpioConfiguration();
|
||||
|
||||
/* Register Utilities. */
|
||||
static u32 ReadPmcRegister(u32 phys_addr);
|
||||
static void WritePmcRegister(u32 phys_addr, u32 value, u32 mask = UINT32_MAX);
|
||||
|
||||
/* GPIO Utilities. */
|
||||
static u32 GpioConfigure(u32 gpio_pad_name);
|
||||
static u32 GpioSetDirection(u32 gpio_pad_name, GpioDirection dir);
|
||||
static u32 GpioSetValue(u32 gpio_pad_name, GpioValue val);
|
||||
|
||||
/* SPL Utilities. */
|
||||
static HardwareType GetHardwareType();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue