USB host controller drivers
[USB low level drivers module]

Collaboration diagram for USB host controller drivers:

These macros manage the USB Host controller. More...

Defines

#define Host_allocate_memory()   (UPCFG1X |= (1<<ALLOC))
 allocates the current configuration in DPRAM memory
#define Host_unallocate_memory()   (UPCFG1X &= ~(1<<ALLOC))
 un-allocates the current configuration in DPRAM memory
#define Host_enable()   (USBCON |= (1<<HOST))
 enables USB Host function
#define Host_enable_sof()   (UHCON |= (1<<SOFEN))
 enables SOF generation
#define Host_disable_sof()   (UHCON &= ~(1<<SOFEN))
 disables SOF generation
#define Host_send_reset()   (UHCON |= (1<<RESET))
 sends a USB Reset to the device
#define Host_is_reset()   ((UHCON & (1<<RESET)) ? TRUE : FALSE)
 tests if USB Reset running
#define Host_send_resume()   (UHCON |= (1<<RESUME))
 sends a USB Resume to the device
#define Host_is_resume()   ((UHCON & (1<<RESUME)) ? TRUE : FALSE)
 tests if USB Resume running
#define Host_enable_sof_interrupt()   (UHIEN |= (1<<HSOFE))
 enables host start of frame interrupt
#define Host_disable_sof_interrupt()   (UHIEN &= ~(1<<HSOFE))
 enables host start of frame interrupt
#define Is_host_sof_interrupt_enabled()   ((UHIEN & (1<<HSOFE)) ? TRUE : FALSE)
#define Host_is_sof()   ((UHINT & (1<<HSOFI)) ? TRUE : FALSE)
 tests if SOF detected
#define Is_host_sof()   ((UHINT & (1<<HSOFI)) ? TRUE : FALSE)
#define Host_ack_sof()   (UHINT &= ~(1<<HSOFI))
#define Host_enable_hwup_interrupt()   (UHIEN |= (1<<HWUPE))
 enables host wake up interrupt detection
#define Host_disable_hwup_interrupt()   (UHIEN &= ~(1<<HWUPE))
 disables host wake up interrupt detection
#define Is_host_hwup_interrupt_enabled()   ((UHIEN & (1<<HWUPE)) ? TRUE : FALSE)
#define Host_is_hwup()   ((UHINT & (1<<HWUPI)) ? TRUE : FALSE)
 tests if host wake up detected
#define Is_host_hwup()   ((UHINT & (1<<HWUPI)) ? TRUE : FALSE)
 Ack host wake up detection.
#define Host_ack_hwup()   (UHINT &= ~(1<<HWUPI))
#define Host_enable_down_stream_resume_interrupt()   (UHIEN |= (1<<RSMEDE))
 enables host down stream rsm sent interrupt detection
#define Host_disable_down_stream_resume_interrupt()   (UHIEN &= ~(1<<RSMEDE))
 disables host down stream rsm sent interrupt detection
#define Is_host_down_stream_resume_interrupt_enabled()   ((UHIEN & (1<<RSMEDE)) ? TRUE : FALSE)
#define Is_host_down_stream_resume()   ((UHINT & (1<<RSMEDI)) ? TRUE : FALSE)
 Ack host down stream resume sent.
#define Host_ack_down_stream_resume()   (UHINT &= ~(1<<RSMEDI))
#define Host_enable_remote_wakeup_interrupt()   (UHIEN |= (1<<RXRSME))
 enables host remote wake up interrupt detection
#define Host_disable_remote_wakeup_interrupt()   (UHIEN &= ~(1<<RXRSME))
 disables host remote wake up interrupt detection
#define Is_host_remote_wakeup_interrupt_enabled()   ((UHIEN & (1<<RXRSME)) ? TRUE : FALSE)
#define Host_is_remote_wakeup()   ((UHINT & (1<<RXRSMI)) ? TRUE : FALSE)
 tests if host wake up detected
#define Is_host_remote_wakeup()   ((UHINT & (1<<RXRSMI)) ? TRUE : FALSE)
 Ack host wake up detection.
#define Host_ack_remote_wakeup()   (UHINT &= ~(1<<RXRSMI))
#define Host_enable_device_connection_interrupt()   (UHIEN |= (1<<DCONNE))
 enables host device connection interrupt
#define Host_disable_device_connection_interrupt()   (UHIEN &= ~(1<<DCONNE))
 disables USB device connection interrupt
#define Is_host_device_connection_interrupt_enabled()   ((UHIEN & (1<<DCONNE)) ? TRUE : FALSE)
#define Is_device_connection()   (UHINT & (1<<DCONNI))
 tests if a USB device has been detected
#define Host_ack_device_connection()   (UHINT = ~(1<<DCONNI))
 acks device connection
#define Host_enable_device_disconnection_interrupt()   (UHIEN |= (1<<DDISCE))
 enables host device disconnection interrupt
#define Host_disable_device_disconnection_interrupt()   (UHIEN &= ~(1<<DDISCE))
 disables USB device connection interrupt
