Explorar el Código

Rename header file to USBHost_t36.h

main
PaulStoffregen hace 7 años
padre
commit
ea75a1c673
Se han modificado 8 ficheros con 37 adiciones y 16 borrados
  1. +30
    -9
      USBHost_t36.h
  2. +1
    -1
      ehci.cpp
  3. +1
    -1
      enumeration.cpp
  4. +1
    -1
      hub.cpp
  5. +1
    -1
      keyboard.cpp
  6. +1
    -1
      memory.cpp
  7. +1
    -1
      midi.cpp
  8. +1
    -1
      print.cpp

USBHost.h → USBHost_t36.h Ver fichero

@@ -29,16 +29,39 @@
#define USBHOST_PRINT_DEBUG

/************************************************/
/* Data Structure Definitions */
/* Data Types */
/************************************************/

These 6 types are the key to understanding how this USB Host
library really works.

// USBHost is a static class controlling the hardware.
// All common USB functionality is implemented here.
class USBHost;
class USBDriver;
class USBDriverTimer;

// These 3 structures represent the actual USB entities
// USBHost manipulates. One Device_t is created for
// each active USB device. One Pipe_t is create for
// each endpoint. Transfer_t structures are created
// when any data transfer is added to the EHCI work
// queues, and then returned to the free pool after the
// data transfer completes and the driver has processed
// the results.
typedef struct Device_struct Device_t;
typedef struct Pipe_struct Pipe_t;
typedef struct Transfer_struct Transfer_t;
//typedef struct DriverTimer_struct DriverTimer_t;

// All USB device drivers inherit use these classes.
// Drivers build user-visible functionality on top
// of these classes, which receive USB events from
// USBHost.
class USBDriver;
class USBDriverTimer;


/************************************************/
/* Data Structure Definitions */
/************************************************/

// setup_t holds the 8 byte USB SETUP packet data.
// These unions & structs allow convenient access to
@@ -99,12 +122,12 @@ struct Pipe_struct {
Device_t *device;
uint8_t type; // 0=control, 1=isochronous, 2=bulk, 3=interrupt
uint8_t direction; // 0=out, 1=in (changes for control, others fixed)
uint8_t start_mask; // TODO: is this redundant?
uint8_t complete_mask; // TODO: is this redundant?
uint8_t start_mask;
uint8_t complete_mask;
Pipe_t *next;
void (*callback_function)(const Transfer_t *);
uint16_t periodic_interval;
uint16_t periodic_offset; // TODO: is this redundant?
uint16_t periodic_offset;
uint32_t unused1;
uint32_t unused2;
uint32_t unused3;
@@ -251,7 +274,6 @@ protected:
static void println(const char *s, long n, uint8_t b) {}
static void println(const char *s, unsigned long n, uint8_t b) {}
#endif

static void mk_setup(setup_t &s, uint32_t bmRequestType, uint32_t bRequest,
uint32_t wValue, uint32_t wIndex, uint32_t wLength) {
s.word1 = bmRequestType | (bRequest << 8) | (wValue << 16);
@@ -381,7 +403,6 @@ protected:
void start_debounce_timer(uint32_t port);
void stop_debounce_timer(uint32_t port);
static volatile bool reset_busy;

USBDriverTimer debouncetimer;
USBDriverTimer resettimer;
setup_t setup;

+ 1
- 1
ehci.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info

// Size of the periodic list, in milliseconds. This determines the
// slowest rate we can poll interrupt endpoints. Each entry uses

+ 1
- 1
enumeration.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info


static USBDriver *available_drivers = NULL;

+ 1
- 1
hub.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info

// True when any hub port is in the reset or reset recovery phase.
// Only one USB device may be reset at a time, because it will

+ 1
- 1
keyboard.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info


KeyboardController::KeyboardController()

+ 1
- 1
memory.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info


// Memory allocation

+ 1
- 1
midi.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info


MIDIDevice::MIDIDevice()

+ 1
- 1
print.cpp Ver fichero

@@ -22,7 +22,7 @@
*/

#include <Arduino.h>
#include "USBHost.h"
#include "USBHost_t36.h" // Read this header first for key info

#ifdef USBHOST_PRINT_DEBUG


Cargando…
Cancelar
Guardar