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


Ignore:
Timestamp:
2011-02-09T11:46:47Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cb15135a
Parents:
a49c4002 (diff), 0b37882 (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

Local modifications:

  • change pipefs and ext2 to build again (use async_* calls instead of ipc_*)
File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/test1/char.c

    ra49c4002 rcf2af94  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2010 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup arp
    30  *  @{
     29/** @file
    3130 */
    3231
    33 /** @file
    34  * ARP operation codes according to the on-line IANA - Address Resolution
    35  * Protocol (ARP) Parameters
    36  * http://www.iana.org/assignments/arp-parameters/arp-parameters.xml
    37  * cited January 14 2009.
    38  */
     32#include <assert.h>
     33#include <errno.h>
     34#include <mem.h>
     35#include <ops/char_dev.h>
    3936
    40 #ifndef NET_ARP_ARPOP_H_
    41 #define NET_ARP_ARPOP_H_
     37#include "test1.h"
    4238
    43 /** @name ARP operation codes definitions */
    44 /*@{*/
     39static int impl_char_read(device_t *dev, char *buf, size_t count) {
     40        memset(buf, 0, count);
     41        return count;
     42}
    4543
    46 /** REQUEST operation code. */
    47 #define ARPOP_REQUEST   1
     44static int imp_char_write(device_t *dev, char *buf, size_t count) {
     45        return count;
     46}
    4847
    49 /** REPLY operation code. */
    50 #define ARPOP_REPLY     2
     48static char_dev_ops_t char_dev_ops = {
     49        .read = &impl_char_read,
     50        .write = &imp_char_write
     51};
    5152
    52 /*@}*/
     53device_ops_t char_device_ops = {
     54        .interfaces[CHAR_DEV_IFACE] = &char_dev_ops
     55};
    5356
    54 #endif
    55 
    56 /** @}
    57  */
Note: See TracChangeset for help on using the changeset viewer.