#ifndef RVL_SDK_SC_SCAPI_H
#define RVL_SDK_SC_SCAPI_H
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif

/**
 * SC/SYSCONF documentation from:
 * https://wiibrew.org/wiki//shared2/sys/SYSCONF
 */

typedef enum {
    SC_ASPECT_STD,
    SC_ASPECT_WIDE
} SCAspectRatio;

typedef enum {
    SC_EURGB_50_HZ,
    SC_EURGB_60_HZ
} SCEuRgb60Mode;

typedef enum {
    SC_LANG_JP,
    SC_LANG_EN,
    SC_LANG_DE,
    SC_LANG_FR,
    SC_LANG_SP,
    SC_LANG_IT,
    SC_LANG_NL,
    SC_LANG_ZH_S,
    SC_LANG_ZH_T,
    SC_LANG_KR,
} SCLanguage;

typedef u8 SCSoundMode;
enum SCSoundMode_et
{
	SC_SND_MONO,
	SC_SND_STEREO,
	SC_SND_SURROUND
};

typedef enum {
    SC_SENSOR_BAR_BOTTOM,
    SC_SENSOR_BAR_TOP
} SCSensorBarPos;

typedef struct SCIdleMode {
    u8 wc24;      // at 0x0
    u8 slotLight; // at 0x1
} SCIdleMode;

typedef struct SCBtDeviceInfo {
    u8 mac[6];     // at 0x0
    char name[64]; // at 0x6
} SCBtDeviceInfo;

typedef struct SCBtDeviceInfoArray {
    u8 numRemotes;                 // at 0x0
    SCBtDeviceInfo registered[10]; // at 0x1
    SCBtDeviceInfo active[6];      // at 0x2BD
} SCBtDeviceInfoArray;

u8 SCGetAspectRatio(void);
s8 SCGetDisplayOffsetH(void);
u8 SCGetEuRgb60Mode(void);
void SCGetIdleMode(SCIdleMode *mode);
u8 SCGetLanguage(void);
u8 SCGetProgressiveMode(void);
u8 SCGetScreenSaverMode(void);
SCSoundMode SCGetSoundMode(void);
u32 SCGetCounterBias(void);
void SCGetBtDeviceInfoArray(SCBtDeviceInfoArray *info);
void SCSetBtDeviceInfoArray(const SCBtDeviceInfoArray *info);
u32 SCGetBtDpdSensibility(void);
BOOL SCGetMplsMoviePlay(void);
u8 SCGetWpadMotorMode(void);
void SCSetWpadMotorMode(u8 mode);
u8 SCGetWpadSensorBarPosition(void);
u8 SCGetWpadSpeakerVolume(void);
void SCSetWpadSpeakerVolume(u8 vol);

#ifdef __cplusplus
}
#endif
#endif
