Changeset 973be64e in mainline for generic/include/console/chardev.h
- Timestamp:
- 2005-12-10T00:19:57Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fcfac420
- Parents:
- 705b4149
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/console/chardev.h
r705b4149 r973be64e 37 37 #define CHARDEV_BUFLEN 512 38 38 39 struct chardev; 40 39 41 /* Character device operations interface. */ 40 42 struct chardev_operations { 41 void (* suspend)(void); /**< Suspend pushing characters. */ 42 void (* resume)(void); /**< Resume pushing characters. */ 43 void (* suspend)(struct chardev *);/**< Suspend pushing characters. */ 44 void (* resume)(struct chardev *); /**< Resume pushing characters. */ 45 /** Write character to stream */ 46 void (* write)(struct chardev *, char c); 43 47 }; 44 48 … … 47 51 /** Character input device. */ 48 52 struct chardev { 53 char *name; 54 49 55 waitq_t wq; 50 56 spinlock_t lock; /**< Protects everything below. */ 51 57 __u8 buffer[CHARDEV_BUFLEN]; 52 58 count_t counter; 59 chardev_operations_t *op; /**< Implementation of chardev operations. */ 53 60 index_t index; 54 chardev_operations_t *op; /**< Implementation of chardev operations. */61 void *data; 55 62 }; 56 63 57 extern void chardev_initialize(chardev_t *chardev, chardev_operations_t *op); 64 extern void chardev_initialize(char *name, 65 chardev_t *chardev, 66 chardev_operations_t *op); 58 67 void chardev_push_character(chardev_t *chardev, __u8 ch); 59 68
Note:
See TracChangeset
for help on using the changeset viewer.