25 lines
572 B
C
Raw Normal View History

#pragma once
#include "common.h"
#include "hid_map.h"
2017-03-01 17:03:27 +01:00
// see: http://3dbrew.org/wiki/CONFIG9_Registers
// see: http://3dbrew.org/wiki/EMMC_Registers
u32 HID_ReadState(void);
2017-01-16 01:56:04 +01:00
#define CART_STATE (~(*(volatile u8*)0x10000010) & 0x1)
2017-03-01 17:03:27 +01:00
#define SD_STATE ((*(volatile u16*)0x1000601C) & (0x1<<5))
2018-04-25 15:25:07 +02:00
// 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);
2018-04-25 15:25:07 +02:00
void ButtonToString(u32 button, char* str);
u32 StringToButton(char* str);