USB common management drivers
[USB low level drivers]

These macros manage the USB controller. More...

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()   (UDCON &= ~(1<<LSM))
 Use device full speed mode (default mode).
#define Usb_low_speed_mode()   (UDCON |= (1<<LSM))
 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_engine_enable()   (USBCON |= (1<<USBE) )
 Enable USB engine only.
#define Usb_engine_disable()   (USBCON &= ~(1<<USBE))
 Disable both USB interface and Vbus pad.
#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 Is_usb_device_enabled()   ((USBCON & (1<<HOST)) ? FALSE : TRUE)
#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 Is_usb_id_host()   ((USBSTA & (1<<ID)) ? FALSE : TRUE)
#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 MSK_IDTE_VBUSTE   ((1<<IDTE)|(1<<VBUSTE))
#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 ON without UVCON signal from USB interface.
#define Usb_disable_manual_vbus()   (PORTE&=~0x80,DDRE|=0x80,Usb_enable_uvcon_pin())
 Manually request VBUS OFF without UVCON signal from USB interface.
#define Is_usb_vbus_manual_on()   (((PINE&0x80) != 0) ? TRUE : FALSE)
 is vbus manually activated ?
#define Usb_device_initiate_hnp()   (OTGCON |= (1<<HNPREQ))
 initiates a Host Negociation Protocol
#define Usb_device_stop_hnp()   (OTGCON &= ~(1<<HNPREQ))
 stops 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 Is_usb_device_initiating_srp()   ((OTGCON & (1<<SRPREQ)) ? TRUE : FALSE)
 tests if device is initiating SRP
#define Set_otg_custom_timer(sel)   (OTGTCON = sel)
 selects one of the four OTG timers and sets up the specified delay
#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

Detailed Description

These macros manage the USB controller.


Define Documentation

 
#define Usb_enable_uid_pin (  )     (UHWCON |= (1<<UIDE))

Enable external UID pin.

Definition at line 213 of file usb_drv.h.

Referenced by usb_device_task(), and usb_task_init().

 
#define Usb_disable_uid_pin (  )     (UHWCON &= ~(1<<UIDE))

Disable external UID pin.

Definition at line 215 of file usb_drv.h.

 
#define Usb_force_device_mode (  )     (Usb_disable_uid_pin(), UHWCON |= (1<<UIMOD))

Disable external UID pin and force device mode.

Definition at line 217 of file usb_drv.h.

Referenced by usb_task_init().

 
#define Usb_force_host_mode (  )     (Usb_disable_uid_pin(), UHWCON &= ~(1<<UIMOD))

Disable external UID pin and force host mode.

Definition at line 219 of file usb_drv.h.

Referenced by usb_task_init().

 
#define Usb_enable_uvcon_pin (  )     (UHWCON |= (1<<UVCONE))

Enable external UVCON pin.

Definition at line 221 of file usb_drv.h.

Referenced by usb_host_task_init().

 
#define Usb_disable_uvcon_pin (  )     (UHWCON &= ~(1<<UVCONE))

Enable external UVCON pin.

Definition at line 223 of file usb_drv.h.

 
#define Usb_full_speed_mode (  )     (UDCON &= ~(1<<LSM))

Use device full speed mode (default mode).

Definition at line 225 of file usb_drv.h.

 
#define Usb_low_speed_mode (  )     (UDCON |= (1<<LSM))

For device mode, force low speed mode.

Definition at line 227 of file usb_drv.h.

Referenced by usb_device_task_init().

 
#define Usb_enable (  )     (USBCON |= ((1<<USBE) | (1<<OTGPADE)))

Enable both USB interface and Vbus pad.

Definition at line 230 of file usb_drv.h.

Referenced by usb_device_task(), usb_device_task_init(), and usb_host_task_init().

 
#define Usb_disable (  )     (USBCON &= ~((1<<USBE) | (1<<OTGPADE)))

Disable both USB interface and Vbus pad.

Definition at line 232 of file usb_drv.h.

Referenced by usb_device_task(), usb_device_task_init(), usb_host_task_init(), and usb_task().

 
#define Is_usb_enabled (  )     ((USBCON & (1<<USBE)) ? TRUE : FALSE)

Definition at line 233 of file usb_drv.h.

 
#define Usb_engine_enable (  )     (USBCON |= (1<<USBE) )

