/* This message uses no message fields. */
#define TTY_INPUT_EVENT (TTY_RQ_BASE + 3) /* relayed input event */
-/* This message shares its message fields with INPUT_EVENT. */
+# define INPUT_PAGE m7_i2 /* usage page */
+# define INPUT_CODE m7_i3 /* usage code */
+# define INPUT_VALUE m7_i4 /* event value */
/*===========================================================================*
* Messages for input server and drivers *
# define INPUT_LED_MASK m7_i1 /* status mask of LEDs */
#define INPUT_EVENT (INPUT_RS_BASE + 0) /* send input event */
-# define INPUT_ID m7_i1 /* device ID */
-# define INPUT_PAGE m7_i2 /* usage page */
-# define INPUT_CODE m7_i3 /* usage code */
-# define INPUT_VALUE m7_i4 /* event value */
-# define INPUT_FLAGS m7_i5 /* flags associated with value */
/*===========================================================================*
* VFS-FS TRANSACTION IDs *
} mess_input_linputdriver_input_conf;
_ASSERT_MSG_SIZE(mess_input_linputdriver_input_conf);
+typedef struct {
+ int id;
+ int page;
+ int code;
+ int value;
+ int flags;
+
+ uint8_t padding[36];
+} mess_linputdriver_input_event;
+_ASSERT_MSG_SIZE(mess_linputdriver_input_event);
+
typedef struct {
uint32_t flags;
endpoint_t endpoint;
mess_li2cdriver_i2c_busc_i2c_exec m_li2cdriver_i2c_busc_i2c_exec;
mess_li2cdriver_i2c_busc_i2c_reserve m_li2cdriver_i2c_busc_i2c_reserve;
+ mess_linputdriver_input_event m_linputdriver_input_event;
+
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
memset(&m, 0, sizeof(m));
m.m_type = INPUT_EVENT;
- m.INPUT_ID = id;
- m.INPUT_PAGE = page;
- m.INPUT_CODE = code;
- m.INPUT_VALUE = value;
- m.INPUT_FLAGS = flags;
+ m.m_linputdriver_input_event.id = id;
+ m.m_linputdriver_input_event.page = page;
+ m.m_linputdriver_input_event.code = code;
+ m.m_linputdriver_input_event.value = value;
+ m.m_linputdriver_input_event.flags = flags;
/*
* Use a blocking send call, for two reasons. First, this avoids the
#endif
}
next = (input_dev->tail + input_dev->count) % EVENTBUF_SIZE;
- input_dev->eventbuf[next].page = m->INPUT_PAGE;
- input_dev->eventbuf[next].code = m->INPUT_CODE;
- input_dev->eventbuf[next].value = m->INPUT_VALUE;
- input_dev->eventbuf[next].flags = m->INPUT_FLAGS;
- input_dev->eventbuf[next].devid = m->INPUT_ID;
+ input_dev->eventbuf[next].page = m->m_linputdriver_input_event.page;
+ input_dev->eventbuf[next].code = m->m_linputdriver_input_event.code;
+ input_dev->eventbuf[next].value = m->m_linputdriver_input_event.value;
+ input_dev->eventbuf[next].flags = m->m_linputdriver_input_event.flags;
+ input_dev->eventbuf[next].devid = m->m_linputdriver_input_event.id;
input_dev->eventbuf[next].rsvd[0] = 0;
input_dev->eventbuf[next].rsvd[1] = 0;
input_dev->count++;
int r, id;
/* Unlike minor numbers, device IDs are in fact array indices. */
- id = m->INPUT_ID;
+ id = m->m_linputdriver_input_event.id;
if (id < 0 || id >= INPUT_DEV_MAX)
return;