Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USBB host controller drivers

These macros manage the USBB Host controller.

Todo:
Implement macros for endpoint DMA registers and descriptors

Macros

#define Host_ack_device_connection()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_DCONNIC_MASK)
 acks device connection More...
 
#define Host_ack_device_disconnection()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_DDISCIC_MASK)
 acks device disconnection More...
 
#define Host_ack_down_stream_resume()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RSMEDIC_MASK)
 acks host down stream resume sent More...
 
#define Host_ack_hwup()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_HWUPIC_MASK)
 acks host wake-up detection More...
 
#define Host_ack_remote_wakeup()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RXRSMIC_MASK)
 acks host remote wake-up detection More...
 
#define Host_ack_reset_sent()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RSTIC_MASK)
 acks host USB reset sent More...
 
#define Host_ack_sof()   (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_HSOFIC_MASK)
 acks SOF detection More...
 
#define Host_configure_address(p, addr)   (Wr_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3), addr))
 configures the USB device address associated with the selected pipe More...
 
#define Host_disable_device_connection_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_DCONNIEC_MASK)
 disables USB device connection interrupt More...
 
#define Host_disable_device_disconnection_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_DDISCIEC_MASK)
 disables USB device connection interrupt More...
 
#define Host_disable_down_stream_resume_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RSMEDIEC_MASK)
 disables host down stream resume sent interrupt detection More...
 
#define Host_disable_hwup_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_HWUPIEC_MASK)
 disables host wake-up interrupt detection More...
 
#define Host_disable_remote_wakeup_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RXRSMIEC_MASK)
 disables host remote wake-up interrupt detection More...
 
#define Host_disable_reset_sent_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RSTIEC_MASK)
 disables host USB reset sent interrupt More...
 
#define Host_disable_sof()   (Clr_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))
 disables SOF generation More...
 
#define Host_disable_sof_interrupt()   (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_HSOFIEC_MASK)
 enables host Start-of-Frame interrupt More...
 
#define Host_enable_device_connection_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_DCONNIES_MASK)
 enables host device connection interrupt More...
 
#define Host_enable_device_disconnection_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_DDISCIES_MASK)
 enables host device disconnection interrupt More...
 
#define Host_enable_down_stream_resume_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RSMEDIES_MASK)
 enables host down stream resume sent interrupt detection More...
 
#define Host_enable_hwup_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_HWUPIES_MASK)
 enables host wake-up interrupt detection More...
 
#define Host_enable_remote_wakeup_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RXRSMIES_MASK)
 enables host remote wake-up interrupt detection More...
 
#define Host_enable_reset_sent_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RSTIES_MASK)
 enables host USB reset sent interrupt More...
 
#define Host_enable_sof()   (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))
 enables SOF generation More...
 
#define Host_enable_sof_interrupt()   (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_HSOFIES_MASK)
 enables host Start-of-Frame interrupt More...
 
#define Host_frame_length()   (Rd_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FLENHIGH_MASK))
 returns the current frame length More...
 
#define Host_frame_number()   (Rd_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FNUM_MASK))
 returns the current frame number More...
 
#define Host_get_configured_address(p)   (Rd_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3)))
 gets the currently configured USB device address associated with the selected pipe More...
 
#define Host_raise_device_connection()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_DCONNIS_MASK)
 raises device connection More...
 
#define Host_raise_device_disconnection()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_DDISCIS_MASK)
 raises device disconnection More...
 
#define Host_raise_down_stream_resume()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RSMEDIS_MASK)
 raises host down stream resume sent More...
 
#define Host_raise_hwup()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_HWUPIS_MASK)
 raises host wake-up detection More...
 
#define Host_raise_remote_wakeup()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RXRSMIS_MASK)
 raises host remote wake-up detection More...
 
#define Host_raise_reset_sent()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RSTIS_MASK)
 raises host USB reset sent More...
 
#define Host_raise_sof()   (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_HSOFIS_MASK)
 raises SOF detection More...
 
#define Host_send_reset()   (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))
 sends a USB Reset to the device More...
 
#define Host_send_resume()   (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESUME_MASK))
 sends a USB Resume to the device More...
 
#define Host_set_frame_number(fnum)   (Wr_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FNUM_MASK, fnum))
 sets the current frame number More...
 
