Changeset e1dbcbc in mainline for uspace/drv/usbhid/kbd/kbddev.h


Ignore:
Timestamp:
2011-04-29T13:43:01Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a81a1d09
Parents:
380e0364 (diff), f19f1b7 (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 development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/kbd/kbddev.h

    r380e0364 re1dbcbc  
    3434 */
    3535
    36 #ifndef USB_KBDDEV_H_
    37 #define USB_KBDDEV_H_
     36#ifndef USB_HID_KBDDEV_H_
     37#define USB_HID_KBDDEV_H_
    3838
    3939#include <stdint.h>
     
    4949#include "kbdrepeat.h"
    5050
    51 struct usb_hid_dev_t;
     51struct usb_hid_dev;
    5252
    5353/*----------------------------------------------------------------------------*/
     
    6565 */
    6666typedef struct usb_kbd_t {
    67         /** Structure holding generic USB device information. */
    68         //usbhid_dev_t *hid_dev;
    69         //usb_device_t *usb_dev;
    70        
     67        /** Previously pressed keys (not translated to key codes). */
     68        int32_t *keys_old;
    7169        /** Currently pressed keys (not translated to key codes). */
    72         uint8_t *keys;
     70        int32_t *keys;
    7371        /** Count of stored keys (i.e. number of keys in the report). */
    7472        size_t key_count;
     
    9189        fibril_mutex_t *repeat_mtx;
    9290       
    93         /** Report descriptor. */
    94         //uint8_t *report_desc;
    95 
    96         /** Report descriptor size. */
    97         //size_t report_desc_size;
    98        
    9991        uint8_t *output_buffer;
    10092       
     
    10698       
    10799        int32_t *led_data;
    108 
    109         /** HID Report parser. */
    110         //usb_hid_report_parser_t *parser;
    111100       
    112101        /** State of the structure (for checking before use).
     
    121110/*----------------------------------------------------------------------------*/
    122111
    123 //enum {
    124 //      USB_KBD_POLL_EP_NO = 0,
    125 //      USB_HID_POLL_EP_NO = 1,
    126 //      USB_KBD_POLL_EP_COUNT = 2
    127 //};
    128 
    129 //usb_endpoint_description_t *usb_kbd_endpoints[USB_KBD_POLL_EP_COUNT + 1];
    130 
    131 //ddf_dev_ops_t keyboard_ops;
    132 
    133112usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description;
    134113
     
    138117/*----------------------------------------------------------------------------*/
    139118
    140 //usb_kbd_t *usb_kbd_new(void);
     119int usb_kbd_init(struct usb_hid_dev *hid_dev);
    141120
    142 int usb_kbd_init(struct usb_hid_dev_t *hid_dev);
    143 
    144 bool usb_kbd_polling_callback(usb_device_t *dev, uint8_t *buffer,
    145      size_t buffer_size, void *arg);
    146 
    147 //void usb_kbd_polling_ended_callback(usb_device_t *dev, bool reason,
    148 //     void *arg);
     121bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, uint8_t *buffer,
     122    size_t buffer_size);
    149123
    150124int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev);
     
    154128void usb_kbd_free(usb_kbd_t **kbd_dev);
    155129
    156 void usb_kbd_push_ev(struct usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev,
     130void usb_kbd_push_ev(struct usb_hid_dev *hid_dev, usb_kbd_t *kbd_dev,
    157131    int type, unsigned int key);
    158132
     133void usb_kbd_deinit(struct usb_hid_dev *hid_dev);
    159134
    160 void usb_kbd_deinit(struct usb_hid_dev_t *hid_dev);
     135int usb_kbd_set_boot_protocol(struct usb_hid_dev *hid_dev);
    161136
    162 int usb_kbd_set_boot_protocol(struct usb_hid_dev_t *hid_dev);
    163 
    164 #endif /* USB_KBDDEV_H_ */
     137#endif /* USB_HID_KBDDEV_H_ */
    165138
    166139/**
Note: See TracChangeset for help on using the changeset viewer.