Bmag incl gps rettelse
Dependencies: mbed WDT MODSERIAL BME280
USBHALHost Class Reference
USBHALHost class. More...
#include <USBHALHost.h>
Inherited by USBHost.
Protected Member Functions | |
USBHALHost () | |
Constructor init variables and memory where will be stored HCCA, ED and TD. | |
void | init () |
Initialize host controller. | |
void | resetRootHub () |
reset the root hub | |
uint32_t | controlHeadED () |
return the value contained in the control HEAD ED register | |
uint32_t | bulkHeadED () |
return the value contained in the bulk HEAD ED register | |
uint32_t | interruptHeadED () |
return the value of the head interrupt ED contained in the HCCA | |
void | updateControlHeadED (uint32_t addr) |
Update the head ED for control transfers. | |
void | updateBulkHeadED (uint32_t addr) |
Update the head ED for bulk transfers. | |
void | updateInterruptHeadED (uint32_t addr) |
Update the head ED for interrupt transfers. | |
void | enableList (ENDPOINT_TYPE type) |
Enable List for the specified endpoint type. | |
bool | disableList (ENDPOINT_TYPE type) |
Disable List for the specified endpoint type. | |
virtual void | deviceConnected (int hub, int port, bool lowSpeed, USBHostHub *hub_parent=NULL)=0 |
Virtual method called when a device has been connected. | |
virtual void | deviceDisconnected (int hub, int port, USBHostHub *hub_parent, volatile uint32_t addr)=0 |
Virtual method called when a device has been disconnected. | |
virtual void | transferCompleted (volatile uint32_t addr)=0 |
Virtual method called when a transfer has been completed. | |
volatile uint8_t * | getED () |
Find a memory section for a new ED. | |
volatile uint8_t * | getTD () |
Find a memory section for a new TD. | |
void | freeED (volatile uint8_t *ed) |
Release a previous memory section reserved for an ED. | |
void | freeTD (volatile uint8_t *td) |
Release a previous memory section reserved for an TD. |
Detailed Description
USBHALHost class.
Definition at line 28 of file USBHALHost.h.
Constructor & Destructor Documentation
USBHALHost | ( | ) | [protected] |
Constructor init variables and memory where will be stored HCCA, ED and TD.
Definition at line 48 of file USBHALHost_LPC17.cpp.
Member Function Documentation
uint32_t bulkHeadED | ( | ) | [protected] |
return the value contained in the bulk HEAD ED register
- Returns:
- address of the bulk head ED
Definition at line 140 of file USBHALHost_LPC17.cpp.
uint32_t controlHeadED | ( | ) | [protected] |
return the value contained in the control HEAD ED register
- Returns:
- address of the control Head ED
Definition at line 136 of file USBHALHost_LPC17.cpp.
virtual void deviceConnected | ( | int | hub, |
int | port, | ||
bool | lowSpeed, | ||
USBHostHub * | hub_parent = NULL |
||
) | [protected, pure virtual] |
Virtual method called when a device has been connected.
- Parameters:
-
hub hub number of the device port port number of the device lowSpeed 1 if low speed, 0 otherwise hub_parent reference to the hub where the device is connected (NULL if the hub parent is the root hub)
Implemented in USBHost.
virtual void deviceDisconnected | ( | int | hub, |
int | port, | ||
USBHostHub * | hub_parent, | ||
volatile uint32_t | addr | ||
) | [protected, pure virtual] |
Virtual method called when a device has been disconnected.
- Parameters:
-
hub hub number of the device port port number of the device hub_parent reference to the hub where the device is connected (NULL if the hub parent is the root hub) addr list of the TDs which have been completed to dequeue freed TDs
Implemented in USBHost.
bool disableList | ( | ENDPOINT_TYPE | type ) | [protected] |
Disable List for the specified endpoint type.
- Parameters:
-
type disable the list of ENDPOINT_TYPE type
Definition at line 181 of file USBHALHost_LPC17.cpp.
void enableList | ( | ENDPOINT_TYPE | type ) | [protected] |
Enable List for the specified endpoint type.
- Parameters:
-
type enable the list of ENDPOINT_TYPE type
Definition at line 162 of file USBHALHost_LPC17.cpp.
void freeED | ( | volatile uint8_t * | ed ) | [protected] |
Release a previous memory section reserved for an ED.
- Parameters:
-
ed address of the ED
Definition at line 238 of file USBHALHost_LPC17.cpp.
void freeTD | ( | volatile uint8_t * | td ) | [protected] |
Release a previous memory section reserved for an TD.
- Parameters:
-
td address of the TD
Definition at line 244 of file USBHALHost_LPC17.cpp.
volatile uint8_t * getED | ( | ) | [protected] |
Find a memory section for a new ED.
- Returns:
- the address of the new ED
Definition at line 214 of file USBHALHost_LPC17.cpp.
volatile uint8_t * getTD | ( | ) | [protected] |
Find a memory section for a new TD.
- Returns:
- the address of the new TD
Definition at line 225 of file USBHALHost_LPC17.cpp.
void init | ( | ) | [protected] |
Initialize host controller.
Enable USB interrupts. This part is not in the constructor because, this function calls a virtual method if a device is already connected
Definition at line 60 of file USBHALHost_LPC17.cpp.
uint32_t interruptHeadED | ( | ) | [protected] |
return the value of the head interrupt ED contained in the HCCA
- Returns:
- address of the head interrupt ED contained in the HCCA
Definition at line 144 of file USBHALHost_LPC17.cpp.
void resetRootHub | ( | ) | [protected] |
reset the root hub
Definition at line 251 of file USBHALHost_LPC17.cpp.
virtual void transferCompleted | ( | volatile uint32_t | addr ) | [protected, pure virtual] |
Virtual method called when a transfer has been completed.
- Parameters:
-
addr list of the TDs which have been completed
Implemented in USBHost.
void updateBulkHeadED | ( | uint32_t | addr ) | [protected] |
Update the head ED for bulk transfers.
Definition at line 148 of file USBHALHost_LPC17.cpp.
void updateControlHeadED | ( | uint32_t | addr ) | [protected] |
Update the head ED for control transfers.
Definition at line 153 of file USBHALHost_LPC17.cpp.
void updateInterruptHeadED | ( | uint32_t | addr ) | [protected] |
Update the head ED for interrupt transfers.
Definition at line 157 of file USBHALHost_LPC17.cpp.
Generated on Wed Jul 13 2022 08:04:14 by 1.7.2