Collaboration diagram for USB common management drivers:
![]() |
Defines | |
#define | Usb_enable_uid_pin() (UHWCON |= (1<<UIDE)) |
Enable external UID pin. | |
#define | Usb_disable_uid_pin() (UHWCON &= ~(1<<UIDE)) |
Disable external UID pin. | |
#define | Usb_force_device_mode() (Usb_disable_uid_pin(), UHWCON |= (1<<UIMOD)) |
Disable external UID pin and force device mode. | |
#define | Usb_force_host_mode() (Usb_disable_uid_pin(), UHWCON &= ~(1<<UIMOD)) |
Disable external UID pin and force host mode. | |
#define | Usb_enable_uvcon_pin() (UHWCON |= (1<<UVCONE)) |
Enable external UVCON pin. | |
#define | Usb_disable_uvcon_pin() (UHWCON &= ~(1<<UVCONE)) |
Enable external UVCON pin. | |
#define | Usb_full_speed_mode() (UHWCON |= (1<<UDSS)) |
Use device full speed mode (default mode). | |
#define | Usb_low_speed_mode() (UHWCON &= ~(1<<UDSS)) |
For device mode, force low speed mode. | |
#define | Usb_enable() (USBCON |= ((1<<USBE) | (1<<OTGPADE))) |
Enable both USB interface and Vbus pad. | |
#define | Usb_disable() (USBCON &= ~((1<<USBE) | (1<<OTGPADE))) |
Disable both USB interface and Vbus pad. | |
#define | Is_usb_enabled() ((USBCON & (1<<USBE)) ? TRUE : FALSE) |
#define | Usb_enable_vbus_pad() (USBCON |= (1<<OTGPADE)) |
Enable VBUS pad. | |
#define | Usb_disable_vbus_pad() (USBCON &= ~(1<<OTGPADE)) |
Disable VBUS pad. | |
#define | Usb_select_device() (USBCON &= ~(1<<HOST)) |
#define | Usb_select_host() (USBCON |= (1<<HOST)) |
#define | Is_usb_host_enabled() ((USBCON & (1<<HOST)) ? TRUE : FALSE) |
#define | Usb_freeze_clock() (USBCON |= (1<<FRZCLK)) |
Stop internal USB clock in interface (freeze the interface register). | |
#define | Usb_unfreeze_clock() (USBCON &= ~(1<<FRZCLK)) |
#define | Is_usb_clock_freezed() ((USBCON & (1<<FRZCLK)) ? TRUE : FALSE) |
#define | Usb_enable_id_interrupt() (USBCON |= (1<<IDTE)) |
#define | Usb_disable_id_interrupt() (USBCON &= ~(1<<IDTE)) |
#define | Is_usb_id_interrupt_enabled() ((USBCON & (1<<IDTE)) ? TRUE : FALSE) |
#define | Is_usb_id_device() ((USBSTA & (1<<ID)) ? TRUE : FALSE) |
#define | Usb_ack_id_transition() (USBINT = ~(1<<IDTI)) |
#define | Is_usb_id_transition() ((USBINT & (1<<IDTI)) ? TRUE : FALSE) |
#define | Usb_enable_vbus_interrupt() (USBCON |= (1<<VBUSTE)) |
#define | Usb_disable_vbus_interrupt() (USBCON &= ~(1<<VBUSTE)) |
#define | Is_usb_vbus_interrupt_enabled() ((USBCON & (1<<VBUSTE)) ? TRUE : FALSE) |
#define | Is_usb_vbus_high() ((USBSTA & (1<<VBUS)) ? TRUE : FALSE) |
#define | Is_usb_vbus_low() ((USBSTA & (1<<VBUS)) ? FALSE : TRUE) |
#define | Usb_ack_vbus_transition() (USBINT = ~(1<<VBUSTI)) |
#define | Is_usb_vbus_transition() ((USBINT & (1<<VBUSTI)) ? TRUE : FALSE) |
#define | Usb_get_general_interrupt() (USBINT & (USBCON & MSK_IDTE_VBUSTE)) |
returns the USB general interrupts (interrupt enabled) | |
#define | Usb_ack_all_general_interrupt() (USBINT = ~(USBCON & MSK_IDTE_VBUSTE)) |
acks the general interrupts (interrupt enabled) | |
#define | Usb_ack_cache_id_transition(x) ((x) &= ~(1<<IDTI)) |
#define | Usb_ack_cache_vbus_transition(x) ((x) &= ~(1<<VBUSTI)) |
#define | Is_usb_cache_id_transition(x) (((x) & (1<<IDTI)) ) |
#define | Is_usb_cache_vbus_transition(x) (((x) & (1<<VBUSTI))) |
#define | Usb_get_otg_interrupt() (OTGINT & OTGIEN) |
returns the USB Pad interrupts (interrupt enabled) | |
#define | Usb_ack_all_otg_interrupt() (OTGINT = ~OTGIEN) |
acks the USB Pad interrupts (interrupt enabled) | |
#define | Is_otg_cache_bconnection_error(x) (((x) & MSK_BCERRI)) |
#define | Usb_ack_cache_bconnection_error(x) ((x) &= ~MSK_BCERRI) |
#define | Usb_enter_dpram_mode() (UDPADDH = (1<<DPACC)) |
#define | Usb_exit_dpram_mode() (UDPADDH = (U8)~(1<<DPACC)) |
#define | Usb_set_dpram_address(addr) (UDPADDH = (1<<DPACC) + ((Uint16)addr >> 8), UDPADDL = (Uchar)addr) |
#define | Usb_write_dpram_byte(val) (UEDATX=val) |
#define | Usb_read_dpram_byte() (UEDATX) |
#define | Usb_enable_vbus() (OTGCON |= (1<<VBUSREQ)) |
requests for VBus activation | |
#define | Usb_disable_vbus() (OTGCON |= (1<<VBUSRQC)) |
requests for VBus desactivation | |
#define | Usb_enable_manual_vbus() (PORTE|=0x80,DDRE|=0x80,Usb_disable_uvcon_pin()) |
Manually request VBUS without UVCON signal from USB interface. | |
#define | Usb_device_initiate_hnp() (OTGCON |= (1<<HNPREQ)) |
initiates a Host Negociation Protocol | |
#define | Usb_host_accept_hnp() (OTGCON |= (1<<HNPREQ)) |
accepts a Host Negociation Protocol | |
#define | Usb_host_reject_hnp() (OTGCON &= ~(1<<HNPREQ)) |
rejects a Host Negociation Protocol | |
#define | Usb_device_initiate_srp() (OTGCON |= (1<<SRPREQ)) |
initiates a Session Request Protocol | |
#define | Usb_select_vbus_srp_method() (OTGCON |= (1<<SRPSEL)) |
selects VBus as SRP method | |
#define | Usb_select_data_srp_method() (OTGCON &= ~(1<<SRPSEL)) |
selects data line as SRP method | |
#define | Usb_enable_vbus_hw_control() (OTGCON &= ~(1<<VBUSHWC)) |
enables hardware control on VBus | |
#define | Usb_disable_vbus_hw_control() (OTGCON |= (1<<VBUSHWC)) |
disables hardware control on VBus | |
#define | Is_usb_vbus_enabled() ((OTGCON & (1<<VBUSREQ)) ? TRUE : FALSE) |
tests if VBus has been requested | |
#define | Is_usb_hnp() ((OTGCON & (1<<HNPREQ)) ? TRUE : FALSE) |
tests if a HNP occurs | |
#define | Is_usb_device_srp() ((OTGCON & (1<<SRPREQ)) ? TRUE : FALSE) |
tests if a SRP from device occurs | |
#define | Usb_enable_suspend_time_out_interrupt() (OTGIEN |= (1<<STOE)) |
enables suspend time out interrupt | |
#define | Usb_disable_suspend_time_out_interrupt() (OTGIEN &= ~(1<<STOE)) |
disables suspend time out interrupt | |
#define | Is_suspend_time_out_interrupt_enabled() ((OTGIEN & (1<<STOE)) ? TRUE : FALSE) |
#define | Usb_ack_suspend_time_out_interrupt() (OTGINT &= ~(1<<STOI)) |
acks suspend time out interrupt | |
#define | Is_usb_suspend_time_out_interrupt() ((OTGINT & (1<<STOI)) ? TRUE : FALSE) |
tests if a suspend time out occurs | |
#define | Usb_enable_hnp_error_interrupt() (OTGIEN |= (1<<HNPERRE)) |
enables HNP error interrupt | |
#define | Usb_disable_hnp_error_interrupt() (OTGIEN &= ~(1<<HNPERRE)) |
disables HNP error interrupt | |
#define | Is_hnp_error_interrupt_enabled() ((OTGIEN & (1<<HNPERRE)) ? TRUE : FALSE) |
#define | Usb_ack_hnp_error_interrupt() (OTGINT &= ~(1<<HNPERRI)) |
acks HNP error interrupt | |
#define | Is_usb_hnp_error_interrupt() ((OTGINT & (1<<HNPERRI)) ? TRUE : FALSE) |
tests if a HNP error occurs | |
#define | Usb_enable_role_exchange_interrupt() (OTGIEN |= (1<<ROLEEXE)) |
enables role exchange interrupt | |
#define | Usb_disable_role_exchange_interrupt() (OTGIEN &= ~(1<<ROLEEXE)) |
disables role exchange interrupt | |
#define | Is_role_exchange_interrupt_enabled() ((OTGIEN & (1<<ROLEEXE)) ? TRUE : FALSE) |
#define | Usb_ack_role_exchange_interrupt() (OTGINT &= ~(1<<ROLEEXI)) |
acks role exchange interrupt | |
#define | Is_usb_role_exchange_interrupt() ((OTGINT & (1<<ROLEEXI)) ? TRUE : FALSE) |
tests if a role exchange occurs | |
#define | Usb_enable_bconnection_error_interrupt() (OTGIEN |= (1<<BCERRE)) |
enables B device connection error interrupt | |
#define | Usb_disable_bconnection_error_interrupt() (OTGIEN &= ~(1<<BCERRE)) |
disables B device connection error interrupt | |
#define | Is_bconnection_error_interrupt_enabled() ((OTGIEN & (1<<BCERRE)) ? TRUE : FALSE) |
#define | Usb_ack_bconnection_error_interrupt() (OTGINT &= ~(1<<BCERRI)) |
acks B device connection error interrupt | |
#define | Is_usb_bconnection_error_interrupt() ((OTGINT & (1<<BCERRI)) ? TRUE : FALSE) |
tests if a B device connection error occurs | |
#define | Usb_enable_vbus_error_interrupt() (OTGIEN |= (1<<VBERRE)) |
enables VBus error interrupt | |
#define | Usb_disable_vbus_error_interrupt() (OTGIEN &= ~(1<<VBERRE)) |
disables VBus error interrupt | |
#define | Is_vbus_error_interrupt_enabled() ((OTGIEN & (1<<VBERRE)) ? TRUE : FALSE) |
#define | Usb_ack_vbus_error_interrupt() (OTGINT &= ~(1<<VBERRI)) |
acks VBus error interrupt | |
#define | Is_usb_vbus_error_interrupt() ((OTGINT & (1<<VBERRI)) ? TRUE : FALSE) |
tests if a VBus error occurs | |
#define | Usb_enable_srp_interrupt() (OTGIEN |= (1<<SRPE)) |
enables SRP interrupt | |
#define | Usb_disable_srp_interrupt() (OTGIEN &= ~(1<<SRPE)) |
disables SRP interrupt | |
#define | Is_srp_interrupt_enabled() ((OTGIEN & (1<<SRPE)) ? TRUE : FALSE) |
#define | Usb_ack_srp_interrupt() (OTGINT &= ~(1<<SRPI)) |
acks SRP interrupt | |
#define | Is_usb_srp_interrupt() ((OTGINT & (1<<SRPI)) ? TRUE : FALSE) |
tests if a SRP occurs |
|
Enable external UID pin.
Definition at line 162 of file usb_drv.h. Referenced by usb_task_init(). |
|
Disable external UID pin.
|
|
Disable external UID pin and force device mode.
Definition at line 166 of file usb_drv.h. Referenced by usb_task_init(). |
|
Disable external UID pin and force host mode.
Definition at line 168 of file usb_drv.h. Referenced by usb_task_init(). |
|
Enable external UVCON pin.
|
|
Enable external UVCON pin.
|
|
Use device full speed mode (default mode).
|
|
For device mode, force low speed mode.
|
|
Enable both USB interface and Vbus pad.
Definition at line 179 of file usb_drv.h. Referenced by usb_device_task_init(). |
|
Disable both USB interface and Vbus pad.
Definition at line 181 of file usb_drv.h. Referenced by usb_device_task_init(). |
|
|
|
Enable VBUS pad.
|
|
Disable VBUS pad.
|
|
Definition at line 189 of file usb_drv.h. Referenced by usb_device_task_init(), and usb_init_device(). |
|
|
|
|
|
Stop internal USB clock in interface (freeze the interface register).
Definition at line 194 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
Definition at line 195 of file usb_drv.h. Referenced by usb_general_interrupt(), and usb_start_device(). |
|
|
|
Definition at line 198 of file usb_drv.h. Referenced by usb_task_init(). |
|
|
|
Definition at line 200 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
Definition at line 201 of file usb_drv.h. Referenced by usb_general_interrupt(), usb_init_device(), usb_task(), and usb_task_init(). |
|
Definition at line 202 of file usb_drv.h. Referenced by usb_general_interrupt(), and usb_task_init(). |
|
Definition at line 203 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
Definition at line 205 of file usb_drv.h. Referenced by usb_device_task_init(). |
|
|
|
Definition at line 207 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
Definition at line 208 of file usb_drv.h. Referenced by usb_device_task(), and usb_general_interrupt(). |
|
|
|
Definition at line 210 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
Definition at line 211 of file usb_drv.h. Referenced by usb_general_interrupt(). |
|
returns the USB general interrupts (interrupt enabled)
|
|
acks the general interrupts (interrupt enabled)
|
|
|
|
|
|
|
|
|
|
returns the USB Pad interrupts (interrupt enabled)
|
|
acks the USB Pad interrupts (interrupt enabled)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requests for VBus activation
|
|
requests for VBus desactivation
|
|
Manually request VBUS without UVCON signal from USB interface.
|
|
initiates a Host Negociation Protocol
|
|
accepts a Host Negociation Protocol
|
|
rejects a Host Negociation Protocol
|
|
initiates a Session Request Protocol
|
|
selects VBus as SRP method
|
|
selects data line as SRP method
|
|
enables hardware control on VBus
|
|
disables hardware control on VBus
|
|
tests if VBus has been requested
|
|
tests if a HNP occurs
|
|
tests if a SRP from device occurs
|
|
enables suspend time out interrupt
|
|
disables suspend time out interrupt
|
|
|
|
acks suspend time out interrupt
|
|
tests if a suspend time out occurs
|
|
enables HNP error interrupt
|
|
disables HNP error interrupt
|
|
|
|
acks HNP error interrupt
|
|
tests if a HNP error occurs
|
|
enables role exchange interrupt
|
|
disables role exchange interrupt
|
|
|
|
acks role exchange interrupt
|
|
tests if a role exchange occurs
|
|
enables B device connection error interrupt
|
|
disables B device connection error interrupt
|
|
|
|
acks B device connection error interrupt
|
|
tests if a B device connection error occurs
|
|
enables VBus error interrupt
|
|
disables VBus error interrupt
|
|
|
|
acks VBus error interrupt
|
|
tests if a VBus error occurs
|
|
enables SRP interrupt
|
|
disables SRP interrupt
|
|
|
|
acks SRP interrupt
|
|
tests if a SRP occurs
|