19#elif defined( __APPLE__ )
21 #include <IOKit/IOKitLib.h>
22 #include <ApplicationServices/ApplicationServices.h>
23 #include <IOKit/usb/IOUSBLib.h>
25#elif defined( __linux )
28 #include <sys/ioctl.h>
34#include <CArcDeviceDllMain.h>
52 using arcDevHandle_t = HANDLE;
58 constexpr auto ARC_CTRL_ID = 33000;
59 constexpr auto MAP_FAILED = ( uint8_t* )0;
60 constexpr auto ARC_MAX_PATH = _MAX_PATH;
66 #elif defined( __APPLE__ )
71 using arcDevHandle_t = io_connect_t;
77 constexpr auto INVALID_HANDLE_VALUE = IO_OBJECT_NULL;
78 constexpr auto MAX_IOCTL_IN_COUNT = 4;
79 constexpr auto MAX_IOCTL_OUT_COUNT = 2;
80 constexpr auto ARC_MAX_PATH = 512;
95 auto constexpr MKCMD( std::uint32_t uiCmd ) {
return ( 0x41524300 | uiCmd ); }
106 using arcDevHandle_t = int;
112 constexpr auto INVALID_HANDLE_VALUE = int( -1 );
113 constexpr auto ARC_MAX_PATH = 512;
119 auto constexpr MKCMD( std::uint32_t uiCmd ) {
return ( 0x41524300 | uiCmd ); }
135 io_service_t tService;
160 static bool open( arc::gen3::arcDevHandle_t& hDevice,
const arcDev_t& tDevice,
const std::uint64_t uiFlags = 0 )
noexcept;
166 static bool close( arc::gen3::arcDevHandle_t& hDevice )
noexcept;
177 static bool ioctl(
const arcDevHandle_t hDevice,
const std::uint32_t uiCommand,
void* pIn,
const std::uint32_t uiInSize,
void* pOut =
nullptr,
const std::uint32_t uiOutSize = 0 )
noexcept;
185 static void* mmap(
const arcDevHandle_t hDevice,
const std::int32_t iMapCommand,
const std::uint32_t uiSize )
noexcept;
193 static bool munmap(
const arcDevHandle_t hDevice,
const std::int32_t iMapCommand,
void* pAddress,
const std::size_t uiSize )
noexcept;
Definition: CArcBase.h:67
Definition: CArcSystem.h:151
~CArcSystem(void)=default
Definition: CArcSystem.h:131
std::string sName
Definition: CArcSystem.h:132