#include <modm/driver/usb/stusb4500.hpp>
|
| enum | Register : uint8_t {
RdoRegStatus = 0x91,
DpmPdoNumb = 0x70,
DpmSnkPdo1 = 0x85,
DpmSnkPdo2 = 0x89,
DpmSnkPdo3 = 0x8D
} |
| |
template<class I2cMaster>
class modm::stusb4500< I2cMaster >
- Author
- Henrik Hose, Raphael Lehmann
Attaches a configuration handler, which is called before a transaction, whenever the configuration has to be changed.
template<class I2cMaster >
Configures a PDO.
Note: According to the USB standard the first PDO (1) always has to set voltage to 5000 [mV].
- Parameters
-
| pdoNumber | Which PDO to configure, range 1 to 3. |
| voltage | in mV |
| current | in mA |
Run the resumable function.
You need to implement this method in you subclass yourself.
- Returns
- >
NestingError if still running, <=NestingError if it has finished.
template<class I2cMaster >
Retrieve RDO status from STUSB4500 chip.
- Returns
- RdoRegStatusData object. Typically only RdoRegStatusData::MaxCurrent [mA] is of interest.
- Returns
- the nesting depth in the current resumable function, or -1 if called outside any resumable function
- Returns
true if a resumable function is running at the current nesting level, else false
- Returns
true when transaction is busy.
- Return Values
-
| true | device responds to address |
| false | no device with address found |
Sets a new address of the slave device.
- Parameters
-
| address | the slave address not yet shifted left (address < 128). |
template<class I2cMaster >
Sets the valid PDO.
- Parameters
-
| pdoNumber | Which PDO to set valid, range 1 to 3. |
- Returns
true when transaction did not return an error.
The documentation for this class was generated from the following file: