Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
USBB device controller drivers

These macros manage the USBB Device controller.

Macros

#define Is_usb_address_enabled()   (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))
 
#define Is_usb_detached()   (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))
 test if the device is detached More...
 
#define Is_usb_frame_number_crc_error()   (Tst_bits(AVR32_USBB_udfnum, AVR32_USBB_UDFNUM_FNCERR_MASK))
 tests if a crc error occurs in frame number More...
 
#define Is_usb_pending_remote_wake_up()   (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_RMWKUP_MASK))
 test if remote wake-up still running More...
 
#define Is_usb_remote_wake_up_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_UPRSME_MASK))
 
#define Is_usb_remote_wake_up_start()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_UPRSM_MASK))
 tests if remote wake-up still running More...
 
#define Is_usb_reset()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_EORST_MASK))
 tests if USB reset occurs More...
 
#define Is_usb_reset_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_EORSTE_MASK))
 
#define Is_usb_resume()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_EORSM_MASK))
 tests if resume occurs More...
 
#define Is_usb_resume_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_EORSME_MASK))
 
#define Is_usb_sof()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_SOF_MASK))
 tests if Start-of-Frame occurs More...
 
#define Is_usb_sof_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_SOFE_MASK))
 
#define Is_usb_suspend()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_SUSP_MASK))
 tests if Suspend state detected More...
 
#define Is_usb_suspend_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_SUSPE_MASK))
 
#define Is_usb_wake_up()   (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_WAKEUP_MASK))
 tests if wake-up occurs More...
 
#define Is_usb_wake_up_interrupt_enabled()   (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_WAKEUPE_MASK))
 
#define Usb_ack_remote_wake_up_start()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_UPRSMC_MASK)
 acks remote wake-up More...
 
#define Usb_ack_reset()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_EORSTC_MASK)
 acks USB reset More...
 
#define Usb_ack_resume()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_EORSMC_MASK)
 acks resume More...
 
#define Usb_ack_sof()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_SOFC_MASK)
 acks Start-of-Frame More...
 
#define Usb_ack_suspend()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_SUSPC_MASK)
 acks Suspend More...
 
#define Usb_ack_wake_up()   (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_WAKEUPC_MASK)
 acks wake-up More...
 
#define Usb_attach()   (Clr_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))
 attaches to USB bus More...
 
#define Usb_configure_address(addr)   (Wr_bitfield(AVR32_USBB_udcon, AVR32_USBB_UDCON_UADD_MASK, addr))
 configures the USB device address More...
 
#define Usb_detach()   (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))
 detaches from USB bus More...
 
#define Usb_disable_address()   (Clr_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))
 disables USB device address More...
 
#define Usb_disable_remote_wake_up_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_UPRSMEC_MASK)
 disables remote wake-up interrupt More...
 
#define Usb_disable_reset_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_EORSTEC_MASK)
 disables USB reset interrupt More...
 
#define Usb_disable_resume_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_EORSMEC_MASK)
 disables resume interrupt More...
 
#define Usb_disable_sof_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_SOFEC_MASK)
 disables Start-of-Frame Interrupt More...
 
#define Usb_disable_suspend_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_SUSPEC_MASK)
 disables suspend state interrupt More...
 
#define Usb_disable_wake_up_interrupt()   (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_WAKEUPEC_MASK)
 disables wake-up interrupt More...
 
#define Usb_enable_address()   (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))
 enables USB device address More...
 
#define Usb_enable_remote_wake_up_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_UPRSMES_MASK)
 enables remote wake-up interrupt More...
 
#define Usb_enable_reset_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_EORSTES_MASK)
 enables USB reset interrupt More...
 
#define Usb_enable_resume_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_EORSMES_MASK)
 enables resume interrupt More...
 
#define Usb_enable_sof_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_SOFES_MASK)
 enables Start-of-Frame Interrupt More...
 
#define Usb_enable_suspend_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_SUSPES_MASK)
 enables suspend state interrupt More...
 
#define Usb_enable_wake_up_interrupt()   (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_WAKEUPES_MASK)
 enables wake-up interrupt More...
 
#define Usb_frame_number()   (Rd_bitfield(AVR32_USBB_udfnum, AVR32_USBB_UDFNUM_FNUM_MASK))
 returns the current frame number More...
 
#define Usb_get_configured_address()   (Rd_bitfield(AVR32_USBB_udcon, AVR32_USBB_UDCON_UADD_MASK))
 gets the currently configured USB device address More...
 
#define Usb_initiate_remote_wake_up()   (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_RMWKUP_MASK))
 initiates a remote wake-up More...
 
#define Usb_raise_remote_wake_up_start()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_UPRSMS_MASK)
 raises remote wake-up More...
 
#define Usb_raise_reset()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_EORSTS_MASK)
 raises USB reset More...
 
#define Usb_raise_resume()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_EORSMS_MASK)
 raises resume More...
 
#define Usb_raise_sof()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_SOFS_MASK)
 raises Start-of-Frame More...
 
#define Usb_raise_suspend()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_SUSPS_MASK)
 raises Suspend More...
 
#define Usb_raise_wake_up()   (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_WAKEUPS_MASK)
 raises wake-up More...
 

#define Is_usb_address_enabled ( )    (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))
#define Is_usb_detached ( )    (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))

test if the device is detached

Referenced by e_supervisor_switch_to_maintenance_mode(), and x_supervisor_SemaphoreGive().

#define Is_usb_frame_number_crc_error ( )    (Tst_bits(AVR32_USBB_udfnum, AVR32_USBB_UDFNUM_FNCERR_MASK))

tests if a crc error occurs in frame number

