mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
usb stack code police, fix some warnings and set svn keywords correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14761 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
72e7ea22b5
commit
e4363c116c
7 changed files with 52 additions and 25 deletions
|
@ -116,7 +116,7 @@ timer_expired(struct timer * timer)
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/* gets called by usb_stack_init() to register
|
/* gets called by usb_stack_init() to register
|
||||||
* this arcotg device conrtollder driver in the
|
* this arcotg device controller driver in the
|
||||||
* stack. */
|
* stack. */
|
||||||
void usb_dcd_init(void)
|
void usb_dcd_init(void)
|
||||||
{
|
{
|
||||||
|
@ -415,7 +415,7 @@ static void port_change_int(void)
|
||||||
static void dtd_complete(void) {
|
static void dtd_complete(void) {
|
||||||
|
|
||||||
uint32_t bit_pos;
|
uint32_t bit_pos;
|
||||||
int i, ep_num, direction, bit_mask, status;
|
int i, ep_num, direction, bit_mask /*, status*/;
|
||||||
|
|
||||||
/* clear the bits in the register */
|
/* clear the bits in the register */
|
||||||
bit_pos = UDC_ENDPTCOMPLETE;
|
bit_pos = UDC_ENDPTCOMPLETE;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id: $
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 by Christian Gmeiner
|
* Copyright (C) 2007 by Christian Gmeiner
|
||||||
*
|
*
|
||||||
|
|
|
@ -20,6 +20,26 @@
|
||||||
#ifndef _USBSTACK_CONTROLLER_H_
|
#ifndef _USBSTACK_CONTROLLER_H_
|
||||||
#define _USBSTACK_CONTROLLER_H_
|
#define _USBSTACK_CONTROLLER_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* stack datatypes
|
||||||
|
*/
|
||||||
|
struct usb_response {
|
||||||
|
void* buf;
|
||||||
|
uint32_t length;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct usb_ep {
|
||||||
|
const char name[15];
|
||||||
|
uint8_t type;
|
||||||
|
uint32_t ep_num; /* which endpoint? */
|
||||||
|
uint32_t pipe_num; /* which pipe? */
|
||||||
|
uint32_t maxpacket;
|
||||||
|
bool claimed;
|
||||||
|
|
||||||
|
struct usb_endpoint_descriptor *desc;
|
||||||
|
struct list_head list;
|
||||||
|
};
|
||||||
|
|
||||||
struct usb_controller {
|
struct usb_controller {
|
||||||
const char* name;
|
const char* name;
|
||||||
enum usb_controller_type type;
|
enum usb_controller_type type;
|
||||||
|
|
|
@ -27,26 +27,6 @@
|
||||||
|
|
||||||
#include "usbstack.h"
|
#include "usbstack.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* stack datatypes
|
|
||||||
*/
|
|
||||||
struct usb_response {
|
|
||||||
void* buf;
|
|
||||||
uint32_t length;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct usb_ep {
|
|
||||||
const char name[15];
|
|
||||||
uint8_t type;
|
|
||||||
uint32_t ep_num; /* which endpoint? */
|
|
||||||
uint32_t pipe_num; /* which pipe? */
|
|
||||||
uint32_t maxpacket;
|
|
||||||
bool claimed;
|
|
||||||
|
|
||||||
struct usb_endpoint_descriptor *desc;
|
|
||||||
struct list_head list;
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "usbstack/controller.h"
|
#include "usbstack/controller.h"
|
||||||
#include "usbstack/device.h"
|
#include "usbstack/device.h"
|
||||||
#include "usbstack/host.h"
|
#include "usbstack/host.h"
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "usb_serial.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "usb_serial.h"
|
||||||
|
#include "usbstack/utils.h"
|
||||||
|
|
||||||
static struct usb_dcd_controller_ops* ops;
|
static struct usb_dcd_controller_ops* ops;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "usb_storage.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "usb_storage.h"
|
||||||
|
#include "usbstack/utils.h"
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
25
firmware/usbstack/utils.h
Normal file
25
firmware/usbstack/utils.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* Copyright (C) 2007 by Peter D'Hoye
|
||||||
|
*
|
||||||
|
* All files in this archive are subject to the GNU General Public License.
|
||||||
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _USBSTACK_UTILS_H_
|
||||||
|
#define _USBSTACK_UTILS_H_
|
||||||
|
|
||||||
|
int usb_stack_get_string(struct usb_string* strings, int id, uint8_t* buf);
|
||||||
|
|
||||||
|
#endif /*_USBSTACK_UTILS_H_*/
|
Loading…
Add table
Add a link
Reference in a new issue