Enable USB engine only.

Definition at line 236 of file usb_drv.h.

 
#define Usb_engine_disable (  )     (USBCON &= ~(1<<USBE))

Disable both USB interface and Vbus pad.

Definition at line 238 of file usb_drv.h.

 
#define Usb_enable_vbus_pad (  )     (USBCON |= (1<<OTGPADE))

Enable VBUS pad.

Definition at line 242 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_disable_vbus_pad (  )     (USBCON &= ~(1<<OTGPADE))

Disable VBUS pad.

Definition at line 244 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_select_device (  )     (USBCON &= ~(1<<HOST))

Definition at line 246 of file usb_drv.h.

Referenced by usb_device_task(), usb_device_task_init(), and usb_init_device().

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

Definition at line 247 of file usb_drv.h.

Referenced by usb_host_task_init().

 
#define Is_usb_host_enabled (  )     ((USBCON & (1<<HOST)) ? TRUE : FALSE)

Definition at line 248 of file usb_drv.h.

 
#define Is_usb_device_enabled (  )     ((USBCON & (1<<HOST)) ? FALSE : TRUE)

Definition at line 249 of file usb_drv.h.

 
#define Usb_freeze_clock (  )     (USBCON |= (1<<FRZCLK))

Stop internal USB clock in interface (freeze the interface register).

Definition at line 253 of file usb_drv.h.

Referenced by usb_device_task(), usb_general_interrupt(), usb_host_task(), and usb_task().

 
#define Usb_unfreeze_clock (  )     (USBCON &= ~(1<<FRZCLK))

Definition at line 254 of file usb_drv.h.

Referenced by usb_device_task(), usb_general_interrupt(), usb_generate_remote_wakeup(), usb_host_task(), usb_host_task_init(), and usb_start_device().

 
#define Is_usb_clock_freezed (  )     ((USBCON & (1<<FRZCLK)) ? TRUE : FALSE)

Definition at line 255 of file usb_drv.h.

 
#define Usb_enable_id_interrupt (  )     (USBCON |= (1<<IDTE))

Definition at line 257 of file usb_drv.h.

Referenced by usb_device_task_init(), usb_start_device(), and usb_task_init().

 
#define Usb_disable_id_interrupt (  )     (USBCON &= ~(1<<IDTE))

Definition at line 258 of file usb_drv.h.

 
#define Is_usb_id_interrupt_enabled (  )     ((USBCON & (1<<IDTE)) ? TRUE : FALSE)

Definition at line 259 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Is_usb_id_device (  )     ((USBSTA & (1<<ID)) ? TRUE : FALSE)

Definition at line 260 of file usb_drv.h.

Referenced by usb_device_task(), usb_general_interrupt(), usb_init_device(), usb_task(), and usb_task_init().

 
#define Is_usb_id_host (  )     ((USBSTA & (1<<ID)) ? FALSE : TRUE)

Definition at line 261 of file usb_drv.h.

Referenced by usb_task().

 
#define Usb_ack_id_transition (  )     (USBINT = ~(1<<IDTI))

Definition at line 262 of file usb_drv.h.

Referenced by usb_general_interrupt(), usb_task(), and usb_task_init().

 
#define Is_usb_id_transition (  )     ((USBINT & (1<<IDTI)) ? TRUE : FALSE)

Definition at line 263 of file usb_drv.h.

Referenced by usb_general_interrupt().

 
#define Usb_enable_vbus_interrupt (  )     (USBCON |= (1<<VBUSTE))

Definition at line 265 of file usb_drv.h.

 
#define Usb_disable_vbus_interrupt (  )     (USBCON &= ~(1<<VBUSTE))

Definition at line 266 of file usb_drv.h.

 
#define Is_usb_vbus_interrupt_enabled (  )     ((USBCON & (1<<VBUSTE)) ? TRUE : FALSE)

Definition at line 267 of file usb_drv.h.

 
#define Is_usb_vbus_high (  )     ((USBSTA & (1<<VBUS)) ? TRUE : FALSE)

Definition at line 268 of file usb_drv.h.

Referenced by usb_device_task(), and usb_host_task().

 
#define Is_usb_vbus_low (  )     ((USBSTA & (1<<VBUS)) ? FALSE : TRUE)

Definition at line 269 of file usb_drv.h.

