1 #ifndef __RK_IIO_COMMON_ 2 #define __RK_IIO_COMMON_ 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #define _CAPI __attribute__((visibility("default"))) 9 10 typedef unsigned char RK_U8; 11 typedef unsigned short RK_U16; 12 typedef unsigned int RK_U32; 13 14 typedef signed char RK_S8; 15 typedef short RK_S16; 16 typedef int RK_S32; 17 18 typedef unsigned long RK_UL; 19 typedef signed long RK_SL; 20 21 typedef float RK_FLOAT; 22 typedef double RK_DOUBLE; 23 24 #ifndef _M_IX86 25 typedef unsigned long long RK_U64; 26 typedef long long RK_S64; 27 #else 28 typedef unsigned __int64 RK_U64; 29 typedef __int64 RK_S64; 30 #endif 31 32 typedef char RK_CHAR; 33 // #define RK_VOID void 34 35 typedef enum { 36 RK_FALSE = 0, 37 RK_TRUE = 1, 38 } RK_BOOL; 39 40 #ifndef NULL 41 #define NULL 0L 42 #endif 43 44 enum RKIIO_RETURN_E { 45 RKIIO_ERR_NO_ERR = 0, 46 RKIIO_ERR_NULL_PTR, 47 RKIIO_ERR_ILLEGAL_PARAM, 48 RKIIO_ERR_MISMATCH_MODE, 49 RKIIO_ERR_NO_SCAN_ELEMENT, 50 RKIIO_ERR_MEM_FULL, 51 RKIIO_ERR_DEV_BUSY, 52 RKIIO_NO_CTX, 53 RKIIO_RESERVED_FUNC, 54 RKIIO_NO_MATCH_DEV, 55 RKIIO_NOT_READY, 56 RKIIO_ERR_NO_DEV, 57 RKIIO_ERR_UNSUPPORT, 58 59 // for RKIIO_BUFFER 60 RKIIO_ERR_BUFFER_FULL, 61 RKIIO_ERR_NO_BUFFER, 62 RKIIO_ERR_BUFFER_NO_DATA, 63 }; 64 65 #ifdef __cplusplus 66 } 67 #endif 68 69 #endif // #ifndef __RK_IIO_COMMON_