Changeset a84ddf0 in mainline


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

xtkbd: Doxygen.

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

Legend:

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

    r336f03b ra84ddf0  
    4747
    4848static int xt_kbd_add(ddf_dev_t *device);
    49 
     49/*----------------------------------------------------------------------------*/
     50/** DDF driver ops. */
    5051static driver_ops_t kbd_driver_ops = {
    5152        .dev_add = xt_kbd_add,
    5253};
    53 
     54/*----------------------------------------------------------------------------*/
     55/** DDF driver structure. */
    5456static driver_t kbd_driver = {
    5557        .name = NAME,
    5658        .driver_ops = &kbd_driver_ops
    5759};
    58 
     60/*----------------------------------------------------------------------------*/
    5961/** Initialize global driver structures (NONE).
    6062 *
     
    6870{
    6971        printf(NAME ": HelenOS XT keyboard driver.\n");
    70         ddf_log_init(NAME, LVL_DEBUG2);
     72        ddf_log_init(NAME, LVL_NOTE);
    7173        return ddf_driver_main(&kbd_driver);
    7274}
    73 
     75/*----------------------------------------------------------------------------*/
    7476/** Initialize a new ddf driver instance of the driver
    7577 *
  • uspace/drv/char/xtkbd/xtkbd.c

    r336f03b ra84ddf0  
    4343
    4444#include "xtkbd.h"
     45/** Scancode set 1 table. */
    4546static const int scanmap_simple[] = {
    4647
     
    152153};
    153154/*----------------------------------------------------------------------------*/
     155#define SCANCODE_SET_EXTENDED 0xe0
     156/** Scancode set 1 extended codes table */
    154157static const int scanmap_e0[] = {
    155158        [0x38] = KC_RALT,
     
    179182    ipc_callid_t icallid, ipc_call_t *icall);
    180183/*----------------------------------------------------------------------------*/
     184/** Keyboard function ops. */
    181185static ddf_dev_ops_t kbd_ops = {
    182186        .default_handler = default_connection_handler
     
    230234}
    231235/*----------------------------------------------------------------------------*/
     236/** Get data and parse scancodes.
     237 * @param arg Pointter to xt_kbd_t structure.
     238 * @return Never.
     239 */
    232240int polling(void *arg)
    233241{
     
    243251                ssize_t size = char_dev_read(kbd->parent_sess, &code, 1);
    244252
    245                 if (code == 0xe0) {
     253                if (code == SCANCODE_SET_EXTENDED) {
    246254                        map = scanmap_e0;
    247255                        map_size = sizeof(scanmap_e0) / sizeof(int);
     
    279287}
    280288/*----------------------------------------------------------------------------*/
     289/** Default handler for IPC methods not handled by DDF.
     290 *
     291 * @param fun Device function handling the call.
     292 * @param icallid Call id.
     293 * @param icall Call data.
     294 */
    281295void default_connection_handler(ddf_fun_t *fun,
    282296    ipc_callid_t icallid, ipc_call_t *icall)
  • uspace/drv/char/xtkbd/xtkbd.h

    r336f03b ra84ddf0  
    3030 */
    3131/** @file
    32  * @brief XT keyboard driver;
     32 * @brief XT keyboard driver
    3333 */
    3434
     
    3939#include <fibril.h>
    4040
     41/** PC/XT keyboard driver structure. */
    4142typedef struct {
    42         ddf_fun_t *kbd_fun;
    43         async_sess_t *parent_sess;
    44         async_sess_t *input_sess;
    45         fid_t polling_fibril;
     43        ddf_fun_t *kbd_fun;        /**< Keyboard 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} xt_kbd_t;
    4748
Note: See TracChangeset for help on using the changeset viewer.