Changeset b7fd2a0 in mainline for uspace/srv/hid/isdv4_tablet/isdv4.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/isdv4_tablet/isdv4.c
r36f0738 rb7fd2a0 294 294 } 295 295 296 static int read_packets(isdv4_state_t *state, packet_consumer_fn consumer)296 static errno_t read_packets(isdv4_state_t *state, packet_consumer_fn consumer) 297 297 { 298 298 bool reading = true; 299 299 while (reading) { 300 300 size_t nread; 301 int rc;301 errno_t rc; 302 302 303 303 rc = chardev_read(state->chardev, state->buf + state->buf_end, … … 363 363 static bool write_command(chardev_t *chardev, uint8_t command) 364 364 { 365 int rc;365 errno_t rc; 366 366 size_t nwr; 367 367 … … 370 370 } 371 371 372 int isdv4_init(isdv4_state_t *state, async_sess_t *sess,372 errno_t isdv4_init(isdv4_state_t *state, async_sess_t *sess, 373 373 isdv4_event_fn event_fn) 374 374 { 375 375 chardev_t *chardev; 376 int rc;376 errno_t rc; 377 377 378 378 rc = chardev_open(sess, &chardev); … … 396 396 } 397 397 398 int isdv4_init_tablet(isdv4_state_t *state)398 errno_t isdv4_init_tablet(isdv4_state_t *state) 399 399 { 400 400 if (!write_command(state->chardev, CMD_STOP)) … … 407 407 return EIO; 408 408 409 int rc = read_packets(state, parse_response_stylus);409 errno_t rc = read_packets(state, parse_response_stylus); 410 410 if (rc != EOK) 411 411 return rc; … … 424 424 } 425 425 426 int isdv4_read_events(isdv4_state_t *state)426 errno_t isdv4_read_events(isdv4_state_t *state) 427 427 { 428 428 return read_packets(state, parse_event);
Note:
See TracChangeset
for help on using the changeset viewer.