Changeset b803845 in mainline


Ignore:
Timestamp:
2011-10-15T14:56:23Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f8f09f
Parents:
9c5fd7a
Message:

usb: Make endpoint descriptions const.

Location:
uspace
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/generic/hiddev.c

    r9c5fd7a rb803845  
    4848/*----------------------------------------------------------------------------*/
    4949
    50 usb_endpoint_description_t usb_hid_generic_poll_endpoint_description = {
     50const usb_endpoint_description_t usb_hid_generic_poll_endpoint_description = {
    5151        .transfer_type = USB_TRANSFER_INTERRUPT,
    5252        .direction = USB_DIRECTION_IN,
  • uspace/drv/bus/usb/usbhid/generic/hiddev.h

    r9c5fd7a rb803845  
    4141struct usb_hid_dev;
    4242
    43 usb_endpoint_description_t usb_hid_generic_poll_endpoint_description;
     43extern const usb_endpoint_description_t
     44    usb_hid_generic_poll_endpoint_description;
    4445
    4546const char *HID_GENERIC_FUN_NAME;
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r9c5fd7a rb803845  
    8888
    8989/** Keyboard polling endpoint description for boot protocol class. */
    90 usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description = {
     90const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description = {
    9191        .transfer_type = USB_TRANSFER_INTERRUPT,
    9292        .direction = USB_DIRECTION_IN,
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.h

    r9c5fd7a rb803845  
    118118/*----------------------------------------------------------------------------*/
    119119
    120 usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description;
     120extern const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description;
    121121
    122122const char *HID_KBD_FUN_NAME;
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.c

    r9c5fd7a rb803845  
    5959/*----------------------------------------------------------------------------*/
    6060
    61 usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description = {
     61const usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description = {
    6262        .transfer_type = USB_TRANSFER_INTERRUPT,
    6363        .direction = USB_DIRECTION_IN,
  • uspace/drv/bus/usb/usbhid/mouse/mousedev.h

    r9c5fd7a rb803845  
    6363/*----------------------------------------------------------------------------*/
    6464
    65 usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description;
     65extern const usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description;
    6666
    6767const char *HID_MOUSE_FUN_NAME;
  • uspace/drv/bus/usb/usbhid/usbhid.c

    r9c5fd7a rb803845  
    5454
    5555/* Array of endpoints expected on the device, NULL terminated. */
    56 usb_endpoint_description_t *usb_hid_endpoints[] = {
     56const usb_endpoint_description_t *usb_hid_endpoints[] = {
    5757        &usb_hid_kbd_poll_endpoint_description,
    5858        &usb_hid_mouse_poll_endpoint_description,
  • uspace/drv/bus/usb/usbhid/usbhid.h

    r9c5fd7a rb803845  
    141141};
    142142
    143 extern usb_endpoint_description_t *usb_hid_endpoints[];
     143extern const usb_endpoint_description_t *usb_hid_endpoints[];
    144144
    145145/*----------------------------------------------------------------------------*/
  • uspace/drv/bus/usb/usbhub/main.c

    r9c5fd7a rb803845  
    6767
    6868/** Hub endpoints, excluding control endpoint. */
    69 static usb_endpoint_description_t *usb_hub_endpoints[] = {
     69static const usb_endpoint_description_t *usb_hub_endpoints[] = {
    7070        &hub_status_change_endpoint_description,
    7171        NULL,
  • uspace/drv/bus/usb/usbmast/main.c

    r9c5fd7a rb803845  
    7272};
    7373
    74 usb_endpoint_description_t *mast_endpoints[] = {
     74static const usb_endpoint_description_t *mast_endpoints[] = {
    7575        &bulk_in_ep,
    7676        &bulk_out_ep,
  • uspace/drv/bus/usb/usbmouse/init.c

    r9c5fd7a rb803845  
    4444
    4545/** Mouse polling endpoint description for boot protocol subclass. */
    46 usb_endpoint_description_t poll_endpoint_description = {
     46const usb_endpoint_description_t poll_endpoint_description = {
    4747        .transfer_type = USB_TRANSFER_INTERRUPT,
    4848        .direction = USB_DIRECTION_IN,
  • uspace/drv/bus/usb/usbmouse/main.c

    r9c5fd7a rb803845  
    8383};
    8484
    85 static usb_endpoint_description_t *endpoints[] = {
     85static const usb_endpoint_description_t *endpoints[] = {
    8686        &poll_endpoint_description,
    8787        NULL
  • uspace/drv/bus/usb/usbmouse/mouse.h

    r9c5fd7a rb803845  
    6161} usb_mouse_t;
    6262
    63 extern usb_endpoint_description_t poll_endpoint_description;
     63extern const usb_endpoint_description_t poll_endpoint_description;
    6464
    6565extern int usb_mouse_create(usb_device_t *);
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r9c5fd7a rb803845  
    156156\endcode
    157157         */
    158         usb_endpoint_description_t **endpoints;
     158        const usb_endpoint_description_t **endpoints;
    159159        /** Driver ops. */
    160160        const usb_driver_ops_t *ops;
     
    164164
    165165int usb_device_select_interface(usb_device_t *, uint8_t,
    166     usb_endpoint_description_t **);
     166    const usb_endpoint_description_t **);
    167167
    168168int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *);
    169169int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
    170     usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
     170    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
    171171    usb_endpoint_mapping_t **, size_t *);
    172172int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
    173 int usb_device_create(ddf_dev_t *, usb_endpoint_description_t **, usb_device_t **, const char **);
     173int usb_device_create(ddf_dev_t *, const usb_endpoint_description_t **,
     174    usb_device_t **, const char **);
    174175void usb_device_deinit(usb_device_t *);
    175176void * usb_device_data_alloc(usb_device_t *, size_t);
  • uspace/lib/usbdev/src/devdrv.c

    r9c5fd7a rb803845  
    8181 * @return Number of pipes (excluding default control pipe).
    8282 */
    83 static size_t count_other_pipes(usb_endpoint_description_t **endpoints)
     83static size_t count_other_pipes(const usb_endpoint_description_t **endpoints)
    8484{
    8585        size_t count = 0;
     
    101101 * @return Error code.
    102102 */
    103 static int initialize_other_pipes(usb_endpoint_description_t **endpoints,
     103static int initialize_other_pipes(const usb_endpoint_description_t **endpoints,
    104104    usb_device_t *dev, int alternate_setting)
    105105{
     
    238238 */
    239239int usb_device_select_interface(usb_device_t *dev, uint8_t alternate_setting,
    240     usb_endpoint_description_t **endpoints)
     240    const usb_endpoint_description_t **endpoints)
    241241{
    242242        if (dev->interface_no < 0) {
     
    321321 */
    322322int usb_device_create_pipes(const ddf_dev_t *dev, usb_device_connection_t *wire,
    323     usb_endpoint_description_t **endpoints,
     323    const usb_endpoint_description_t **endpoints,
    324324    const uint8_t *config_descr, size_t config_descr_size,
    325325    int interface_no, int interface_setting,
     
    526526 */
    527527int usb_device_create(ddf_dev_t *ddf_dev,
    528     usb_endpoint_description_t **endpoints,
     528    const usb_endpoint_description_t **endpoints,
    529529    usb_device_t **dev_ptr, const char **errstr_ptr)
    530530{
Note: See TracChangeset for help on using the changeset viewer.