Wolfvak f5a877d00b - implemented MCU stuff and its interrupts, thanks @profi200 for the info
- moved brightness control to the ARM11
- moved HID updating to the ARM11
- moved screen init from ARM9 to the ARM11, always performed unconditionally
- removed unnecessary SCREENINIT and SET_BRIGHTNESS pxi commands

and other stuff I probably forgot about
2019-06-03 02:27:41 +02:00

25 lines
572 B
C

#pragma once
#include "common.h"
#include "hid_map.h"
// see: http://3dbrew.org/wiki/CONFIG9_Registers
// see: http://3dbrew.org/wiki/EMMC_Registers
u32 HID_ReadState(void);
#define CART_STATE (~(*(volatile u8*)0x10000010) & 0x1)
#define SD_STATE ((*(volatile u16*)0x1000601C) & (0x1<<5))
// strings for button conversion
#define BUTTON_STRINGS "A", "B", "SELECT", "START", "RIGHT", "LEFT", "UP", "DOWN", "R", "L", "X", "Y"
u32 InputWait(u32 timeout_sec);
bool CheckButton(u32 button);
void ButtonToString(u32 button, char* str);
u32 StringToButton(char* str);