| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Modules | Functions | Variables
Hardware Abstraction Layer
USB Core - software/LPCUSBLib/Drivers/USB/USB.h

## Detailed Description

Hardware Abstraction Layer for LPC architecture.

## Modules
| Hardware Abstraction Layer LPC17XX
| Hardware Abstraction Layer LPC18XX

## Functions
void | HAL_USBInit (uint8_t corenum)
| This function is called by void USB_Init(void) to do the initialization for chip's USB core. Normally, this function will do the following:
void | HAL_USBDeInit (uint8_t corenum, uint8_t mode)
| This function usage is opposite to HAL_USBInit.
void | HAL_EnableUSBInterrupt (uint8_t corenum)
| This function used to enable USB interrupt.
void | HAL_DisableUSBInterrupt (uint8_t corenum)
| This function usage is opposite to HAL_EnableUSBInterrupt.
void | HAL_USBConnect (uint8_t corenum, uint32_t con)
| This function is used in device mode to pull up resistor on USB pin D+ Normally, this function is called when every setup or initial are done.

## Variables
uint8_t | USBPortNum

## Function Documentation

void HAL_DisableUSBInterrupt | ( | uint8_t | corenum | ) |

This function usage is opposite to HAL_EnableUSBInterrupt.

Parameters

  corenum | : USB port number

Returns
  Nothing

void HAL_EnableUSBInterrupt | ( | uint8_t | corenum | ) |

This function used to enable USB interrupt.

Parameters

  corenum | : USB port number

Returns
  Nothing

void HAL_USBConnect | ( | uint8_t | corenum,
|  | uint32_t | con
| ) |  |

This function is used in device mode to pull up resistor on USB pin D+ Normally, this function is called when every setup or initial are done.

This function is used in device mode to pull up resistor on USB pin D+ Normally, this function is called when every setup or initial are done.

Parameters

  corenum | : USB port number
  con | : connect or disconect

Returns
  Nothing

void HAL_USBDeInit | ( | uint8_t | corenum,
|  | uint8_t | mode
| ) |  |

This function usage is opposite to HAL_USBInit.

Parameters

  corenum | : USB port number
  mode | : USB mode

Returns
  Nothing

void HAL_USBInit | ( | uint8_t | corenum | ) |

This function is called by void USB_Init(void) to do the initialization for chip's USB core. Normally, this function will do the following:

These macros used to declare a variable in a defined section (ex: USB RAM section).

- Configure USB pins
- Setup USB core clock
- Call HAL_RESET to setup needed USB operating registers, set device address 0 if running device mode
  Parameters

    corenum | : USB port number

  Returns
    Nothing

## Variable Documentation

uint8_t USBPortNum