#define Host_stop_sending_reset()   (Clr_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))
 stops sending a USB Reset to the device More...
 
#define Is_host_device_connection()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_DCONNI_MASK))
 tests if a USB device has been detected More...
 
#define Is_host_device_connection_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_DCONNIE_MASK))
 
#define Is_host_device_disconnection()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_DDISCI_MASK))
 tests if a USB device has been removed More...
 
#define Is_host_device_disconnection_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_DDISCIE_MASK))
 
#define Is_host_down_stream_resume()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RSMEDI_MASK))
 
#define Is_host_down_stream_resume_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RSMEDIE_MASK))
 
#define Is_host_hwup()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_HWUPI_MASK))
 tests if host wake-up detected More...
 
#define Is_host_hwup_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_HWUPIE_MASK))
 
#define Is_host_remote_wakeup()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RXRSMI_MASK))
 tests if host remote wake-up detected More...
 
#define Is_host_remote_wakeup_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RXRSMIE_MASK))
 
#define Is_host_reset_sent()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RSTI_MASK))
 tests if host USB reset sent More...
 
#define Is_host_reset_sent_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RSTIE_MASK))
 
#define Is_host_sending_reset()   (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))
 tests if USB Reset running More...
 
#define Is_host_sending_resume()   (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESUME_MASK))
 tests if USB Resume running More...
 
#define Is_host_sof()   (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_HSOFI_MASK))
 tests if SOF detected More...
 
#define Is_host_sof_enabled()   (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))
 tests if SOF generation enabled More...
 
#define Is_host_sof_interrupt_enabled()   (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_HSOFIE_MASK))
 

#define Host_ack_device_connection ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_DCONNIC_MASK)

acks device connection

Referenced by usb_host_task().

#define Host_ack_device_disconnection ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_DDISCIC_MASK)

acks device disconnection

Referenced by usb_host_task().

#define Host_ack_down_stream_resume ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RSMEDIC_MASK)

acks host down stream resume sent

Referenced by usb_host_task().

#define Host_ack_hwup ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_HWUPIC_MASK)

acks host wake-up detection

Referenced by usb_host_task().

#define Host_ack_remote_wakeup ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RXRSMIC_MASK)

acks host remote wake-up detection

Referenced by usb_host_task().

#define Host_ack_reset_sent ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_RSTIC_MASK)

acks host USB reset sent

Referenced by usb_host_task().

#define Host_ack_sof ( )    (AVR32_USBB_uhintclr = AVR32_USBB_UHINTCLR_HSOFIC_MASK)

acks SOF detection

Referenced by host_get_data(), host_transfer_control(), and usb_host_task().

#define Host_configure_address (   p,
  addr 
)    (Wr_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3), addr))

configures the USB device address associated with the selected pipe

Referenced by usb_host_task().

#define Host_disable_device_connection_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_DCONNIEC_MASK)

disables USB device connection interrupt

#define Host_disable_device_disconnection_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_DDISCIEC_MASK)

disables USB device connection interrupt

Referenced by usb_host_task().

#define Host_disable_down_stream_resume_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RSMEDIEC_MASK)

disables host down stream resume sent interrupt detection

#define Host_disable_hwup_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_HWUPIEC_MASK)

disables host wake-up interrupt detection

Referenced by usb_host_task().

#define Host_disable_remote_wakeup_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RXRSMIEC_MASK)

disables host remote wake-up interrupt detection

#define Host_disable_reset_sent_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_RSTIEC_MASK)

disables host USB reset sent interrupt

#define Host_disable_sof ( )    (Clr_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))

disables SOF generation

Referenced by usb_host_task().

#define Host_disable_sof_interrupt ( )    (AVR32_USBB_uhinteclr = AVR32_USBB_UHINTECLR_HSOFIEC_MASK)

enables host Start-of-Frame interrupt

Referenced by host_get_data(), host_send_data(), host_transfer_control(), and usb_host_task().

#define Host_enable_device_connection_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_DCONNIES_MASK)

enables host device connection interrupt

Referenced by usb_host_task_init().

#define Host_enable_device_disconnection_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_DDISCIES_MASK)

enables host device disconnection interrupt

Referenced by usb_host_task(), and usb_host_task_init().

#define Host_enable_down_stream_resume_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RSMEDIES_MASK)

enables host down stream resume sent interrupt detection

