libiosuhax/source/os_functions.h
dimok789 918491b2db - added sd and usb disc interface that can be used with libfat, libntfs or libext2fs
- added "make wut" target to build the library for WUT applications
- added parameter to IOSUHAX_Open with dev path which can be used to override the default path. If not wanted use NULL or 0.
2016-11-28 18:14:40 +01:00

45 lines
2.4 KiB
C

#ifndef __OS_FUNCTIONS_H_
#define __OS_FUNCTIONS_H_
#ifdef __cplusplus
extern "C" {
#endif
#define OS_MUTEX_SIZE 44
#ifndef __WUT__
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Mutex functions
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extern void (* OSInitMutex)(void* mutex);
extern void (* OSLockMutex)(void* mutex);
extern void (* OSUnlockMutex)(void* mutex);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! IOS function
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extern int (*IOS_Ioctl)(int fd, unsigned int request, void *input_buffer,unsigned int input_buffer_len, void *output_buffer, unsigned int output_buffer_len);
extern int (*IOS_Open)(char *path, unsigned int mode);
extern int (*IOS_Close)(int fd);
#else
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Mutex functions
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extern void OSInitMutex(void* mutex);
extern void OSLockMutex(void* mutex);
extern void OSUnlockMutex(void* mutex);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! IOS function
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extern int IOS_Ioctl(int fd, unsigned int request, void *input_buffer,unsigned int input_buffer_len, void *output_buffer, unsigned int output_buffer_len);
extern int IOS_Open(char *path, unsigned int mode);
extern int IOS_Close(int fd);
#endif // __WUT__
#ifdef __cplusplus
}
#endif
#endif // __OS_FUNCTIONS_H_