Changeset ea28272 in mainline for uspace/drv/test1/char.c
- Timestamp:
- 2010-12-30T13:43:27Z (14 years ago)
- 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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/test1/char.c
rd70d80ed rea28272 1 1 /* 2 * Copyright (c) 20 06 Jakub Jermar2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup generic 30 * @{ 29 /** @file 31 30 */ 32 31 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> 37 36 38 #ifndef KERN_SYSARG64_H_ 39 #define KERN_SYSARG64_H_ 37 #include "test1.h" 40 38 41 typedef struct { 42 unsigned long long value; 43 } sysarg64_t; 39 static int impl_char_read(device_t *dev, char *buf, size_t count) { 40 memset(buf, 0, count); 41 return count; 42 } 44 43 45 #endif 44 static int imp_char_write(device_t *dev, char *buf, size_t count) { 45 return count; 46 } 46 47 47 /** @} 48 */ 48 static char_iface_t char_interface = { 49 .read = &impl_char_read, 50 .write = &imp_char_write 51 }; 52 53 device_ops_t char_device_ops = { 54 .interfaces[CHAR_DEV_IFACE] = &char_interface 55 }; 56
Note:
See TracChangeset
for help on using the changeset viewer.