Changeset cf2af94 in mainline for uspace/drv/test1/char.c
- Timestamp:
- 2011-02-09T11:46:47Z (14 years ago)
- 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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/test1/char.c
ra49c4002 rcf2af94 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup arp 30 * @{ 29 /** @file 31 30 */ 32 31 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> 39 36 40 #ifndef NET_ARP_ARPOP_H_ 41 #define NET_ARP_ARPOP_H_ 37 #include "test1.h" 42 38 43 /** @name ARP operation codes definitions */ 44 /*@{*/ 39 static int impl_char_read(device_t *dev, char *buf, size_t count) { 40 memset(buf, 0, count); 41 return count; 42 } 45 43 46 /** REQUEST operation code. */ 47 #define ARPOP_REQUEST 1 44 static int imp_char_write(device_t *dev, char *buf, size_t count) { 45 return count; 46 } 48 47 49 /** REPLY operation code. */ 50 #define ARPOP_REPLY 2 48 static char_dev_ops_t char_dev_ops = { 49 .read = &impl_char_read, 50 .write = &imp_char_write 51 }; 51 52 52 /*@}*/ 53 device_ops_t char_device_ops = { 54 .interfaces[CHAR_DEV_IFACE] = &char_dev_ops 55 }; 53 56 54 #endif55 56 /** @}57 */
Note:
See TracChangeset
for help on using the changeset viewer.