#define Is_host_device_disconnection_interrupt_enabled()   ((UHIEN & (1<<DDISCE)) ? TRUE : FALSE)
#define Is_device_disconnection()   (UHINT & (1<<DDISCI) ? TRUE : FALSE)
 tests if a USB device has been removed
#define Host_ack_device_disconnection()   (UHINT = ~(1<<DDISCI))
 acks device disconnection
#define Host_enable_reset_interrupt()   (UHIEN |= (1<<RSTE))
 enables host USB reset interrupt
#define Host_disable_reset_interrupt()   (UHIEN &= ~(1<<RSTE))
 disables host USB reset interrupt
#define Is_host_reset_interrupt_enabled()   ((UHIEN & (1<<RSTE)) ? TRUE : FALSE)
#define Host_ack_reset()   (UHINT = ~(1<<RSTI))
 acks host USB reset sent
#define Is_host_reset()   Host_is_reset()
 tests if USB reset has been sent
#define Host_vbus_request()   (OTGCON |= (1<<VBUSREQ))
 switches on VBus
#define Host_clear_vbus_request()   (OTGCON |= (1<<VBUSRQC))
 switches off VBus
#define Host_configure_address(addr)   (UHADDR = addr & MSK_HADDR)
 configures the address to use for the device

Detailed Description

These macros manage the USB Host controller.


Define Documentation

 
#define Host_allocate_memory  )     (UPCFG1X |= (1<<ALLOC))
 

allocates the current configuration in DPRAM memory

Definition at line 580 of file usb_drv.h.

Referenced by host_config_pipe().

 
#define Host_unallocate_memory  )     (UPCFG1X &= ~(1<<ALLOC))
 

un-allocates the current configuration in DPRAM memory

Definition at line 582 of file usb_drv.h.

Referenced by host_disable_all_pipe().

 
#define Host_enable  )     (USBCON |= (1<<HOST))
 

enables USB Host function

Definition at line 585 of file usb_drv.h.

 
#define Host_enable_sof  )     (UHCON |= (1<<SOFEN))
 

enables SOF generation

Definition at line 587 of file usb_drv.h.

 
#define Host_disable_sof  )     (UHCON &= ~(1<<SOFEN))
 

disables SOF generation

Definition at line 589 of file usb_drv.h.

 
#define Host_send_reset  )     (UHCON |= (1<<RESET))
 

sends a USB Reset to the device

Definition at line 591 of file usb_drv.h.

 
#define Host_is_reset  )     ((UHCON & (1<<RESET)) ? TRUE : FALSE)
 

tests if USB Reset running

Definition at line 593 of file usb_drv.h.

 
#define Host_send_resume  )     (UHCON |= (1<<RESUME))
 

sends a USB Resume to the device

Definition at line 595 of file usb_drv.h.

 
#define Host_is_resume  )     ((UHCON & (1<<RESUME)) ? TRUE : FALSE)
 

tests if USB Resume running

Definition at line 597 of file usb_drv.h.

 
#define Host_enable_sof_interrupt  )     (UHIEN |= (1<<HSOFE))
 

enables host start of frame interrupt

Definition at line 600 of file usb_drv.h.

 
#define Host_disable_sof_interrupt  )     (UHIEN &= ~(1<<HSOFE))
 

enables host start of frame interrupt

Definition at line 602 of file usb_drv.h.

 
#define Is_host_sof_interrupt_enabled  )     ((UHIEN & (1<<HSOFE)) ? TRUE : FALSE)
 

Definition at line 603 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_is_sof  )     ((UHINT & (1<<HSOFI)) ? TRUE : FALSE)
 

tests if SOF detected

Definition at line 605 of file usb_drv.h.

 
#define Is_host_sof  )     ((UHINT & (1<<HSOFI)) ? TRUE : FALSE)
 

Definition at line 606 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_ack_sof  )     (UHINT &= ~(1<<HSOFI))
 

Definition at line 607 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_enable_hwup_interrupt  )     (UHIEN |= (1<<HWUPE))
 

enables host wake up interrupt detection

Definition at line 610 of file usb_drv.h.

 
#define Host_disable_hwup_interrupt  )     (UHIEN &= ~(1<<HWUPE))
 

disables host wake up interrupt detection

Definition at line 612 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Is_host_hwup_interrupt_enabled  )     ((UHIEN & (1<<HWUPE)) ? TRUE : FALSE)
 

Definition at line 613 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_is_hwup  )     ((UHINT & (1<<HWUPI)) ? TRUE : FALSE)
 

tests if host wake up detected

Definition at line 615 of file usb_drv.h.

 
#define Is_host_hwup  )     ((UHINT & (1<<HWUPI)) ? TRUE : FALSE)
 

Ack host wake up detection.

Definition at line 617 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_ack_hwup  )     (UHINT &= ~(1<<HWUPI))
 

Definition at line 618 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_enable_down_stream_resume_interrupt  )     (UHIEN |= (1<<RSMEDE))
 

enables host down stream rsm sent interrupt detection

