145 lines
9.8 KiB
C
145 lines
9.8 KiB
C
|
#ifndef __OPENSDK_API_H__
|
||
|
#define __OPENSDK_API_H__
|
||
|
|
||
|
|
||
|
typedef uint32_t (*func0)(void);
|
||
|
typedef uint32_t (*func1)(uint32_t p1);
|
||
|
typedef uint32_t (*func2)(uint32_t p1, uint32_t p2);
|
||
|
typedef uint32_t (*func3)(uint32_t p1, uint32_t p2, uint32_t p3);
|
||
|
typedef uint32_t (*func4)(uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4);
|
||
|
typedef uint32_t (*funcx)(char *format, ...);
|
||
|
|
||
|
|
||
|
extern uint32_t gSyscallTable;
|
||
|
|
||
|
|
||
|
#ifdef FEATURE_SUBSYS_PCM_RECORD_ENABLE
|
||
|
#define audioRecordAdpcm ((func1)(*((uint32_t *)gSyscallTable + 659)))
|
||
|
#define audioRecordG726 ((func1)(*((uint32_t *)gSyscallTable + 658)))
|
||
|
#endif
|
||
|
#define audioPlayMp3 ((func4)(*((uint32_t *)gSyscallTable + 657)))
|
||
|
#define audioPlayWav ((func2)(*((uint32_t *)gSyscallTable + 656)))
|
||
|
#define audioPlayPcm ((func3)(*((uint32_t *)gSyscallTable + 655)))
|
||
|
#define audioPlayTts ((func2)(*((uint32_t *)gSyscallTable + 654)))
|
||
|
#define audioAdjustVolume ((func1)(*((uint32_t *)gSyscallTable + 653)))
|
||
|
#define audioIsReady ((func0)(*((uint32_t *)gSyscallTable + 652)))
|
||
|
#define audioIsBusy ((func0)(*((uint32_t *)gSyscallTable + 651)))
|
||
|
#define audioGetVolume ((func0)(*((uint32_t *)gSyscallTable + 650)))
|
||
|
|
||
|
#define mountApp ((func2)(*((uint32_t *)gSyscallTable + 641)))
|
||
|
#define setActiveApp ((func1)(*((uint32_t *)gSyscallTable + 640)))
|
||
|
|
||
|
#define file_remove ((func1)(*((uint32_t *)gSyscallTable + 623)))
|
||
|
#define file_fopen ((func2)(*((uint32_t *)gSyscallTable + 622)))
|
||
|
#define file_fclose ((func1)(*((uint32_t *)gSyscallTable + 621)))
|
||
|
#define file_fread ((func4)(*((uint32_t *)gSyscallTable + 620)))
|
||
|
#define file_fwrite ((func4)(*((uint32_t *)gSyscallTable + 619)))
|
||
|
#define file_fseek ((func3)(*((uint32_t *)gSyscallTable + 618)))
|
||
|
#define file_ftell ((func1)(*((uint32_t *)gSyscallTable + 617)))
|
||
|
#define file_rewind ((func1)(*((uint32_t *)gSyscallTable + 616)))
|
||
|
#define file_fstat ((func2)(*((uint32_t *)gSyscallTable + 615)))
|
||
|
#define file_truncate ((func2)(*((uint32_t *)gSyscallTable + 614)))
|
||
|
#define fsDirOpen ((func2)(*((uint32_t *)gSyscallTable + 613)))
|
||
|
#define fsDirClose ((func1)(*((uint32_t *)gSyscallTable + 612)))
|
||
|
#define fsDirRead ((func2)(*((uint32_t *)gSyscallTable + 611)))
|
||
|
#define fsStatFs ((func1)(*((uint32_t *)gSyscallTable + 610)))
|
||
|
|
||
|
#define globalmapInit ((func3)(*((uint32_t *)gSyscallTable + 602)))
|
||
|
#define globalItemSet ((func2)(*((uint32_t *)gSyscallTable + 601)))
|
||
|
#define globalItemGet ((func1)(*((uint32_t *)gSyscallTable + 600)))
|
||
|
|
||
|
#define slpManPlatVoteDisableSleep ((func2)(*((uint32_t *)gSyscallTable + 309)))
|
||
|
#define slpManPlatVoteEnableSleep ((func2)(*((uint32_t *)gSyscallTable + 308)))
|
||
|
#define slpManApplyPlatVoteHandle ((func2)(*((uint32_t *)gSyscallTable + 307)))
|
||
|
#define GPIO_pinRead ((func2)(*((uint32_t *)gSyscallTable + 306)))
|
||
|
#define GPIO_pinWrite ((func3)(*((uint32_t *)gSyscallTable + 305)))
|
||
|
#define GPIO_pinConfig ((func3)(*((uint32_t *)gSyscallTable + 304)))
|
||
|
#define PAD_setPinPullConfig ((func2)(*((uint32_t *)gSyscallTable + 303)))
|
||
|
#define PAD_setPinConfig ((func2)(*((uint32_t *)gSyscallTable + 302)))
|
||
|
#define PAD_getDefaultConfig ((func1)(*((uint32_t *)gSyscallTable + 301)))
|
||
|
#define pwrKeyStartPowerOff ((func0)(*((uint32_t *)gSyscallTable + 300)))
|
||
|
|
||
|
#define osKernelInitialize ((func0)(*((uint32_t *)gSyscallTable + 275)))
|
||
|
#define osKernelGetInfo ((func3)(*((uint32_t *)gSyscallTable + 274)))
|
||
|
#define osKernelGetState ((func0)(*((uint32_t *)gSyscallTable + 273)))
|
||
|
#define osKernelStart ((func0)(*((uint32_t *)gSyscallTable + 272)))
|
||
|
#define osKernelLock ((func0)(*((uint32_t *)gSyscallTable + 271)))
|
||
|
#define osKernelUnlock ((func0)(*((uint32_t *)gSyscallTable + 270)))
|
||
|
#define osKernelRestoreLock ((func1)(*((uint32_t *)gSyscallTable + 269)))
|
||
|
#define osKernelGetTickCount ((func0)(*((uint32_t *)gSyscallTable + 268)))
|
||
|
#define osTimerGetExpiryTime ((func1)(*((uint32_t *)gSyscallTable + 267)))
|
||
|
#define osKernelGetTickFreq ((func0)(*((uint32_t *)gSyscallTable + 266)))
|
||
|
#define osKernelGetSysTimerCount ((func0)(*((uint32_t *)gSyscallTable + 265)))
|
||
|
#define osKernelGetSysTimerFreq ((func0)(*((uint32_t *)gSyscallTable + 264)))
|
||
|
#define osThreadNew ((func3)(*((uint32_t *)gSyscallTable + 263)))
|
||
|
#define osThreadGetNumber ((func1)(*((uint32_t *)gSyscallTable + 262)))
|
||
|
#define osThreadGetName ((func1)(*((uint32_t *)gSyscallTable + 261)))
|
||
|
#define osThreadGetId ((func0)(*((uint32_t *)gSyscallTable + 260)))
|
||
|
#define osThreadGetState ((func1)(*((uint32_t *)gSyscallTable + 259)))
|
||
|
#define osThreadGetStackSpace ((func1)(*((uint32_t *)gSyscallTable + 258)))
|
||
|
#define osThreadSetPriority ((func2)(*((uint32_t *)gSyscallTable + 257)))
|
||
|
#define osThreadGetPriority ((func1)(*((uint32_t *)gSyscallTable + 256)))
|
||
|
#define osThreadYield ((func0)(*((uint32_t *)gSyscallTable + 255)))
|
||
|
#define osThreadSuspend ((func1)(*((uint32_t *)gSyscallTable + 254)))
|
||
|
#define osThreadIsSuspendAll ((func0)(*((uint32_t *)gSyscallTable + 253)))
|
||
|
#define osThreadResume ((func1)(*((uint32_t *)gSyscallTable + 252)))
|
||
|
#define osThreadSuspendAll ((func0)(*((uint32_t *)gSyscallTable + 251)))
|
||
|
#define osThreadResumeAll ((func0)(*((uint32_t *)gSyscallTable + 250)))
|
||
|
#define osThreadExit ((func0)(*((uint32_t *)gSyscallTable + 249)))
|
||
|
#define osThreadTerminate ((func1)(*((uint32_t *)gSyscallTable + 248)))
|
||
|
#define osThreadGetCount ((func0)(*((uint32_t *)gSyscallTable + 247)))
|
||
|
#define osThreadEnumerate ((func2)(*((uint32_t *)gSyscallTable + 246)))
|
||
|
#define osThreadFlagsSet ((func2)(*((uint32_t *)gSyscallTable + 245)))
|
||
|
#define osThreadFlagsClear ((func1)(*((uint32_t *)gSyscallTable + 244)))
|
||
|
#define osThreadFlagsGet ((func0)(*((uint32_t *)gSyscallTable + 243)))
|
||
|
#define osThreadFlagsWait ((func3)(*((uint32_t *)gSyscallTable + 242)))
|
||
|
#define osDelay ((func1)(*((uint32_t *)gSyscallTable + 241)))
|
||
|
#define osDelayUntil ((func1)(*((uint32_t *)gSyscallTable + 240)))
|
||
|
#define osTimerNew ((func4)(*((uint32_t *)gSyscallTable + 239)))
|
||
|
#define osTimerGetName ((func1)(*((uint32_t *)gSyscallTable + 238)))
|
||
|
#define osTimerStart ((func2)(*((uint32_t *)gSyscallTable + 237)))
|
||
|
#define osTimerStop ((func1)(*((uint32_t *)gSyscallTable + 236)))
|
||
|
#define osTimerIsRunning ((func1)(*((uint32_t *)gSyscallTable + 235)))
|
||
|
#define osTimerDelete ((func1)(*((uint32_t *)gSyscallTable + 234)))
|
||
|
#define osEventFlagsNew ((func1)(*((uint32_t *)gSyscallTable + 233)))
|
||
|
#define osEventFlagsSet ((func2)(*((uint32_t *)gSyscallTable + 232)))
|
||
|
#define osEventFlagsClear ((func2)(*((uint32_t *)gSyscallTable + 231)))
|
||
|
#define osEventFlagsGet ((func1)(*((uint32_t *)gSyscallTable + 230)))
|
||
|
#define osEventFlagsWait ((func4)(*((uint32_t *)gSyscallTable + 229)))
|
||
|
#define osEventFlagsDelete ((func1)(*((uint32_t *)gSyscallTable + 228)))
|
||
|
#define osMutexNew ((func1)(*((uint32_t *)gSyscallTable + 227)))
|
||
|
#define osMutexAcquire ((func2)(*((uint32_t *)gSyscallTable + 226)))
|
||
|
#define osMutexRelease ((func1)(*((uint32_t *)gSyscallTable + 225)))
|
||
|
#define osMutexGetOwner ((func1)(*((uint32_t *)gSyscallTable + 224)))
|
||
|
#define osMutexDelete ((func1)(*((uint32_t *)gSyscallTable + 223)))
|
||
|
#define osSemaphoreNew ((func3)(*((uint32_t *)gSyscallTable + 222)))
|
||
|
#define osSemaphoreAcquire ((func2)(*((uint32_t *)gSyscallTable + 221)))
|
||
|
#define osSemaphoreRelease ((func1)(*((uint32_t *)gSyscallTable + 220)))
|
||
|
#define osSemaphoreGetCount ((func1)(*((uint32_t *)gSyscallTable + 219)))
|
||
|
#define osSemaphoreDelete ((func1)(*((uint32_t *)gSyscallTable + 218)))
|
||
|
#define osMessageQueueNew ((func3)(*((uint32_t *)gSyscallTable + 217)))
|
||
|
#define osMessageQueuePut ((func4)(*((uint32_t *)gSyscallTable + 216)))
|
||
|
#define osMessageQueuePutToFront ((func4)(*((uint32_t *)gSyscallTable + 215)))
|
||
|
#define osMessageQueueGet ((func4)(*((uint32_t *)gSyscallTable + 214)))
|
||
|
#define osMessageQueueGetCapacity ((func1)(*((uint32_t *)gSyscallTable + 213)))
|
||
|
#define osMessageQueueGetMsgSize ((func1)(*((uint32_t *)gSyscallTable + 212)))
|
||
|
#define osMessageQueueGetCount ((func1)(*((uint32_t *)gSyscallTable + 211)))
|
||
|
#define osMessageQueueGetSpace ((func1)(*((uint32_t *)gSyscallTable + 210)))
|
||
|
#define osMessageQueueReset ((func1)(*((uint32_t *)gSyscallTable + 209)))
|
||
|
#define osMessageQueueDelete ((func1)(*((uint32_t *)gSyscallTable + 208)))
|
||
|
#define ostaskENTER_CRITICAL ((func0)(*((uint32_t *)gSyscallTable + 207)))
|
||
|
#define ostaskEXIT_CRITICAL ((func0)(*((uint32_t *)gSyscallTable + 206)))
|
||
|
#define ostaskENTER_CRITICAL_ISR ((func0)(*((uint32_t *)gSyscallTable + 205)))
|
||
|
#define ostaskEXIT_CRITICAL_ISR ((func1)(*((uint32_t *)gSyscallTable + 204)))
|
||
|
#define osIsInISRContext ((func0)(*((uint32_t *)gSyscallTable + 203)))
|
||
|
#define osTaskSetTimeOutState ((func1)(*((uint32_t *)gSyscallTable + 202)))
|
||
|
#define osTaskCheckForTimeOut ((func2)(*((uint32_t *)gSyscallTable + 201)))
|
||
|
#define osTaskGetFreeHeapSize ((func0)(*((uint32_t *)gSyscallTable + 200)))
|
||
|
|
||
|
#define printf ((funcx)(*((uint32_t *)gSyscallTable + 1)))
|
||
|
|
||
|
#define apiVersion ((uint32_t *)gSyscallTable)
|
||
|
|
||
|
|
||
|
#endif
|