wpi-32u4-library
Public Member Functions | Private Attributes
USBPause Class Reference

#include <USBPause.h>

Public Member Functions

 USBPause ()
 
 ~USBPause ()
 

Private Attributes

uint8_t savedUDIEN
 The saved value of the UDIEN register. More...
 
uint8_t savedUENUM
 The saved value of the UENUM register. More...
 
uint8_t savedUEIENX0
 The saved value of the UEIENX register for endpoint 0. More...
 

Detailed Description

This class disables USB interrupts in its constructor when it is created and restores them to their previous state in its destructor when it is destroyed. This class is tailored to the behavior of the Arduino core USB code, so it might have to change if that code changes.

This class assumes that the only USB interrupts enabled are general device interrupts and endpoint 0 interrupts.

It also assumes that the endpoint 0 interrupts will not enable or disable any of the general device interrupts.

Definition at line 26 of file USBPause.h.

Constructor & Destructor Documentation

◆ USBPause()

USBPause::USBPause ( )
inline

Definition at line 39 of file USBPause.h.

References savedUDIEN, savedUEIENX0, and savedUENUM.

◆ ~USBPause()

USBPause::~USBPause ( )
inline

Definition at line 56 of file USBPause.h.

References savedUDIEN, savedUEIENX0, and savedUENUM.

Field Documentation

◆ savedUDIEN

uint8_t USBPause::savedUDIEN
private

The saved value of the UDIEN register.

Definition at line 29 of file USBPause.h.

Referenced by USBPause(), and ~USBPause().

◆ savedUEIENX0

uint8_t USBPause::savedUEIENX0
private

The saved value of the UEIENX register for endpoint 0.

Definition at line 35 of file USBPause.h.

Referenced by USBPause(), and ~USBPause().

◆ savedUENUM

uint8_t USBPause::savedUENUM
private

The saved value of the UENUM register.

Definition at line 32 of file USBPause.h.

Referenced by USBPause(), and ~USBPause().


The documentation for this class was generated from the following file: