00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef LIBSDIO_INTERNAL_H
00010 #define LIBSDIO_INTERNAL_H
00011
00012 struct cmd_queue_elem {
00013 struct cmd_queue_elem *next;
00014 sdio_io_callback_t callback;
00015 void *arg;
00016 struct sdioemb_uif_cmd cmd;
00017 uint8_t write8_data;
00018 };
00019
00020 struct cmd_queue {
00021 struct cmd_queue_elem *head;
00022 struct cmd_queue_elem *tail;
00023 pthread_cond_t cond;
00024 };
00025
00026 struct sdio_uif {
00027 void (*int_handler)(struct sdio_uif *, void *);
00028 void *arg;
00029 int fd;
00030 pthread_t int_thread;
00031 pthread_mutex_t mutex;
00032 pthread_cond_t int_cond;
00033 int int_masked;
00034
00035 struct cmd_queue cmd_queue;
00036 pthread_t async_thread;
00037 };
00038
00039 int uif_ioctl(int fd, int request, ...);
00040 void uif_mutex_unlock(void *);
00041 int async_thread_start(sdio_uif_t uif);
00042 void async_thread_stop(sdio_uif_t uif);
00043
00044 #endif