Changeset 15d0046 in mainline for uspace/lib/c/generic/device/led_dev.c
- Timestamp:
- 2014-09-12T13:22:33Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b20126
- Parents:
- 8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/device/led_dev.c
r8db09e4 r15d0046 1 1 /* 2 * Copyright (c) 201 1 Jan Vesely2 * Copyright (c) 2014 Martin Decky 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drvmouse 28 29 /** @addtogroup libc 29 30 * @{ 30 31 */ 31 32 /** @file 32 * @brief ps/2 mouse driver.33 33 */ 34 34 35 #ifndef _CHARDEV_H_ 36 #define _CHARDEV_H_ 35 #include <errno.h> 36 #include <async.h> 37 #include <io/pixel.h> 38 #include <ipc/dev_iface.h> 39 #include <device/led_dev.h> 37 40 38 #include <libarch/types.h> 39 #include <async.h> 41 int led_dev_color_set(async_sess_t *sess, pixel_t pixel) 42 { 43 async_exch_t *exch = async_exchange_begin(sess); 44 45 aid_t req = async_send_2(exch, DEV_IFACE_ID(LED_DEV_IFACE), 46 LED_DEV_COLOR_SET, (sysarg_t) pixel, NULL); 47 48 async_exchange_end(exch); 49 50 sysarg_t rc; 51 async_wait_for(req, &rc); 52 53 return (int) rc; 54 } 40 55 41 ssize_t chardev_read(async_exch_t *, void *, size_t); 42 ssize_t chardev_write(async_exch_t *, const void *, size_t); 43 44 #endif 45 /** 46 * @} 56 /** @} 47 57 */
Note:
See TracChangeset
for help on using the changeset viewer.