tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Hardware Abtract Layer (HAL)

Functions

tusb_error_t hal_init (void)
 Initialize USB controller hardware. More...
 
static void hal_interrupt_enable (uint8_t coreid) ATTR_ALWAYS_INLINE
 Enable USB Interrupt on a specific USB Controller. More...
 
static void hal_interrupt_disable (uint8_t coreid) ATTR_ALWAYS_INLINE
 Disable USB Interrupt on a specific USB Controller. More...
 
static bool hal_debugger_is_attached (void) ATTR_PURE ATTR_ALWAYS_INLINE
 
static void hal_debugger_breakpoint (void) ATTR_ALWAYS_INLINE
 

Detailed Description

Hardware Abstraction Layer (HAL) is an abstraction layer, between the physical hardware and the tinyusb stack. Its function is to hide differences in hardware from most of MCUs, so that most of the stack code does not need to be changed to run on systems with a different MCU. HAL are sets of routines that emulate some platform-specific details, giving programs direct access to the hardware resources.

Function Documentation

tusb_error_t hal_init ( void  )

Initialize USB controller hardware.

Returns
tusb_error_t type to indicate success or error condition.
Note
This function is invoked by tusb_init as part of the initialization.

Definition at line 44 of file hal_lpc11uxx.c.

static void hal_interrupt_disable ( uint8_t  coreid)
inlinestatic

Disable USB Interrupt on a specific USB Controller.

Parameters
[in]coreidis a zero-based index to identify USB controller's ID
Note
Some MCUs such as NXP LPC43xx has multiple USB controllers. It is necessary to know which USB controller for those MCUs.
static void hal_interrupt_enable ( uint8_t  coreid)
inlinestatic

Enable USB Interrupt on a specific USB Controller.

Parameters
[in]coreidis a zero-based index to identify USB controller's ID
Note
Some MCUs such as NXP LPC43xx has multiple USB controllers. It is necessary to know which USB controller for those MCUs.