Changeset 407 for trunk/kernel/kern/chdev.h
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.h
r346 r407 66 66 67 67 /****************************************************************************************** 68 * This define the generic prototypes for the t wofunctions that must be defined69 * by alldrivers implementing a generic device:70 * - "cmd" : start a nI/O operation.68 * This define the generic prototypes for the three functions that must be defined 69 * by the drivers implementing a generic device: 70 * - "cmd" : start a blocking I/O operation. 71 71 * - "isr" : complete an I/O operation. 72 * The "cmd" and "isr" are registered in the generic chdev descriptor at kernel init, 73 * and are called to start and complete an I/O operation. 72 * - "aux" : not for all drivers (implement special functions) 73 * The "cmd", "isr", and "aux" driver functions are registered in the generic chdev 74 * descriptor at kernel init, and are called to start and complete an I/O operation. 74 75 *****************************************************************************************/ 75 76 … … 77 78 typedef void (dev_cmd_t) ( xptr_t thread ); 78 79 typedef void (dev_isr_t) ( struct chdev_s * dev ); 80 typedef void (dev_aux_t) ( void * args ); 79 81 80 82 /****************************************************************************************** … … 121 123 uint32_t impl; /*! peripheral inplementation subtype */ 122 124 uint32_t channel; /*! channel index */ 123 bool_t is_rx; /*! relevant for NIC peripheral channels only*/125 bool_t is_rx; /*! relevant for NIC and TXT peripherals */ 124 126 xptr_t base; /*! extended pointer on channel device segment */ 125 127 char name[16]; /*! name (required by DEVFS) */ 126 128 127 dev_cmd_t * cmd; /*! local pointer on driver command function */ 128 dev_isr_t * isr; /*! local pointer on driver ISR function */ 129 dev_cmd_t * cmd; /*! local pointer on driver CMD function */ 130 dev_isr_t * isr; /*! local pointer on driver ISR function */ 131 dev_aux_t * aux; /*! local pointer on driver AUX function */ 132 129 133 struct thread_s * server; /*! local pointer on associated server thread */ 130 134 … … 165 169 xptr_t pic; // external / single channel / shared 166 170 167 xptr_t txt[CONFIG_MAX_TXT_CHANNELS]; // external / multi-channels / shared168 171 xptr_t ioc[CONFIG_MAX_IOC_CHANNELS]; // external / multi-channels / shared 169 172 xptr_t fbf[CONFIG_MAX_FBF_CHANNELS]; // external / multi-channels / shared 173 xptr_t txt_rx[CONFIG_MAX_TXT_CHANNELS]; // external / multi-channels / shared 174 xptr_t txt_tx[CONFIG_MAX_TXT_CHANNELS]; // external / multi-channels / shared 170 175 xptr_t nic_rx[CONFIG_MAX_NIC_CHANNELS]; // external / multi-channels / shared 171 176 xptr_t nic_tx[CONFIG_MAX_NIC_CHANNELS]; // external / multi-channels / shared … … 211 216 212 217 /****************************************************************************************** 213 * This function registers a local clientthread in the waiting queue of a remote218 * This function registers the calling thread in the waiting queue of a remote 214 219 * chdev descriptor, activates (i.e. unblock) the server thread associated to chdev, 215 220 * and blocks itself on the THREAD_BLOCKED_IO condition. 216 221 ****************************************************************************************** 217 222 * @ chdev_xp : extended pointer on remote chdev descriptor. 218 * @ thread : local pointer on client thread. 219 *****************************************************************************************/ 220 void chdev_register_command( xptr_t chdev_xp, 221 struct thread_s * thread ); 223 *****************************************************************************************/ 224 void chdev_register_command( xptr_t chdev_xp ); 222 225 223 226 /******************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.