Changeset acac2ef in mainline
- Timestamp:
- 2011-12-27T11:53:42Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- edb3cf2
- Parents:
- da2d75b
- Location:
- uspace/drv/char/ps2mouse
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ps2mouse/main.c
rda2d75b racac2ef 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drv kbd28 /** @addtogroup drvmouse 29 29 * @{ 30 30 */ 31 31 /** @file 32 * @brief XT keyboarddriver32 * @brief ps/2 mouse driver 33 33 */ 34 34 … … 47 47 48 48 static int mouse_add(ddf_dev_t *device); 49 49 /*----------------------------------------------------------------------------*/ 50 /** DDF driver ops. */ 50 51 static driver_ops_t mouse_driver_ops = { 51 52 .dev_add = mouse_add, 52 53 }; 53 54 /*----------------------------------------------------------------------------*/ 55 /** DDF driver structure. */ 54 56 static driver_t mouse_driver = { 55 57 .name = NAME, 56 58 .driver_ops = &mouse_driver_ops 57 59 }; 58 60 /*----------------------------------------------------------------------------*/ 59 61 /** Initialize global driver structures (NONE). 60 62 * … … 71 73 return ddf_driver_main(&mouse_driver); 72 74 } 73 74 /** Initialize a new ddf driver instance of the driver75 /*----------------------------------------------------------------------------*/ 76 /** Initialize a new ddf driver instance 75 77 * 76 78 * @param[in] device DDF instance of the device to initialize. -
uspace/drv/char/ps2mouse/ps2mouse.c
rda2d75b racac2ef 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drv kbd28 /** @addtogroup drvmouse 29 29 * @{ 30 30 */ 31 31 /** @file 32 * @brief XT keyboard driver;32 * @brief ps2 mouse driver. 33 33 */ 34 34 … … 64 64 /*----------------------------------------------------------------------------*/ 65 65 static int polling_ps2(void *); 66 static void default_connection_handler(ddf_fun_t * fun,67 ipc_callid_t icallid, ipc_call_t *icall); 68 /* ----------------------------------------------------------------------------*/66 static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *); 67 /*----------------------------------------------------------------------------*/ 68 /** ps/2 mouse driver ops. */ 69 69 static ddf_dev_ops_t mouse_ops = { 70 70 .default_handler = default_connection_handler 71 71 }; 72 72 /*----------------------------------------------------------------------------*/ 73 /** Initialize mouse driver structure. 74 * @param kbd Mouse driver structure to initialize. 75 * @param dev DDF device structure. 76 * 77 * Connects to parent, creates keyboard function, starts polling fibril. 78 */ 73 79 int ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev) 74 80 { … … 139 145 } 140 146 /*----------------------------------------------------------------------------*/ 147 /** Get data and parse ps2 protocol packets. 148 * @param arg Pointer to ps2_mouse_t structure. 149 * @return Never. 150 */ 141 151 int polling_ps2(void *arg) 142 152 { 143 153 assert(arg); 144 ps2_mouse_t *mouse = arg;154 const ps2_mouse_t *mouse = arg; 145 155 146 156 assert(mouse->parent_sess); … … 186 196 } 187 197 /*----------------------------------------------------------------------------*/ 198 /** Default handler for IPC methods not handled by DDF. 199 * 200 * @param fun Device function handling the call. 201 * @param icallid Call id. 202 * @param icall Call data. 203 */ 188 204 void default_connection_handler(ddf_fun_t *fun, 189 205 ipc_callid_t icallid, ipc_call_t *icall) -
uspace/drv/char/ps2mouse/ps2mouse.h
rda2d75b racac2ef 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup drv kbd28 /** @addtogroup drvmouse 29 29 * @{ 30 30 */ 31 31 /** @file 32 * @brief XT keyboard driver;32 * @brief ps/2 mouse driver. 33 33 */ 34 34 35 #ifndef _ XT_KBD_H_36 #define _ XT_KBD_H_35 #ifndef _PS2MOUSE_H_ 36 #define _PS2MOUSE_H_ 37 37 38 38 #include <ddf/driver.h> 39 39 #include <fibril.h> 40 40 41 /** PS/2 mouse driver structure. */ 41 42 typedef struct { 42 ddf_fun_t *mouse_fun; 43 async_sess_t *parent_sess; 44 async_sess_t *input_sess; 45 fid_t polling_fibril; 43 ddf_fun_t *mouse_fun; /**< Mouse function. */ 44 async_sess_t *parent_sess; /**< Connection to device providing data. */ 45 async_sess_t *input_sess; /**< Callback connection to consumer. */ 46 fid_t polling_fibril; /**< Fibril retrieving an parsing data. */ 46 47 } ps2_mouse_t; 47 48
Note:
See TracChangeset
for help on using the changeset viewer.