Changeset acac2ef in mainline


Ignore:
Timestamp:
2011-12-27T11:53:42Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
edb3cf2
Parents:
da2d75b
Message:

ps2mouse: Doxygen.

Location:
uspace/drv/char/ps2mouse
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ps2mouse/main.c

    rda2d75b racac2ef  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvkbd
     28/** @addtogroup drvmouse
    2929 * @{
    3030 */
    3131/** @file
    32  * @brief XT keyboard driver
     32 * @brief ps/2 mouse driver
    3333 */
    3434
     
    4747
    4848static int mouse_add(ddf_dev_t *device);
    49 
     49/*----------------------------------------------------------------------------*/
     50/** DDF driver ops. */
    5051static driver_ops_t mouse_driver_ops = {
    5152        .dev_add = mouse_add,
    5253};
    53 
     54/*----------------------------------------------------------------------------*/
     55/** DDF driver structure. */
    5456static driver_t mouse_driver = {
    5557        .name = NAME,
    5658        .driver_ops = &mouse_driver_ops
    5759};
    58 
     60/*----------------------------------------------------------------------------*/
    5961/** Initialize global driver structures (NONE).
    6062 *
     
    7173        return ddf_driver_main(&mouse_driver);
    7274}
    73 
    74 /** Initialize a new ddf driver instance of the driver
     75/*----------------------------------------------------------------------------*/
     76/** Initialize a new ddf driver instance
    7577 *
    7678 * @param[in] device DDF instance of the device to initialize.
  • uspace/drv/char/ps2mouse/ps2mouse.c

    rda2d75b racac2ef  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvkbd
     28/** @addtogroup drvmouse
    2929 * @{
    3030 */
    3131/** @file
    32  * @brief XT keyboard driver;
     32 * @brief ps2 mouse driver.
    3333 */
    3434
     
    6464/*----------------------------------------------------------------------------*/
    6565static int polling_ps2(void *);
    66 static void default_connection_handler(ddf_fun_t *fun,
    67     ipc_callid_t icallid, ipc_call_t *icall);
    68 /*----------------------------------------------------------------------------*/
     66static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
     67/*----------------------------------------------------------------------------*/
     68/** ps/2 mouse driver ops. */
    6969static ddf_dev_ops_t mouse_ops = {
    7070        .default_handler = default_connection_handler
    7171};
    7272/*----------------------------------------------------------------------------*/
     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 */
    7379int ps2_mouse_init(ps2_mouse_t *mouse, ddf_dev_t *dev)
    7480{
     
    139145}
    140146/*----------------------------------------------------------------------------*/
     147/** Get data and parse ps2 protocol packets.
     148 * @param arg Pointer to ps2_mouse_t structure.
     149 * @return Never.
     150 */
    141151int polling_ps2(void *arg)
    142152{
    143153        assert(arg);
    144         ps2_mouse_t *mouse = arg;
     154        const ps2_mouse_t *mouse = arg;
    145155
    146156        assert(mouse->parent_sess);
     
    186196}
    187197/*----------------------------------------------------------------------------*/
     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 */
    188204void default_connection_handler(ddf_fun_t *fun,
    189205    ipc_callid_t icallid, ipc_call_t *icall)
  • uspace/drv/char/ps2mouse/ps2mouse.h

    rda2d75b racac2ef  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvkbd
     28/** @addtogroup drvmouse
    2929 * @{
    3030 */
    3131/** @file
    32  * @brief XT keyboard driver;
     32 * @brief ps/2 mouse driver.
    3333 */
    3434
    35 #ifndef _XT_KBD_H_
    36 #define _XT_KBD_H_
     35#ifndef _PS2MOUSE_H_
     36#define _PS2MOUSE_H_
    3737
    3838#include <ddf/driver.h>
    3939#include <fibril.h>
    4040
     41/** PS/2 mouse driver structure. */
    4142typedef 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. */
    4647} ps2_mouse_t;
    4748
Note: See TracChangeset for help on using the changeset viewer.