void* linearMemAlign(size_t size, size_t alignment);
void* linearRealloc(void* mem, size_t size); // not implemented yet
void linearFree(void* mem);
-u32 linearSpaceFree(); // get free linear space in bytes
+u32 linearSpaceFree(void); // get free linear space in bytes
*
* This can be used to compare system versions easily with @ref SYSTEM_VERSION.
*/
-u32 osGetFirmVersion();
+u32 osGetFirmVersion(void);
/**
* @return the kernel version
* if(osGetKernelVersion() > SYSTEM_VERSION(2,46,0)) printf("You are running 9.0 or higher\n");
* @endcode
*/
-u32 osGetKernelVersion();
+u32 osGetKernelVersion(void);
/**
* @return number of milliseconds since 1st Jan 1900 00:00.
*/
-u64 osGetTime();
+u64 osGetTime(void);
/**
* @brief Returns the Wifi signal strength.
*
* @return the Wifi signal strength
*/
-u8 osGetWifiStrength();
+u8 osGetWifiStrength(void);
#pragma once
-Result acInit();
-Result acExit();
+Result acInit(void);
+Result acExit(void);
Result ACU_GetWifiStatus(Handle* servhandle, u32 *out);
-Result ACU_WaitInternetConnection();
+Result ACU_WaitInternetConnection(void);
} TitleList;
-Result amInit();
-Result amExit();
-Handle *amGetSessionHandle();
+Result amInit(void);
+Result amExit(void);
+Handle *amGetSessionHandle(void);
/* AM_GetTitleCount()
About: Gets the number of titles for a given mediatype
/* AM_InstallNativeFirm()
About: Installs NATIVE_FIRM to NAND (firm0:/ & firm1:/) from a CXI
*/
-Result AM_InstallNativeFirm();
+Result AM_InstallNativeFirm(void);
/* AM_GetTitleProductCode()
About: Gets the product code of a title based on its title id.
extern vu32* hidSharedMem;
Result hidInit(u32* sharedMem);
-void hidExit();
+void hidExit(void);
-void hidScanInput();
-u32 hidKeysHeld();
-u32 hidKeysDown();
-u32 hidKeysUp();
+void hidScanInput(void);
+u32 hidKeysHeld(void);
+u32 hidKeysDown(void);
+u32 hidKeysUp(void);
void hidTouchRead(touchPosition* pos);
void hidCircleRead(circlePosition* pos);
void hidAccelRead(accelVector* vector);
#define circleRead hidCircleRead
Result HIDUSER_GetHandles(Handle* outMemHandle, Handle *eventpad0, Handle *eventpad1, Handle *eventaccel, Handle *eventgyro, Handle *eventdebugpad);
-Result HIDUSER_EnableAccelerometer();
-Result HIDUSER_DisableAccelerometer();
-Result HIDUSER_EnableGyroscope();
-Result HIDUSER_DisableGyroscope();
+Result HIDUSER_EnableAccelerometer(void);
+Result HIDUSER_DisableAccelerometer(void);
+Result HIDUSER_EnableGyroscope(void);
+Result HIDUSER_DisableGyroscope(void);
Result HIDUSER_GetGyroscopeRawToDpsCoefficient(float *coeff);
Result HIDUSER_GetSoundVolume(u8 *volume); //Return the volume slider value (0-63)
#define HTTPC_RESULTCODE_DOWNLOADPENDING 0xd840a02b
-Result httpcInit();
-void httpcExit();
+Result httpcInit(void);
+void httpcExit(void);
Result httpcOpenContext(httpcContext *context, char* url, u32 use_defaultproxy);//use_defaultproxy should be zero normally, unless you don't want HTTPC_SetProxyDefault() to be used automatically.
Result httpcCloseContext(httpcContext *context);
#pragma once
Result IRU_Initialize(u32 *sharedmem_addr, u32 sharedmem_size);//The permissions for the specified memory is set to RO. This memory must be already mapped.
-Result IRU_Shutdown();
-Handle IRU_GetServHandle();
+Result IRU_Shutdown(void);
+Handle IRU_GetServHandle(void);
Result IRU_SendData(u8 *buf, u32 size, u32 wait);
Result IRU_RecvData(u8 *buf, u32 size, u8 flag, u32 *transfercount, u32 wait);
Result IRU_SetBitRate(u8 value);
extern vu32* irrstSharedMem;
Result irrstInit(u32* sharedMem);
-void irrstExit();
+void irrstExit(void);
-void irrstScanInput();
-u32 irrstKeysHeld();
+void irrstScanInput(void);
+u32 irrstKeysHeld(void);
void irrstCstickRead(circlePosition* pos);
void irrstWaitForEvent(bool nextEvent);
//See also: http://3dbrew.org/wiki/MIC_Services
Result MIC_Initialize(u32 *sharedmem, u32 sharedmem_size, u8 control, u8 recording, u8 unk0, u8 unk1, u8 unk2);//sharedmem_size = audiodata size + 4, aligned to 0x1000-bytes. The sharedmem ptr must be 0x1000-bytes aligned. The offical 3ds-sound app uses the following values for unk0-unk2: 3, 1, and 1.
-Result MIC_Shutdown();
-u32 MIC_GetSharedMemOffsetValue();
+Result MIC_Shutdown(void);
+u32 MIC_GetSharedMemOffsetValue(void);
u32 MIC_ReadAudioData(u8 *outbuf, u32 readsize, u32 waitforevent);//Reads MIC audio data. When waitforevent is non-zero, this clears the event, then waits for MIC-module to signal it again when audio data is written to shared-mem. The return value is the actual byte-size of the read data.
Result MIC_MapSharedMem(Handle handle, u32 size);
-Result MIC_UnmapSharedMem();
+Result MIC_UnmapSharedMem(void);
Result MIC_cmd3_Initialize(u8 unk0, u8 unk1, u32 sharedmem_baseoffset, u32 sharedmem_endoffset, u8 unk2);
-Result MIC_cmd5();
+Result MIC_cmd5(void);
Result MIC_GetCNTBit15(u8 *out);
Result MIC_GetEventHandle(Handle *handle);
Result MIC_SetControl(u8 value);//See here: http://3dbrew.org/wiki/MIC_Services
void mvdstdGenerateDefaultConfig(mvdstdConfig *config, u32 input_width, u32 input_height, u32 output_width, u32 output_height, u32 *vaddr_colorconv_indata, u32 *vaddr_outdata0, u32 *vaddr_outdata1_colorconv);
Result mvdstdInit(mvdstdMode mode, mvdstdTypeInput input_type, mvdstdTypeOutput output_type, u32 size);//The input size isn't used when type==MVDTYPE_COLORFORMATCONV. Video processing / H.264 isn't supported currently.
-Result mvdstdShutdown();
+Result mvdstdShutdown(void);
Result mvdstdSetConfig(mvdstdConfig *config);
Result mvdstdProcessFrame(mvdstdConfig *config, u32 *h264_vaddr_inframe, u32 h264_inframesize, u32 h264_frameid);
*/
-Result newsInit();
-Result newsExit();
+Result newsInit(void);
+Result newsExit(void);
/* NEWSU_AddNotification()
About: Adds a notification to the home menu Notifications applet.
Requires access to "ns:s" service
*/
-Result nsInit();
-Result nsExit();
+Result nsInit(void);
+Result nsExit(void);
/* NS_LaunchTitle()
titleid TitleId of title to launch, if 0, gamecard assumed
Requires access to "pm:app" service
*/
-Result pmInit();
-Result pmExit();
+Result pmInit(void);
+Result pmExit(void);
/* PM_LaunchTitle()
About: Launches a title
Requires access to "ps:ps" service
*/
-Result psInit();
-Result psExit();
+Result psInit(void);
+Result psExit(void);
/* PS_EncryptDecryptAes()
About: Is an interface for the AES Engine, you can only use predetermined keyslots though.
#pragma once
-Result ptmInit();
-Result ptmExit();
+Result ptmInit(void);
+Result ptmExit(void);
Result PTMU_GetShellState(Handle* servhandle, u8 *out);
Result PTMU_GetBatteryLevel(Handle* servhandle, u8 *out);
u32 unk_x2c[5];//"Not used by System_Settings."
} qtmHeadtrackingInfo;
-Result qtmInit();
-void qtmExit();
-bool qtmCheckInitialized();
+Result qtmInit(void);
+void qtmExit(void);
+bool qtmCheckInitialized(void);
Result qtmGetHeadtrackingInfo(u64 val, qtmHeadtrackingInfo *out);//val is normally 0.
bool qtmCheckHeadFullyDetected(qtmHeadtrackingInfo *info);
*
* This will internally get the handle of the service, and on success call Y2RU_DriverInitialize.
*/
-Result y2rInit();
+Result y2rInit(void);
/**
*
* This will internally call Y2RU_DriverFinalize and close the handle of the service.
*/
-Result y2rExit();
+Result y2rExit(void);
/**
#pragma once
-Result srvInit();
-Result srvExit();
-Handle *srvGetSessionHandle();
-Result srvRegisterClient();
+Result srvInit(void);
+Result srvExit(void);
+Handle *srvGetSessionHandle(void);
+Result srvRegisterClient(void);
Result srvGetServiceHandle(Handle* out, const char* name);
Result srvRegisterService(Handle* out, const char* name, int maxSessions);
Result srvUnregisterService(const char* name);
-Result srvPmInit();
+Result srvPmInit(void);
Result srvRegisterProcess(u32 procid, u32 count, void *serviceaccesscontrol);
Result srvUnregisterProcess(u32 procid);
void* vramMemAlign(size_t size, size_t alignment);
void* vramRealloc(void* mem, size_t size); // not implemented yet
void vramFree(void* mem);
-u32 vramSpaceFree(); // get free VRAM space in bytes
+u32 vramSpaceFree(void); // get free VRAM space in bytes
}
//---------------------------------------------------------------------------------
-static datetime_t getSysTime() {
+static datetime_t getSysTime(void) {
//---------------------------------------------------------------------------------
u32 s1, s2 = *__datetime_selector & 1;
datetime_t dt;
// Returns number of milliseconds since 1st Jan 1900 00:00.
//---------------------------------------------------------------------------------
-u64 osGetTime() {
+u64 osGetTime(void) {
//---------------------------------------------------------------------------------
datetime_t dt = getSysTime();
}
//---------------------------------------------------------------------------------
-u32 osGetFirmVersion() {
+u32 osGetFirmVersion(void) {
//---------------------------------------------------------------------------------
return (*(u32*)0x1FF80060) & ~0xFF;
}
//---------------------------------------------------------------------------------
-u32 osGetKernelVersion() {
+u32 osGetKernelVersion(void) {
//---------------------------------------------------------------------------------
return (*(u32*)0x1FF80000) & ~0xFF;
}
static Handle acHandle;
-Result acInit()
+Result acInit(void)
{
Result ret = srvGetServiceHandle(&acHandle, "ac:u");
if(!ret)return ret;
return srvGetServiceHandle(&acHandle, "ac:i");
}
-Result acExit()
+Result acExit(void)
{
return svcCloseHandle(acHandle);
}
return (Result)cmdbuf[1];
}
-Result ACU_WaitInternetConnection()
+Result ACU_WaitInternetConnection(void)
{
Handle servhandle = 0;
Result ret=0;
static Handle amHandle = 0;
-Result amInit()
+Result amInit(void)
{
if(srvGetServiceHandle(&amHandle, "am:net") == 0)
return (Result)0;
else return srvGetServiceHandle(&amHandle, "am:app");
}
-Result amExit()
+Result amExit(void)
{
return svcCloseHandle(amHandle);
}
-Handle *amGetSessionHandle()
+Handle *amGetSessionHandle(void)
{
return &amHandle;
}
return (Result)cmdbuf[1];
}
-Result AM_InstallNativeFirm()
+Result AM_InstallNativeFirm(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
return ret;
}
-void hidExit()
+void hidExit(void)
{
if(!hidInitialised) return;
return 0;
}
-void hidScanInput()
+void hidScanInput(void)
{
u32 Id=0;
}
}
-u32 hidKeysHeld()
+u32 hidKeysHeld(void)
{
return kHeld;
}
-u32 hidKeysDown()
+u32 hidKeysDown(void)
{
return kDown;
}
-u32 hidKeysUp()
+u32 hidKeysUp(void)
{
return kUp;
}
return cmdbuf[1];
}
-Result HIDUSER_EnableAccelerometer()
+Result HIDUSER_EnableAccelerometer(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x110000; //request header code
return cmdbuf[1];
}
-Result HIDUSER_DisableAccelerometer()
+Result HIDUSER_DisableAccelerometer(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x120000; //request header code
return cmdbuf[1];
}
-Result HIDUSER_EnableGyroscope()
+Result HIDUSER_EnableGyroscope(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x130000; //request header code
return cmdbuf[1];
}
-Result HIDUSER_DisableGyroscope()
+Result HIDUSER_DisableGyroscope(void)
{
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x140000; //request header code
Handle __httpc_servhandle = 0;
-Result httpcInit()
+Result httpcInit(void)
{
Result ret=0;
return 0;
}
-void httpcExit()
+void httpcExit(void)
{
if(__httpc_servhandle==0)return;
static u32 *iru_sharedmem = NULL;
static u32 iru_sharedmem_size = 0;
-Result irucmd_Initialize()
+Result irucmd_Initialize(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
return ret;
}
-Result irucmd_Shutdown()
+Result irucmd_Shutdown(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
return ret;
}
-Result irucmd_WaitSendTransfer()
+Result irucmd_WaitSendTransfer(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
return ret;
}
-Result IRU_Shutdown()
+Result IRU_Shutdown(void)
{
Result ret = 0;
return 0;
}
-Handle IRU_GetServHandle()
+Handle IRU_GetServHandle(void)
{
return iru_handle;
}
return ret;
}
-void irrstExit()
+void irrstExit(void)
{
if(!irrstUsed)return;
return 0;
}
-void irrstScanInput()
+void irrstScanInput(void)
{
if(!irrstUsed)return;
}
}
-u32 irrstKeysHeld()
+u32 irrstKeysHeld(void)
{
if(irrstUsed)return kHeld;
return 0;
return 0;
}
-Result MIC_Shutdown()
+Result MIC_Shutdown(void)
{
Result ret=0;
return 0;
}
-u32 MIC_GetSharedMemOffsetValue()
+u32 MIC_GetSharedMemOffsetValue(void)
{
u32 pos = 0;
return (Result)cmdbuf[1];
}
-Result MIC_UnmapSharedMem()
+Result MIC_UnmapSharedMem(void)
{
Result ret=0;
u32 *cmdbuf = getThreadCommandBuffer();
return (Result)cmdbuf[1];
}
-Result MIC_cmd5()
+Result MIC_cmd5(void)
{
Result ret=0;
u32 *cmdbuf = getThreadCommandBuffer();
return cmdbuf[1];
}
-static Result mvdstdipc_Shutdown()
+static Result mvdstdipc_Shutdown(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00020000; //request header code
return cmdbuf[1];
}
-static Result mvdstdipc_cmd18()
+static Result mvdstdipc_cmd18(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00180000; //request header code
return cmdbuf[1];
}
-static Result mvdstdipc_cmd19()
+static Result mvdstdipc_cmd19(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x00190000; //request header code
return cmdbuf[1];
}
-static Result mvdstdipc_cmd1a()
+static Result mvdstdipc_cmd1a(void)
{
u32* cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = 0x001A0000; //request header code
return 0;
}
-Result mvdstdShutdown()
+Result mvdstdShutdown(void)
{
if(!mvdstdInitialized)return 0;
static Handle newsHandle = 0;
-Result newsInit() {
+Result newsInit(void) {
return srvGetServiceHandle(&newsHandle, "news:u");
}
-Result newsExit() {
+Result newsExit(void) {
return svcCloseHandle(newsHandle);
}
static Handle nsHandle;
-Result nsInit()
+Result nsInit(void)
{
return srvGetServiceHandle(&nsHandle, "ns:s");
}
-Result nsExit()
+Result nsExit(void)
{
return svcCloseHandle(nsHandle);
}
static Handle pmHandle;
-Result pmInit()
+Result pmInit(void)
{
return srvGetServiceHandle(&pmHandle, "pm:app");
}
-Result pmExit()
+Result pmExit(void)
{
return svcCloseHandle(pmHandle);
}
static Handle psHandle;
-Result psInit()
+Result psInit(void)
{
return srvGetServiceHandle(&psHandle, "ps:ps");
}
-Result psExit()
+Result psExit(void)
{
return svcCloseHandle(psHandle);
}
static Handle ptmHandle;
-Result ptmInit()
+Result ptmInit(void)
{
return srvGetServiceHandle(&ptmHandle, "ptm:u");
}
-Result ptmExit()
+Result ptmExit(void)
{
return svcCloseHandle(ptmHandle);
}
static bool qtmInitialized = false;
-Result qtmInit()
+Result qtmInit(void)
{
Result ret=0;
return 0;
}
-void qtmExit()
+void qtmExit(void)
{
if(!qtmInitialized)return;
qtmInitialized = false;
}
-bool qtmCheckInitialized()
+bool qtmCheckInitialized(void)
{
return qtmInitialized;
}
}
-Result srvInit()
+Result srvInit(void)
{
Result rc = 0;
return rc;
}
-Result srvExit()
+Result srvExit(void)
{
if(g_srv_handle != 0)svcCloseHandle(g_srv_handle);
return 0;
}
-Handle *srvGetSessionHandle()
+Handle *srvGetSessionHandle(void)
{
return &g_srv_handle;
}
-Result srvRegisterClient()
+Result srvRegisterClient(void)
{
Result rc = 0;
}
// Old srv:pm interface, will only work on systems where srv:pm was a port (<7.X)
-Result srvPmInit()
+Result srvPmInit(void)
{
Result rc = 0;