Changeset d3109ff in mainline for uspace/srv/hid/output/port/chardev.c
- Timestamp:
- 2024-09-24T17:59:36Z (3 months ago)
- Branches:
- master
- Children:
- 6a753a9c
- Parents:
- 3fcea34
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/output/port/chardev.c
r3fcea34 rd3109ff 1 1 /* 2 * Copyright (c) 2024 Jiri Svoboda 2 3 * Copyright (c) 2016 Jakub Jermar 3 * Copyright (c) 2017 Jiri Svoboda4 4 * All rights reserved. 5 5 * … … 65 65 static FIBRIL_CONDVAR_INITIALIZE(discovery_cv); 66 66 67 static void chardev_flush(void )67 static void chardev_flush(void *arg) 68 68 { 69 69 size_t nwr; 70 71 (void)arg; 70 72 71 73 if (chardev_bused == 0) … … 81 83 { 82 84 if (chardev_bused == chardev_buf_size) 83 chardev_flush( );85 chardev_flush(NULL); 84 86 chardev_buf[chardev_bused++] = (uint8_t) ch; 85 87 } 86 88 87 static void chardev_putuchar( char32_t ch)89 static void chardev_putuchar(void *arg, char32_t ch) 88 90 { 89 91 char buf[STR_BOUNDS(1)]; … … 92 94 errno_t rc; 93 95 96 (void)arg; 97 94 98 off = 0; 95 99 rc = chr_encode(ch, buf, &off, sizeof(buf)); … … 101 105 } 102 106 103 static void chardev_control_puts( const char *str)107 static void chardev_control_puts(void *arg, const char *str) 104 108 { 105 109 const char *p; … … 107 111 p = str; 108 112 while (*p != '\0') 109 chardev_putuchar( *p++);113 chardev_putuchar(arg, *p++); 110 114 } 111 115
Note:
See TracChangeset
for help on using the changeset viewer.