Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
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.
Message:

Merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/led_dev.c

    r8db09e4 r15d0046  
    11/*
    2  * Copyright (c) 2011 Jan Vesely
     2 * Copyright (c) 2014 Martin Decky
    33 * All rights reserved.
    44 *
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvmouse
     28
     29/** @addtogroup libc
    2930 * @{
    3031 */
    3132/** @file
    32  * @brief ps/2 mouse driver.
    3333 */
    3434
    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>
    3740
    38 #include <libarch/types.h>
    39 #include <async.h>
     41int 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}
    4055
    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/** @}
    4757 */
Note: See TracChangeset for help on using the changeset viewer.