14 #define QC_ERROR_QC2_ONLY -1 20 #define QC3_MIN_VOLTAGE_MV 3600 21 #define QC3_MAX_VOLTAGE_MV 12000 24 #define QC_T_GLICH_V_CHANGE_MS 60 25 #define QC_T_ACTIVE_MS 1 26 #define QC_T_INACTIVE_MS 1 47 QC3Control(byte DpPin, byte DmHiPin, byte DmLoPin);
193 int QC3Control::switchToContinuousMode();
double getVoltage()
Return the last voltage that was requested.
Definition: QC3Control.cpp:189
QC3Control(byte DpPin, byte DmHiPin, byte DmLoPin)
Makes an object to control a Quick Charge 3.0 source.
Definition: QC3Control.cpp:6
const byte _DmHiPin
Data- "high" pin.
Definition: QC3Control.h:183
const byte _DpPin
Data+ pin.
Definition: QC3Control.h:182
int set9V()
Set voltage to 9V.
Definition: QC3Control.cpp:61
Main class of the QC3Control-library.
Definition: QC3Control.h:35
int decrementVoltage()
Decrement the desired voltage of the QC3.0 source by 200mV.
Definition: QC3Control.cpp:126
unsigned int getMilliVoltage()
Return the last voltage that was requested.
Definition: QC3Control.cpp:193
bool _continuousMode
Are we in QC3 continuous adjustment mode?
Definition: QC3Control.h:187
int begin()
Starts the handshake with the QC3.0 source.
Definition: QC3Control.cpp:26
int set12V()
Set voltage to 12V.
Definition: QC3Control.cpp:82
unsigned int _milliVoltNow
Voltage currently set (in mV). Avoiding the term "current milliVolt" to prevent confusion between "cu...
Definition: QC3Control.h:189
int setVoltage(double volt)
Sets the desired voltage of the QC3.0 source.
Definition: QC3Control.cpp:184
int incrementVoltage()
Increment the desired voltage of the QC3.0 source by 200mV.
Definition: QC3Control.cpp:103
const byte _DmLoPin
Data- "low" pin. If set to 0, library is in QC2 mode.
Definition: QC3Control.h:184
int setMilliVoltage(unsigned int milliVolt)
Sets the desired voltage of the QC3.0 source.
Definition: QC3Control.cpp:157
bool _handshakeDone
Is the handshake done?
Definition: QC3Control.h:186
static const unsigned int _WaitTime
Wait time in the handshake. Should be at least 1,25s.
Definition: QC3Control.h:191
int set5V()
Set voltage to 5V.
Definition: QC3Control.cpp:45