Referenced by usb_device_task(), usb_get_configuration(), usb_get_descriptor(), usb_get_interface(), usb_get_status(), usb_host_task(), usb_set_address(), and usb_set_interface().

 
#define Usb_ack_vbus_transition (  )     (USBINT = ~(1<<VBUSTI))

Definition at line 270 of file usb_drv.h.

 
#define Is_usb_vbus_transition (  )     ((USBINT & (1<<VBUSTI)) ? TRUE : FALSE)

Definition at line 271 of file usb_drv.h.

#define MSK_IDTE_VBUSTE   ((1<<IDTE)|(1<<VBUSTE))

Definition at line 273 of file usb_drv.h.

 
#define Usb_get_general_interrupt (  )     (USBINT & (USBCON & MSK_IDTE_VBUSTE))

returns the USB general interrupts (interrupt enabled)

Definition at line 275 of file usb_drv.h.

 
#define Usb_ack_all_general_interrupt (  )     (USBINT = ~(USBCON & MSK_IDTE_VBUSTE))

acks the general interrupts (interrupt enabled)

Definition at line 277 of file usb_drv.h.

#define Usb_ack_cache_id_transition (  )     ((x) &= ~(1<<IDTI))

Definition at line 278 of file usb_drv.h.

#define Usb_ack_cache_vbus_transition (  )     ((x) &= ~(1<<VBUSTI))

Definition at line 279 of file usb_drv.h.

#define Is_usb_cache_id_transition (  )     (((x) & (1<<IDTI)) )

Definition at line 280 of file usb_drv.h.

#define Is_usb_cache_vbus_transition (  )     (((x) & (1<<VBUSTI)))

Definition at line 281 of file usb_drv.h.

 
#define Usb_get_otg_interrupt (  )     (OTGINT & OTGIEN)

returns the USB Pad interrupts (interrupt enabled)

Definition at line 284 of file usb_drv.h.

 
#define Usb_ack_all_otg_interrupt (  )     (OTGINT = ~OTGIEN)

acks the USB Pad interrupts (interrupt enabled)

Definition at line 286 of file usb_drv.h.

#define Is_otg_cache_bconnection_error (  )     (((x) & MSK_BCERRI))

Definition at line 287 of file usb_drv.h.

#define Usb_ack_cache_bconnection_error (  )     ((x) &= ~MSK_BCERRI)

Definition at line 288 of file usb_drv.h.

 
#define Usb_enter_dpram_mode (  )     (UDPADDH = (1<<DPACC))

Definition at line 290 of file usb_drv.h.

 
#define Usb_exit_dpram_mode (  )     (UDPADDH = (U8)~(1<<DPACC))

Definition at line 291 of file usb_drv.h.

#define Usb_set_dpram_address ( addr   )     (UDPADDH = (1<<DPACC) + ((Uint16)addr >> 8), UDPADDL = (Uchar)addr)

Definition at line 292 of file usb_drv.h.

#define Usb_write_dpram_byte ( val   )     (UEDATX=val)

Definition at line 293 of file usb_drv.h.

 
#define Usb_read_dpram_byte (  )     (UEDATX)

Definition at line 294 of file usb_drv.h.

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

requests for VBus activation

Definition at line 297 of file usb_drv.h.

Referenced by usb_host_task().

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

requests for VBus desactivation

Definition at line 299 of file usb_drv.h.

Referenced by usb_host_task(), and usb_task().

 
#define Usb_enable_manual_vbus (  )     (PORTE|=0x80,DDRE|=0x80,Usb_disable_uvcon_pin())

Manually request VBUS ON without UVCON signal from USB interface.

Definition at line 301 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_disable_manual_vbus (  )     (PORTE&=~0x80,DDRE|=0x80,Usb_enable_uvcon_pin())

Manually request VBUS OFF without UVCON signal from USB interface.

Definition at line 303 of file usb_drv.h.

Referenced by usb_task().

 
#define Is_usb_vbus_manual_on (  )     (((PINE&0x80) != 0) ? TRUE : FALSE)

is vbus manually activated ?

Definition at line 305 of file usb_drv.h.

 
#define Usb_device_initiate_hnp (  )     (OTGCON |= (1<<HNPREQ))

initiates a Host Negociation Protocol