#define Host_enable_hwup_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_HWUPIES_MASK)

enables host wake-up interrupt detection

Referenced by usb_host_task().

#define Host_enable_remote_wakeup_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RXRSMIES_MASK)

enables host remote wake-up interrupt detection

#define Host_enable_reset_sent_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_RSTIES_MASK)

enables host USB reset sent interrupt

#define Host_enable_sof ( )    (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))

enables SOF generation

Referenced by usb_host_task().

#define Host_enable_sof_interrupt ( )    (AVR32_USBB_uhinteset = AVR32_USBB_UHINTESET_HSOFIES_MASK)

enables host Start-of-Frame interrupt

Referenced by host_get_data(), host_send_data(), host_transfer_control(), and usb_host_task().

#define Host_frame_length ( )    (Rd_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FLENHIGH_MASK))

returns the current frame length

#define Host_frame_number ( )    (Rd_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FNUM_MASK))

returns the current frame number

#define Host_get_configured_address (   p)    (Rd_bitfield(AVR32_USBB_uhaddrx(1 + ((p) >> 2)), AVR32_USBB_UHADDR1_UHADDR_P0_MASK << (((p) & 0x03) << 3)))

gets the currently configured USB device address associated with the selected pipe

#define Host_raise_device_connection ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_DCONNIS_MASK)

raises device connection

#define Host_raise_device_disconnection ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_DDISCIS_MASK)

raises device disconnection

#define Host_raise_down_stream_resume ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RSMEDIS_MASK)

raises host down stream resume sent

#define Host_raise_hwup ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_HWUPIS_MASK)

raises host wake-up detection

#define Host_raise_remote_wakeup ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RXRSMIS_MASK)

raises host remote wake-up detection

#define Host_raise_reset_sent ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_RSTIS_MASK)

raises host USB reset sent

#define Host_raise_sof ( )    (AVR32_USBB_uhintset = AVR32_USBB_UHINTSET_HSOFIS_MASK)

raises SOF detection

#define Host_send_reset ( )    (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))

sends a USB Reset to the device

Referenced by usb_host_task().

#define Host_send_resume ( )    (Set_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESUME_MASK))

sends a USB Resume to the device

Referenced by usb_host_task().

#define Host_set_frame_number (   fnum)    (Wr_bitfield(AVR32_USBB_uhfnum, AVR32_USBB_UHFNUM_FNUM_MASK, fnum))

sets the current frame number

#define Host_stop_sending_reset ( )    (Clr_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))

stops sending a USB Reset to the device

Referenced by usb_host_task().

#define Is_host_device_connection ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_DCONNI_MASK))

tests if a USB device has been detected

Referenced by usb_host_task().

#define Is_host_device_connection_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_DCONNIE_MASK))
#define Is_host_device_disconnection ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_DDISCI_MASK))

tests if a USB device has been removed

Referenced by usb_host_task().

#define Is_host_device_disconnection_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_DDISCIE_MASK))
#define Is_host_down_stream_resume ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RSMEDI_MASK))

Referenced by usb_host_task().

#define Is_host_down_stream_resume_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RSMEDIE_MASK))
#define Is_host_hwup ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_HWUPI_MASK))

tests if host wake-up detected

#define Is_host_hwup_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_HWUPIE_MASK))

Referenced by usb_host_task().

#define Is_host_remote_wakeup ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RXRSMI_MASK))

tests if host remote wake-up detected

#define Is_host_remote_wakeup_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RXRSMIE_MASK))
#define Is_host_reset_sent ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_RSTI_MASK))

tests if host USB reset sent

#define Is_host_reset_sent_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_RSTIE_MASK))
#define Is_host_sending_reset ( )    (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESET_MASK))

tests if USB Reset running

Referenced by usb_host_task().

#define Is_host_sending_resume ( )    (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_RESUME_MASK))

tests if USB Resume running

#define Is_host_sof ( )    (Tst_bits(AVR32_USBB_uhint, AVR32_USBB_UHINT_HSOFI_MASK))

tests if SOF detected

#define Is_host_sof_enabled ( )    (Tst_bits(AVR32_USBB_uhcon, AVR32_USBB_UHCON_SOFE_MASK))

tests if SOF generation enabled

#define Is_host_sof_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_uhinte, AVR32_USBB_UHINTE_HSOFIE_MASK))