Changeset b5e68c8 in mainline for uspace/drv/test1/char.c
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (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
re80329d6 rb5e68c8 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 libpacket30 * @{31 */32 33 29 /** @file 34 30 */ 35 31 36 #ifndef LIBPACKET_PACKET_LOCAL_H_ 37 #define LIBPACKET_PACKET_LOCAL_H_ 32 #include <assert.h> 33 #include <errno.h> 34 #include <mem.h> 35 #include <ops/char_dev.h> 38 36 39 #include <net/packet.h>37 #include "test1.h" 40 38 41 /** @name Packet local interface 42 */ 43 /*@{*/ 39 static int impl_char_read(ddf_fun_t *fun, char *buf, size_t count) { 40 memset(buf, 0, count); 41 return count; 42 } 44 43 45 extern int packet_translate_local(int, packet_ref, packet_id_t); 46 extern packet_t packet_get_4_local(int, size_t, size_t, size_t, size_t); 47 extern packet_t packet_get_1_local(int, size_t); 48 extern void pq_release_local(int, packet_id_t); 44 static int imp_char_write(ddf_fun_t *fun, char *buf, size_t count) { 45 return count; 46 } 49 47 50 /*@}*/ 48 static char_dev_ops_t char_dev_ops = { 49 .read = &impl_char_read, 50 .write = &imp_char_write 51 }; 51 52 52 #endif 53 ddf_dev_ops_t char_device_ops = { 54 .interfaces[CHAR_DEV_IFACE] = &char_dev_ops 55 }; 53 56 54 /** @}55 */
Note:
See TracChangeset
for help on using the changeset viewer.