Definition at line 308 of file usb_drv.h.

 
#define Usb_device_stop_hnp (  )     (OTGCON &= ~(1<<HNPREQ))

stops a Host Negociation Protocol

Definition at line 310 of file usb_drv.h.

Referenced by usb_device_task().

 
#define Usb_host_accept_hnp (  )     (OTGCON |= (1<<HNPREQ))

accepts a Host Negociation Protocol

Definition at line 312 of file usb_drv.h.

 
#define Usb_host_reject_hnp (  )     (OTGCON &= ~(1<<HNPREQ))

rejects a Host Negociation Protocol

Definition at line 314 of file usb_drv.h.

Referenced by usb_device_task().

 
#define Usb_device_initiate_srp (  )     (OTGCON |= (1<<SRPREQ))

initiates a Session Request Protocol

Definition at line 316 of file usb_drv.h.

Referenced by usb_device_task().

 
#define Usb_select_vbus_srp_method (  )     (OTGCON |= (1<<SRPSEL))

selects VBus as SRP method

Definition at line 318 of file usb_drv.h.

 
#define Usb_select_data_srp_method (  )     (OTGCON &= ~(1<<SRPSEL))

selects data line as SRP method

Definition at line 320 of file usb_drv.h.

 
#define Usb_enable_vbus_hw_control (  )     (OTGCON &= ~(1<<VBUSHWC))

enables hardware control on VBus

Definition at line 322 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_disable_vbus_hw_control (  )     (OTGCON |= (1<<VBUSHWC))

disables hardware control on VBus

Definition at line 324 of file usb_drv.h.

Referenced by usb_host_task(), and usb_host_task_init().

 
#define Is_usb_vbus_enabled (  )     ((OTGCON & (1<<VBUSREQ)) ? TRUE : FALSE)

tests if VBus has been requested

Definition at line 326 of file usb_drv.h.

 
#define Is_usb_hnp (  )     ((OTGCON & (1<<HNPREQ)) ? TRUE : FALSE)

tests if a HNP occurs

Definition at line 328 of file usb_drv.h.

 
#define Is_usb_device_srp (  )     ((OTGCON & (1<<SRPREQ)) ? TRUE : FALSE)

tests if a SRP from device occurs

Definition at line 330 of file usb_drv.h.

 
#define Is_usb_device_initiating_srp (  )     ((OTGCON & (1<<SRPREQ)) ? TRUE : FALSE)

tests if device is initiating SRP

Definition at line 332 of file usb_drv.h.

Referenced by usb_device_task().

#define Set_otg_custom_timer ( sel   )     (OTGTCON = sel)

selects one of the four OTG timers and sets up the specified delay

Definition at line 335 of file usb_drv.h.

 
#define Usb_enable_suspend_time_out_interrupt (  )     (OTGIEN |= (1<<STOE))

enables suspend time out interrupt

Definition at line 338 of file usb_drv.h.

 
#define Usb_disable_suspend_time_out_interrupt (  )     (OTGIEN &= ~(1<<STOE))

disables suspend time out interrupt

Definition at line 340 of file usb_drv.h.

 
#define Is_suspend_time_out_interrupt_enabled (  )     ((OTGIEN & (1<<STOE)) ? TRUE : FALSE)

Definition at line 341 of file usb_drv.h.

 
#define Usb_ack_suspend_time_out_interrupt (  )     (OTGINT &= ~(1<<STOI))

acks suspend time out interrupt

Definition at line 343 of file usb_drv.h.

 
#define Is_usb_suspend_time_out_interrupt (  )     ((OTGINT & (1<<STOI)) ? TRUE : FALSE)

tests if a suspend time out occurs

Definition at line 345 of file usb_drv.h.

 
#define Usb_enable_hnp_error_interrupt (  )     (OTGIEN |= (1<<HNPERRE))

enables HNP error interrupt

Definition at line 348 of file usb_drv.h.

 
#define Usb_disable_hnp_error_interrupt (  )     (OTGIEN &= ~(1<<HNPERRE))

disables HNP error interrupt

Definition at line 350 of file usb_drv.h.

 
#define Is_hnp_error_interrupt_enabled (  )     ((OTGIEN & (1<<HNPERRE)) ? TRUE : FALSE)

Definition at line 351 of file usb_drv.h.

 
#define Usb_ack_hnp_error_interrupt (  )     (OTGINT &= ~(1<<HNPERRI))

