Ignore:
File:
1 edited

Legend:

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

    re60436b r73ae3373  
    3434 */
    3535
    36 #ifndef USB_HID_KBDDEV_H_
    37 #define USB_HID_KBDDEV_H_
     36#ifndef USB_KBDDEV_H_
     37#define USB_KBDDEV_H_
    3838
    3939#include <stdint.h>
     
    4949#include "kbdrepeat.h"
    5050
    51 struct usb_hid_dev;
     51struct usb_hid_dev_t;
    5252
    5353/*----------------------------------------------------------------------------*/
     
    6565 */
    6666typedef struct usb_kbd_t {
    67         /** Previously pressed keys (not translated to key codes). */
    68         int32_t *keys_old;
     67        /** Structure holding generic USB device information. */
     68        //usbhid_dev_t *hid_dev;
     69        //usb_device_t *usb_dev;
     70       
    6971        /** Currently pressed keys (not translated to key codes). */
    70         int32_t *keys;
     72        uint8_t *keys;
    7173        /** Count of stored keys (i.e. number of keys in the report). */
    7274        size_t key_count;
     
    8991        fibril_mutex_t *repeat_mtx;
    9092       
     93        /** Report descriptor. */
     94        //uint8_t *report_desc;
     95
     96        /** Report descriptor size. */
     97        //size_t report_desc_size;
     98       
    9199        uint8_t *output_buffer;
    92100       
     
    98106       
    99107        int32_t *led_data;
     108
     109        /** HID Report parser. */
     110        //usb_hid_report_parser_t *parser;
    100111       
    101112        /** State of the structure (for checking before use).
     
    110121/*----------------------------------------------------------------------------*/
    111122
     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
    112133usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description;
    113134
     
    117138/*----------------------------------------------------------------------------*/
    118139
    119 int usb_kbd_init(struct usb_hid_dev *hid_dev);
     140//usb_kbd_t *usb_kbd_new(void);
    120141
    121 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, uint8_t *buffer,
    122     size_t buffer_size);
     142int usb_kbd_init(struct usb_hid_dev_t *hid_dev);
     143
     144bool 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);
    123149
    124150int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev);
     
    128154void usb_kbd_free(usb_kbd_t **kbd_dev);
    129155
    130 void usb_kbd_push_ev(struct usb_hid_dev *hid_dev, usb_kbd_t *kbd_dev,
     156void usb_kbd_push_ev(struct usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev,
    131157    int type, unsigned int key);
    132158
    133 void usb_kbd_deinit(struct usb_hid_dev *hid_dev);
    134159
    135 int usb_kbd_set_boot_protocol(struct usb_hid_dev *hid_dev);
     160void usb_kbd_deinit(struct usb_hid_dev_t *hid_dev);
    136161
    137 #endif /* USB_HID_KBDDEV_H_ */
     162int usb_kbd_set_boot_protocol(struct usb_hid_dev_t *hid_dev);
     163
     164#endif /* USB_KBDDEV_H_ */
    138165
    139166/**
Note: See TracChangeset for help on using the changeset viewer.