4 #pragma comment(lib,"Advapi32.lib")
23 #define se3_trace(msg) printf msg
25 #define se3_trace(msg)
34 #define SE3_SN_SIZE (32)
41 typedef wchar_t se3_char;
42 #define SE3_MAGIC_FILE (L".se3magic")
43 #define SE3_OSSEP (L'\\')
44 #define SE3_MAX_PATH (256)
51 typedef char se3_char;
52 #define SE3_MAGIC_FILE (".se3magic")
53 #define SE3_OSSEP ('/')
54 #define SE3_MAX_PATH (256)
57 #define SE3_MAGIC_FILE_LEN (9)
60 uint8_t serialno[SE3_SERIAL_SIZE];
61 uint8_t hello_msg[SE3_HELLO_SIZE];
65 #define SE3_DRIVE_BUF_MAX (1024)
71 se3_char buf_[SE3_DRIVE_BUF_MAX + 1];
80 void se3c_rand(
size_t len, uint8_t* buf);
85 bool se3c_write(uint8_t* buf,
se3_file hfile,
size_t block,
size_t size, uint32_t timeout);
86 bool se3c_read(uint8_t* buf,
se3_file hfile,
size_t block,
size_t size, uint32_t timeout);
92 uint64_t se3c_deadline(uint32_t timeout);
93 void se3c_pathcopy(se3_char* dest, se3_char* src);
94 uint64_t se3c_clock();
97 #define se3c_sleep() Sleep(0)
99 #define se3c_sleep() usleep(1000)
102 #define SE3C_MAGIC_TIMEOUT (1000)