acks HNP error interrupt

Definition at line 353 of file usb_drv.h.

 
#define Is_usb_hnp_error_interrupt (  )     ((OTGINT & (1<<HNPERRI)) ? TRUE : FALSE)

tests if a HNP error occurs

Definition at line 355 of file usb_drv.h.

 
#define Usb_enable_role_exchange_interrupt (  )     (OTGIEN |= (1<<ROLEEXE))

enables role exchange interrupt

Definition at line 358 of file usb_drv.h.

 
#define Usb_disable_role_exchange_interrupt (  )     (OTGIEN &= ~(1<<ROLEEXE))

disables role exchange interrupt

Definition at line 360 of file usb_drv.h.

 
#define Is_role_exchange_interrupt_enabled (  )     ((OTGIEN & (1<<ROLEEXE)) ? TRUE : FALSE)

Definition at line 361 of file usb_drv.h.

 
#define Usb_ack_role_exchange_interrupt (  )     (OTGINT &= ~(1<<ROLEEXI))

acks role exchange interrupt

Definition at line 363 of file usb_drv.h.

 
#define Is_usb_role_exchange_interrupt (  )     ((OTGINT & (1<<ROLEEXI)) ? TRUE : FALSE)

tests if a role exchange occurs

Definition at line 365 of file usb_drv.h.

 
#define Usb_enable_bconnection_error_interrupt (  )     (OTGIEN |= (1<<BCERRE))

enables B device connection error interrupt

Definition at line 368 of file usb_drv.h.

 
#define Usb_disable_bconnection_error_interrupt (  )     (OTGIEN &= ~(1<<BCERRE))

disables B device connection error interrupt

Definition at line 370 of file usb_drv.h.

 
#define Is_bconnection_error_interrupt_enabled (  )     ((OTGIEN & (1<<BCERRE)) ? TRUE : FALSE)

Definition at line 371 of file usb_drv.h.

 
#define Usb_ack_bconnection_error_interrupt (  )     (OTGINT &= ~(1<<BCERRI))

acks B device connection error interrupt

Definition at line 373 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Is_usb_bconnection_error_interrupt (  )     ((OTGINT & (1<<BCERRI)) ? TRUE : FALSE)

tests if a B device connection error occurs

Definition at line 375 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_enable_vbus_error_interrupt (  )     (OTGIEN |= (1<<VBERRE))

enables VBus error interrupt

Definition at line 378 of file usb_drv.h.

 
#define Usb_disable_vbus_error_interrupt (  )     (OTGIEN &= ~(1<<VBERRE))

disables VBus error interrupt

Definition at line 380 of file usb_drv.h.

 
#define Is_vbus_error_interrupt_enabled (  )     ((OTGIEN & (1<<VBERRE)) ? TRUE : FALSE)

Definition at line 381 of file usb_drv.h.

 
#define Usb_ack_vbus_error_interrupt (  )     (OTGINT &= ~(1<<VBERRI))

acks VBus error interrupt

Definition at line 383 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Is_usb_vbus_error_interrupt (  )     ((OTGINT & (1<<VBERRI)) ? TRUE : FALSE)

tests if a VBus error occurs

Definition at line 385 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Usb_enable_srp_interrupt (  )     (OTGIEN |= (1<<SRPE))

enables SRP interrupt

Definition at line 388 of file usb_drv.h.

 
#define Usb_disable_srp_interrupt (  )     (OTGIEN &= ~(1<<SRPE))

disables SRP interrupt

Definition at line 390 of file usb_drv.h.

 
#define Is_srp_interrupt_enabled (  )     ((OTGIEN & (1<<SRPE)) ? TRUE : FALSE)

Definition at line 391 of file usb_drv.h.

 
#define Usb_ack_srp_interrupt (  )     (OTGINT &= ~(1<<SRPI))

acks SRP interrupt

Definition at line 393 of file usb_drv.h.

Referenced by usb_host_task().

 
#define Is_usb_srp_interrupt (  )     ((OTGINT & (1<<SRPI)) ? TRUE : FALSE)

tests if a SRP occurs

Definition at line 395 of file usb_drv.h.

Referenced by usb_host_task().


Generated on Mon Sep 14 13:24:13 2009 for ATMEL by  doxygen 1.5.3