diff options
Diffstat (limited to 'uim.h')
-rw-r--r-- | uim.h | 54 |
1 files changed, 19 insertions, 35 deletions
@@ -19,6 +19,11 @@ #ifndef UIM_H #define UIM_H +/* the line discipline ideally should be coming + * from tty.h + */ +#define N_TI_WL 22 + /* Paramaters to set the baud rate*/ #define FLOW_CTL 0x0001 #define BOTHER 0x00001000 @@ -52,26 +57,21 @@ #define EVT_CMD_COMPLETE 0x0E #define EVT_CMD_STATUS 0x0F +/* use it for string lengths and buffers */ +#define UART_DEV_NAME_LEN 32 +/* BD address length in format xx:xx:xx:xx:xx:xx */ +#define BD_ADDR_LEN 17 + +/* the sysfs entries with device configuration set by + * shared transport driver + */ +#define INSTALL_SYSFS_ENTRY "/sys/devices/platform/kim/install" +#define DEV_NAME_SYSFS "/sys/devices/platform/kim/dev_name" +#define BAUD_RATE_SYSFS "/sys/devices/platform/kim/baud_rate" +#define FLOW_CTRL_SYSFS "/sys/devices/platform/kim/flow_cntrl" -#define VERBOSE -#ifdef ANDROID -#define LOG_TAG "uim-rfkill: " -#define UIM_ERR(fmt, arg...) LOGE("uim:"fmt"\n" , ##arg) -#if defined(UIM_DEBUG) /* limited debug messages */ -#define UIM_START_FUNC() LOGE("uim: Inside %s", __FUNCTION__) -#define UIM_DBG(fmt, arg...) LOGE("uim:"fmt"\n" , ## arg) -#define UIM_VER(fmt, arg...) -#elif defined(VERBOSE) /* very verbose */ -#define UIM_START_FUNC() LOGE("uim: Inside %s", __FUNCTION__) -#define UIM_DBG(fmt, arg...) LOGE("uim:"fmt"\n" , ## arg) -#define UIM_VER(fmt, arg...) LOGE("uim:"fmt"\n" , ## arg) -#else /* error msgs only */ -#define UIM_START_FUNC() -#define UIM_DBG(fmt, arg...) -#define UIM_VER(fmt, arg...) -#endif -#endif /* ANDROID */ +#define VERBOSE /*Debug logs*/ #define UIM_ERR(fmt, arg...) printf("uim:"fmt"\n" , ##arg) #if defined(UIM_DEBUG) /* limited debug messages */ @@ -79,7 +79,7 @@ #define UIM_DBG(fmt, arg...) printf("uim:"fmt"\n" , ## arg) #define UIM_VER(fmt, arg...) #elif defined(VERBOSE) /* very verbose */ -#define UIM_START_FUNC() printf("uim: Inside %s", __FUNCTION__) +#define UIM_START_FUNC() printf("uim:@ %s\n", __FUNCTION__) #define UIM_DBG(fmt, arg...) printf("uim:"fmt"\n" , ## arg) #define UIM_VER(fmt, arg...) printf("uim:"fmt"\n" , ## arg) #else /* error msgs only */ @@ -153,20 +153,4 @@ typedef struct { bdaddr_t addr; } __attribute__ ((packed)) uim_bdaddr_change_cmd;\ -/* Signal received from KIM will install line discipline at first, - * the next signal received from KIM will un-install the - * line discipline*/ -enum { - /* expecting signal from KIM to setup uart fd for ST */ - INSTALL_N_TI_WL, - - /* expecting signal from KIM to close uart fd */ - UNINSTALL_N_TI_WL, -}; - -/* Functions to insert and remove the kernel modules from the system*/ -extern int init_module(void *, unsigned int, const char *); -extern int delete_module(const char *, unsigned int); -extern int load_file(const char *, unsigned int *); - #endif /* UIM_H */ |