Definition at line 621 of file usb_drv.h.

 
#define Host_disable_down_stream_resume_interrupt  )     (UHIEN &= ~(1<<RSMEDE))
 

disables host down stream rsm sent interrupt detection

Definition at line 623 of file usb_drv.h.

 
#define Is_host_down_stream_resume_interrupt_enabled  )     ((UHIEN & (1<<RSMEDE)) ? TRUE : FALSE)
 

Definition at line 624 of file usb_drv.h.

 
#define Is_host_down_stream_resume  )     ((UHINT & (1<<RSMEDI)) ? TRUE : FALSE)
 

Ack host down stream resume sent.

Definition at line 626 of file usb_drv.h.

 
#define Host_ack_down_stream_resume  )     (UHINT &= ~(1<<RSMEDI))
 

Definition at line 627 of file usb_drv.h.

 
#define Host_enable_remote_wakeup_interrupt  )     (UHIEN |= (1<<RXRSME))
 

enables host remote wake up interrupt detection

Definition at line 630 of file usb_drv.h.

 
#define Host_disable_remote_wakeup_interrupt  )     (UHIEN &= ~(1<<RXRSME))
 

disables host remote wake up interrupt detection

Definition at line 632 of file usb_drv.h.

 
#define Is_host_remote_wakeup_interrupt_enabled  )     ((UHIEN & (1<<RXRSME)) ? TRUE : FALSE)
 

Definition at line 633 of file usb_drv.h.

 
#define Host_is_remote_wakeup  )     ((UHINT & (1<<RXRSMI)) ? TRUE : FALSE)
 

tests if host wake up detected

Definition at line 635 of file usb_drv.h.

 
#define Is_host_remote_wakeup  )     ((UHINT & (1<<RXRSMI)) ? TRUE : FALSE)
 

Ack host wake up detection.

Definition at line 637 of file usb_drv.h.

 
#define Host_ack_remote_wakeup  )     (UHINT &= ~(1<<RXRSMI))
 

Definition at line 638 of file usb_drv.h.

 
#define Host_enable_device_connection_interrupt  )     (UHIEN |= (1<<DCONNE))
 

enables host device connection interrupt

Definition at line 641 of file usb_drv.h.

 
#define Host_disable_device_connection_interrupt  )     (UHIEN &= ~(1<<DCONNE))
 

disables USB device connection interrupt

Definition at line 643 of file usb_drv.h.

 
#define Is_host_device_connection_interrupt_enabled  )     ((UHIEN & (1<<DCONNE)) ? TRUE : FALSE)
 

Definition at line 644 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Is_device_connection  )     (UHINT & (1<<DCONNI))
 

tests if a USB device has been detected

Definition at line 646 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_ack_device_connection  )     (UHINT = ~(1<<DCONNI))
 

acks device connection

Definition at line 648 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_enable_device_disconnection_interrupt  )     (UHIEN |= (1<<DDISCE))
 

enables host device disconnection interrupt

Definition at line 651 of file usb_drv.h.

 
#define Host_disable_device_disconnection_interrupt  )     (UHIEN &= ~(1<<DDISCE))
 

disables USB device connection interrupt

Definition at line 653 of file usb_drv.h.

 
#define Is_host_device_disconnection_interrupt_enabled  )     ((UHIEN & (1<<DDISCE)) ? TRUE : FALSE)
 

Definition at line 654 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Is_device_disconnection  )     (UHINT & (1<<DDISCI) ? TRUE : FALSE)
 

tests if a USB device has been removed

Definition at line 656 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_ack_device_disconnection  )     (UHINT = ~(1<<DDISCI))
 

acks device disconnection

Definition at line 658 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Host_enable_reset_interrupt  )     (UHIEN |= (1<<RSTE))
 

enables host USB reset interrupt

Definition at line 661 of file usb_drv.h.

 
#define Host_disable_reset_interrupt  )     (UHIEN &= ~(1<<RSTE))
 

disables host USB reset interrupt

Definition at line 663 of file usb_drv.h.

 
#define Is_host_reset_interrupt_enabled  )     ((UHIEN & (1<<RSTE)) ? TRUE : FALSE)
 

Definition at line 664 of file usb_drv.h.

 
#define Host_ack_reset  )     (UHINT = ~(1<<RSTI))
 

acks host USB reset sent

Definition at line 666 of file usb_drv.h.

 
#define Is_host_reset  )     Host_is_reset()
 

tests if USB reset has been sent

Definition at line 668 of file usb_drv.h.

 
#define Host_vbus_request  )     (OTGCON |= (1<<VBUSREQ))
 

switches on VBus

Definition at line 672 of file usb_drv.h.

 
#define Host_clear_vbus_request  )     (OTGCON |= (1<<VBUSRQC))
 

switches off VBus

Definition at line 674 of file usb_drv.h.

#define Host_configure_address addr   )     (UHADDR = addr & MSK_HADDR)
 

configures the address to use for the device

Definition at line 676 of file usb_drv.h.


Generated on Fri Mar 17 16:02:12 2006 for Atmel by  doxygen 1.4.6-NO