1 #ifndef TYPEDEF_H__ 2 #define TYPEDEF_H__ 3 4 #include <stdint.h> 5 #include "os.h" 6 7 typedef int8_t __s8; 8 typedef int8_t s8; 9 typedef uint8_t __u8; 10 typedef uint8_t u8; 11 12 typedef int16_t __s16; 13 typedef int16_t s16; 14 typedef uint16_t __u16; 15 typedef uint16_t u16; 16 17 typedef uint32_t __u32; 18 typedef uint32_t u32; 19 typedef int32_t __s32; 20 typedef int32_t s32; 21 22 typedef int64_t __s64; 23 typedef int64_t s64; 24 typedef uint64_t __u64; 25 typedef uint64_t u64; 26 27 #define __packed __attribute__((packed)) 28 #define __aligned(x) __attribute__((__aligned__(x))) 29 30 #ifndef EPDK_OK 31 #define EPDK_OK 0 32 #endif 33 34 #ifndef EPDK_FAIL 35 #define EPDK_FAIL (-1) 36 #endif 37 38 #ifndef EPDK_TRUE 39 #define EPDK_TRUE 1 40 #endif 41 42 #ifndef EPDK_FALSE 43 #define EPDK_FALSE 0 44 #endif 45 46 #ifndef EPDK_DISABLED 47 #define EPDK_DISABLED 0 48 #endif 49 50 #ifndef EPDK_ENABLED 51 #define EPDK_ENABLED 1 52 #endif 53 54 #ifndef EPDK_NO 55 #define EPDK_NO 0 56 #endif 57 58 #ifndef EPDK_YES 59 #define EPDK_YES 1 60 #endif 61 62 #ifndef EPDK_OFF 63 #define EPDK_OFF 0 64 #endif 65 66 #ifndef EPDK_ON 67 #define EPDK_ON 1 68 #endif 69 70 #ifndef EPDK_CLR 71 #define EPDK_CLR 0 72 #endif 73 74 #ifndef EPDK_SET 75 #define EPDK_SET 1 76 #endif 77 78 typedef struct 79 { 80 char gpio_name[32]; 81 int port; 82 int port_num; 83 int mul_sel; 84 int pull; 85 int drv_level; 86 int data; 87 } user_gpio_set_t; 88 89 #endif 90