Changeset ea28272 in mainline for uspace/drv/test1/char.c


Ignore:
Timestamp:
2010-12-30T13:43:27Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d770deb
Parents:
d70d80ed (diff), f418e51 (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/drv/test1/char.c

    rd70d80ed rea28272  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2010 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
    30  * @{
     29/** @file
    3130 */
    3231
    33 /**
    34  * @file
    35  * @brief Wrapper for explicit 64-bit arguments passed to syscalls.
    36  */
     32#include <assert.h>
     33#include <errno.h>
     34#include <mem.h>
     35#include <char.h>
    3736
    38 #ifndef KERN_SYSARG64_H_
    39 #define KERN_SYSARG64_H_
     37#include "test1.h"
    4038
    41 typedef struct {
    42         unsigned long long value;
    43 } sysarg64_t;
     39static int impl_char_read(device_t *dev, char *buf, size_t count) {
     40        memset(buf, 0, count);
     41        return count;
     42}
    4443
    45 #endif
     44static int imp_char_write(device_t *dev, char *buf, size_t count) {
     45        return count;
     46}
    4647
    47 /** @}
    48  */
     48static char_iface_t char_interface = {
     49        .read = &impl_char_read,
     50        .write = &imp_char_write
     51};
     52
     53device_ops_t char_device_ops = {
     54        .interfaces[CHAR_DEV_IFACE] = &char_interface
     55};
     56
Note: See TracChangeset for help on using the changeset viewer.