#define Is_usb_pending_remote_wake_up ( )    (Tst_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_RMWKUP_MASK))

test if remote wake-up still running

#define Is_usb_remote_wake_up_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_UPRSME_MASK))
#define Is_usb_remote_wake_up_start ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_UPRSM_MASK))

tests if remote wake-up still running

#define Is_usb_reset ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_EORST_MASK))

tests if USB reset occurs

Referenced by usb_general_interrupt().

#define Is_usb_reset_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_EORSTE_MASK))

Referenced by usb_general_interrupt().

#define Is_usb_resume ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_EORSM_MASK))

tests if resume occurs

Referenced by usb_general_interrupt().

#define Is_usb_resume_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_EORSME_MASK))

Referenced by usb_general_interrupt().

#define Is_usb_sof ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_SOF_MASK))

tests if Start-of-Frame occurs

Referenced by usb_general_interrupt().

#define Is_usb_sof_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_SOFE_MASK))

Referenced by usb_general_interrupt().

#define Is_usb_suspend ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_SUSP_MASK))

tests if Suspend state detected

Referenced by usb_general_interrupt().

#define Is_usb_suspend_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_SUSPE_MASK))

Referenced by usb_general_interrupt().

#define Is_usb_wake_up ( )    (Tst_bits(AVR32_USBB_udint, AVR32_USBB_UDINT_WAKEUP_MASK))

tests if wake-up occurs

Referenced by usb_general_interrupt().

#define Is_usb_wake_up_interrupt_enabled ( )    (Tst_bits(AVR32_USBB_udinte, AVR32_USBB_UDINTE_WAKEUPE_MASK))

Referenced by usb_general_interrupt().

#define Usb_ack_remote_wake_up_start ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_UPRSMC_MASK)

acks remote wake-up

#define Usb_ack_reset ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_EORSTC_MASK)

acks USB reset

Referenced by usb_general_interrupt().

#define Usb_ack_resume ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_EORSMC_MASK)

acks resume

Referenced by usb_general_interrupt().

#define Usb_ack_sof ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_SOFC_MASK)

acks Start-of-Frame

Referenced by usb_general_interrupt().

#define Usb_ack_suspend ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_SUSPC_MASK)

acks Suspend

Referenced by usb_device_task_init(), and usb_general_interrupt().

#define Usb_ack_wake_up ( )    (AVR32_USBB_udintclr = AVR32_USBB_UDINTCLR_WAKEUPC_MASK)

acks wake-up

Referenced by usb_general_interrupt().

#define Usb_attach ( )    (Clr_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))
#define Usb_configure_address (   addr)    (Wr_bitfield(AVR32_USBB_udcon, AVR32_USBB_UDCON_UADD_MASK, addr))

configures the USB device address

Referenced by usb_set_address().

#define Usb_detach ( )    (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_DETACH_MASK))
#define Usb_disable_address ( )    (Clr_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))

disables USB device address

#define Usb_disable_remote_wake_up_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_UPRSMEC_MASK)

disables remote wake-up interrupt

#define Usb_disable_reset_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_EORSTEC_MASK)

disables USB reset interrupt

#define Usb_disable_resume_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_EORSMEC_MASK)

disables resume interrupt

Referenced by usb_general_interrupt().

#define Usb_disable_sof_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_SOFEC_MASK)

disables Start-of-Frame Interrupt

#define Usb_disable_suspend_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_SUSPEC_MASK)

disables suspend state interrupt

#define Usb_disable_wake_up_interrupt ( )    (AVR32_USBB_udinteclr = AVR32_USBB_UDINTECLR_WAKEUPEC_MASK)

disables wake-up interrupt

Referenced by usb_general_interrupt().

#define Usb_enable_address ( )    (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_ADDEN_MASK))

enables USB device address

Referenced by usb_set_address().

#define Usb_enable_remote_wake_up_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_UPRSMES_MASK)

enables remote wake-up interrupt

#define Usb_enable_reset_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_EORSTES_MASK)

enables USB reset interrupt

Referenced by usb_start_device().

#define Usb_enable_resume_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_EORSMES_MASK)

enables resume interrupt

#define Usb_enable_sof_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_SOFES_MASK)
#define Usb_enable_suspend_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_SUSPES_MASK)

enables suspend state interrupt

Referenced by usb_start_device().

#define Usb_enable_wake_up_interrupt ( )    (AVR32_USBB_udinteset = AVR32_USBB_UDINTESET_WAKEUPES_MASK)

enables wake-up interrupt

Referenced by usb_general_interrupt().

#define Usb_frame_number ( )    (Rd_bitfield(AVR32_USBB_udfnum, AVR32_USBB_UDFNUM_FNUM_MASK))

returns the current frame number

#define Usb_get_configured_address ( )    (Rd_bitfield(AVR32_USBB_udcon, AVR32_USBB_UDCON_UADD_MASK))

gets the currently configured USB device address

#define Usb_initiate_remote_wake_up ( )    (Set_bits(AVR32_USBB_udcon, AVR32_USBB_UDCON_RMWKUP_MASK))

initiates a remote wake-up

Referenced by touch_button_isr().

#define Usb_raise_remote_wake_up_start ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_UPRSMS_MASK)

raises remote wake-up

#define Usb_raise_reset ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_EORSTS_MASK)

raises USB reset

#define Usb_raise_resume ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_EORSMS_MASK)

raises resume

#define Usb_raise_sof ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_SOFS_MASK)

raises Start-of-Frame

#define Usb_raise_suspend ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_SUSPS_MASK)

raises Suspend

#define Usb_raise_wake_up ( )    (AVR32_USBB_udintset = AVR32_USBB_UDINTSET_WAKEUPS_MASK)

raises wake-up