Documentation ¶
Overview ¶
Package fusb303 supports communication with the On Semiconductor FUSB303 USB Type-C port controller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( I2CBus = 0 I2CAddress = 0x31 )
View Source
var CurrentMode = map[byte]string{
0x00: "0.0 A",
0x01: "0.5 A",
0x02: "1.5 A",
0x03: "3.0 A",
}
Current mode values and meaning (FUSB303/D, Table 6).
Functions ¶
func Disable ¶
func Disable() (err error)
Force disable, writing I2C data address 0x05 (CONTROL_1, FUSB303/D - Table 17).
func Enable ¶
func Enable() (err error)
Force enable, writing I2C data address 0x05 (CONTROL_1, FUSB303/D - Table 17).
func GetCurrentMode ¶
Get detected current advertisement, reading I2C data address 0x11 (STATUS, (FUSB303/D, Table 22) and extracting value BC_LVL[1:0].
func GetDeviceID ¶
Get device identifier, reading I2C data address 0x01 (DEVICE ID, (FUSB303/D, Table 13).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.