Defines | |
#define | Usb_initiate_remote_wake_up() (UDCON |= (1<<RMWKUP)) |
initiates a remote wake-up | |
#define | Usb_detach() (UDCON |= (1<<DETACH)) |
detaches from USB bus | |
#define | Usb_attach() (UDCON &= ~(1<<DETACH)) |
attaches to USB bus | |
#define | Is_usb_pending_remote_wake_up() ((UDCON & (1<<RMWKUP)) ? TRUE : FALSE) |
test if remote wake-up still running | |
#define | Is_usb_detached() ((UDCON & (1<<DETACH)) ? TRUE : FALSE) |
test if the device is detached | |
#define | Usb_get_device_interrupt() (UDINT & (1<<UDIEN)) |
returns the USB device interrupts (interrupt enabled) | |
#define | Usb_ack_all_device_interrupt() (UDINT = ~(1<<UDIEN)) |
acks the USB device interrupts (interrupt enabled) | |
#define | Usb_enable_remote_wake_up_interrupt() (UDIEN |= (1<<UPRSME)) |
enables remote wake-up interrupt | |
#define | Usb_disable_remote_wake_up_interrupt() (UDIEN &= ~(1<<UPRSME)) |
disables remote wake-up interrupt | |
#define | Is_remote_wake_up_interrupt_enabled() ((UDIEN & (1<<UPRSME)) ? TRUE : FALSE) |
#define | Usb_ack_remote_wake_up_start() (UDINT = ~(1<<UPRSMI)) |
acks remote wake-up | |
#define | Is_usb_remote_wake_up_start() ((UDINT & (1<<UPRSMI)) ? TRUE : FALSE) |
tests if remote wake-up still running | |
#define | Usb_enable_resume_interrupt() (UDIEN |= (1<<EORSME)) |
enables resume interrupt | |
#define | Usb_disable_resume_interrupt() (UDIEN &= ~(1<<EORSME)) |
disables resume interrupt | |
#define | Is_resume_interrupt_enabled() ((UDIEN & (1<<EORSME)) ? TRUE : FALSE) |
#define | Usb_ack_resume() (UDINT = ~(1<<EORSMI)) |
acks resume | |
#define | Is_usb_resume() ((UDINT & (1<<EORSMI)) ? TRUE : FALSE) |
tests if resume occurs | |
#define | Usb_enable_wake_up_interrupt() (UDIEN |= (1<<WAKEUPE)) |
enables wake-up interrupt | |
#define | Usb_disable_wake_up_interrupt() (UDIEN &= ~(1<<WAKEUPE)) |
disables wake-up interrupt | |
#define | Is_wake_up_interrupt_enabled() ((UDIEN & (1<<WAKEUPE)) ? TRUE : FALSE) |
#define | Usb_ack_wake_up() (UDINT = ~(1<<WAKEUPI)) |
acks wake-up | |
#define | Is_usb_wake_up() ((UDINT & (1<<WAKEUPI)) ? TRUE : FALSE) |
tests if wake-up occurs | |
#define | Usb_enable_reset_interrupt() (UDIEN |= (1<<EORSTE)) |
enables USB reset interrupt | |
#define | Usb_disable_reset_interrupt() (UDIEN &= ~(1<<EORSTE)) |
disables USB reset interrupt | |
#define | Is_reset_interrupt_enabled() ((UDIEN & (1<<EORSTE)) ? TRUE : FALSE) |
#define | Usb_ack_reset() (UDINT = ~(1<<EORSTI)) |
acks USB reset | |
#define | Is_usb_reset() ((UDINT & (1<<EORSTI)) ? TRUE : FALSE) |
tests if USB reset occurs | |
#define | Usb_enable_sof_interrupt() (UDIEN |= (1<<SOFE)) |
enables Start Of Frame Interrupt | |
#define | Usb_disable_sof_interrupt() (UDIEN &= ~(1<<SOFE)) |
disables Start Of Frame Interrupt | |
#define | Is_sof_interrupt_enabled() ((UDIEN & (1<<SOFE)) ? TRUE : FALSE) |
#define | Usb_ack_sof() (UDINT = ~(1<<SOFI)) |
acks Start Of Frame | |
#define | Is_usb_sof() ((UDINT & (1<<SOFI)) ? TRUE : FALSE) |
tests if Start Of Frame occurs | |
#define | Usb_enable_suspend_interrupt() (UDIEN |= (1<<SUSPE)) |
enables suspend state interrupt | |
#define | Usb_disable_suspend_interrupt() (UDIEN &= ~(1<<SUSPE)) |
disables suspend state interrupt | |
#define | Is_suspend_interrupt_enabled() ((UDIEN & (1<<SUSPE)) ? TRUE : FALSE) |
test if suspend interrupt is enabled | |
#define | Usb_ack_suspend() (UDINT = ~(1<<SUSPI)) |
acks Suspend | |
#define | Is_usb_suspend() ((UDINT & (1<<SUSPI)) ? TRUE : FALSE) |
tests if Suspend state detected | |
#define | Usb_enable_address() (UDADDR |= (1<<ADDEN)) |
enables USB device address | |
#define | Usb_disable_address() (UDADDR &= ~(1<<ADDEN)) |
disables USB device address | |
#define | Is_usb_addressed() ((UDADDR & (1<<ADDEN)) ? TRUE : FALSE) |
test if device is adressed | |
#define | Usb_configure_address(addr) (UDADDR = (UDADDR & (1<<ADDEN)) | ((U8)addr & MSK_UADD)) |
sets the USB device address | |
#define | Usb_frame_number() ((U16)((((U16)UDFNUMH) << 8) | ((U16)UDFNUML))) |
returns the last frame number | |
#define | Is_usb_frame_number_crc_error() ((UDMFN & (1<<FNCERR)) ? TRUE : FALSE) |
tests if a crc error occurs in frame number |
#define Usb_initiate_remote_wake_up | ( | ) | (UDCON |= (1<<RMWKUP)) |
initiates a remote wake-up
Definition at line 242 of file usb_drv.h.
Referenced by usb_generate_remote_wakeup().
#define Usb_detach | ( | ) | (UDCON |= (1<<DETACH)) |
detaches from USB bus
Definition at line 244 of file usb_drv.h.
Referenced by cdc_task(), and usb_device_task().
#define Usb_attach | ( | ) | (UDCON &= ~(1<<DETACH)) |
attaches to USB bus
Definition at line 246 of file usb_drv.h.
Referenced by usb_device_task(), and usb_start_device().
#define Is_usb_pending_remote_wake_up | ( | ) | ((UDCON & (1<<RMWKUP)) ? TRUE : FALSE) |
#define Is_usb_detached | ( | ) | ((UDCON & (1<<DETACH)) ? TRUE : FALSE) |
#define Usb_get_device_interrupt | ( | ) | (UDINT & (1<<UDIEN)) |
#define Usb_ack_all_device_interrupt | ( | ) | (UDINT = ~(1<<UDIEN)) |
#define Usb_enable_remote_wake_up_interrupt | ( | ) | (UDIEN |= (1<<UPRSME)) |
#define Usb_disable_remote_wake_up_interrupt | ( | ) | (UDIEN &= ~(1<<UPRSME)) |
#define Is_remote_wake_up_interrupt_enabled | ( | ) | ((UDIEN & (1<<UPRSME)) ? TRUE : FALSE) |
#define Usb_ack_remote_wake_up_start | ( | ) | (UDINT = ~(1<<UPRSMI)) |
#define Is_usb_remote_wake_up_start | ( | ) | ((UDINT & (1<<UPRSMI)) ? TRUE : FALSE) |
#define Usb_enable_resume_interrupt | ( | ) | (UDIEN |= (1<<EORSME)) |
enables resume interrupt
Definition at line 268 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_disable_resume_interrupt | ( | ) | (UDIEN &= ~(1<<EORSME)) |
disables resume interrupt
Definition at line 270 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Is_resume_interrupt_enabled | ( | ) | ((UDIEN & (1<<EORSME)) ? TRUE : FALSE) |
#define Usb_ack_resume | ( | ) | (UDINT = ~(1<<EORSMI)) |
#define Is_usb_resume | ( | ) | ((UDINT & (1<<EORSMI)) ? TRUE : FALSE) |
tests if resume occurs
Definition at line 275 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_enable_wake_up_interrupt | ( | ) | (UDIEN |= (1<<WAKEUPE)) |
enables wake-up interrupt
Definition at line 278 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_disable_wake_up_interrupt | ( | ) | (UDIEN &= ~(1<<WAKEUPE)) |
disables wake-up interrupt
Definition at line 280 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Is_wake_up_interrupt_enabled | ( | ) | ((UDIEN & (1<<WAKEUPE)) ? TRUE : FALSE) |
#define Usb_ack_wake_up | ( | ) | (UDINT = ~(1<<WAKEUPI)) |
#define Is_usb_wake_up | ( | ) | ((UDINT & (1<<WAKEUPI)) ? TRUE : FALSE) |
tests if wake-up occurs
Definition at line 285 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_enable_reset_interrupt | ( | ) | (UDIEN |= (1<<EORSTE)) |
enables USB reset interrupt
Definition at line 288 of file usb_drv.h.
Referenced by usb_general_interrupt(), and usb_start_device().
#define Usb_disable_reset_interrupt | ( | ) | (UDIEN &= ~(1<<EORSTE)) |
#define Is_reset_interrupt_enabled | ( | ) | ((UDIEN & (1<<EORSTE)) ? TRUE : FALSE) |
#define Usb_ack_reset | ( | ) | (UDINT = ~(1<<EORSTI)) |
#define Is_usb_reset | ( | ) | ((UDINT & (1<<EORSTI)) ? TRUE : FALSE) |
tests if USB reset occurs
Definition at line 295 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_enable_sof_interrupt | ( | ) | (UDIEN |= (1<<SOFE)) |
enables Start Of Frame Interrupt
Definition at line 298 of file usb_drv.h.
Referenced by cdc_task_init().
#define Usb_disable_sof_interrupt | ( | ) | (UDIEN &= ~(1<<SOFE)) |
#define Is_sof_interrupt_enabled | ( | ) | ((UDIEN & (1<<SOFE)) ? TRUE : FALSE) |
#define Usb_ack_sof | ( | ) | (UDINT = ~(1<<SOFI)) |
acks Start Of Frame
Definition at line 303 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Is_usb_sof | ( | ) | ((UDINT & (1<<SOFI)) ? TRUE : FALSE) |
tests if Start Of Frame occurs
Definition at line 305 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_enable_suspend_interrupt | ( | ) | (UDIEN |= (1<<SUSPE)) |
enables suspend state interrupt
Definition at line 308 of file usb_drv.h.
Referenced by usb_general_interrupt(), and usb_start_device().
#define Usb_disable_suspend_interrupt | ( | ) | (UDIEN &= ~(1<<SUSPE)) |
#define Is_suspend_interrupt_enabled | ( | ) | ((UDIEN & (1<<SUSPE)) ? TRUE : FALSE) |
test if suspend interrupt is enabled
Definition at line 312 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_ack_suspend | ( | ) | (UDINT = ~(1<<SUSPI)) |
#define Is_usb_suspend | ( | ) | ((UDINT & (1<<SUSPI)) ? TRUE : FALSE) |
tests if Suspend state detected
Definition at line 316 of file usb_drv.h.
Referenced by usb_general_interrupt().
#define Usb_enable_address | ( | ) | (UDADDR |= (1<<ADDEN)) |
enables USB device address
Definition at line 319 of file usb_drv.h.
Referenced by usb_set_address().
#define Usb_disable_address | ( | ) | (UDADDR &= ~(1<<ADDEN)) |
#define Is_usb_addressed | ( | ) | ((UDADDR & (1<<ADDEN)) ? TRUE : FALSE) |
#define Usb_configure_address | ( | addr | ) | (UDADDR = (UDADDR & (1<<ADDEN)) | ((U8)addr & MSK_UADD)) |
sets the USB device address
Definition at line 325 of file usb_drv.h.
Referenced by usb_set_address().
#define Is_usb_frame_number_crc_error | ( | ) | ((UDMFN & (1<<FNCERR)) ? TRUE : FALSE) |