Changeset ac307b2 in mainline for uspace/drv/char/i8042/i8042.h


Ignore:
Timestamp:
2017-11-25T11:12:23Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
98cb5e0d
Parents:
f571ca49 (diff), 0851a3d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into callcaps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/i8042/i8042.h

    rf571ca49 rac307b2  
    22 * Copyright (c) 2006 Josef Cejka
    33 * Copyright (c) 2011 Jan Vesely
     4 * Copyright (c) 2017 Jiri Svoboda
    45 * All rights reserved.
    56 *
     
    4041#define i8042_H_
    4142
     43#include <adt/circ_buf.h>
    4244#include <io/chardev_srv.h>
    4345#include <ddi.h>
    4446#include <fibril_synch.h>
    4547#include <ddf/driver.h>
    46 #include "buffer.h"
    4748
    4849#define NAME  "i8042"
     
    5960/** i8042 Port. */
    6061typedef struct {
    61         struct i8042 *ctl;              /**< Controller */
    62         chardev_srvs_t cds;             /**< Character device server data */
     62        /** Controller */
     63        struct i8042 *ctl;
     64        /** Device function */
     65        ddf_fun_t *fun;
     66        /** Character device server data */
     67        chardev_srvs_t cds;
     68        /** Circular buffer */
     69        circ_buf_t cbuf;
     70        /** Buffer data space */
     71        uint8_t buf_data[BUFFER_SIZE];
     72        /** Protect buffer */
     73        fibril_mutex_t buf_lock;
     74        /** Signal new data in buffer */
     75        fibril_condvar_t buf_cv;
    6376} i8042_port_t;
    6477
    6578/** i8042 Controller. */
    6679typedef struct i8042 {
    67         i8042_regs_t *regs;             /**< I/O registers. */
    68         ddf_fun_t *kbd_fun;             /**< Pirmary port device function. */
    69         ddf_fun_t *aux_fun;             /**< Auxiliary port device function. */
    70         buffer_t kbd_buffer;            /**< Primary port buffer. */
    71         buffer_t aux_buffer;            /**< Aux. port buffer. */
    72         uint8_t aux_data[BUFFER_SIZE];  /**< Primary port buffer space. */
    73         uint8_t kbd_data[BUFFER_SIZE];  /**< Aux. port buffer space. */
     80        /**< I/O registers. */
     81        i8042_regs_t *regs;
     82        /** Keyboard port */
    7483        i8042_port_t *kbd;
     84        /** AUX port */
    7585        i8042_port_t *aux;
    76         fibril_mutex_t write_guard;     /**< Prevents simultanous port writes.*/
     86        /** Prevents simultanous port writes.*/
     87        fibril_mutex_t write_guard;
    7788} i8042_t;
    78 
    7989
    8090extern int i8042_init(i8042_t *, addr_range_t *, int, int, ddf_dev_t *);
Note: See TracChangeset for help on using the changeset viewer.