Documentation ¶
Overview ¶
Package axp192 provides a driver for the axp192 I2C Enhanced single Cell Li-Battery and Power System Management IC.
http://www.x-powers.com/en.php/Info/product_detail/article_id/29 Datasheet: https://github.com/m5stack/M5-Schematic/blob/master/Core/AXP192%20Datasheet_v1.1_en_draft_2211.pdf
Index ¶
- Constants
- type Config
- type Device
- func (d *Device) Configure(config Config) error
- func (d *Device) GetADCEnableSet() uint8
- func (d *Device) GetBackupBatteryChargingControl() uint8
- func (d *Device) GetDCDC13LDO23Switch() uint8
- func (d *Device) GetDCDC1VoltageSet() uint8
- func (d *Device) GetDCDC2VoltageSet() uint8
- func (d *Device) GetDCDC3VoltageSet() uint8
- func (d *Device) GetGPIO1Control() uint8
- func (d *Device) GetGPIO20SignalStatus() uint8
- func (d *Device) GetGPIO2Control() uint8
- func (d *Device) GetGPIO43FunctionControl() uint8
- func (d *Device) GetGPIO43SignalStatus() uint8
- func (d *Device) GetLDO23VoltageSet() uint8
- func (d *Device) GetPEKParameterSet() uint8
- func (d *Device) GetVbusIPSOutAccessManagement() uint8
- func (d *Device) ReadPowerSupplyStatus() uint8
- func (d *Device) SetADCEnableSet(a uint8)
- func (d *Device) SetBackupBatteryChargingControl(a uint8)
- func (d *Device) SetDCDC13LDO23Switch(a uint8)
- func (d *Device) SetDCDC1VoltageSet(a uint8)
- func (d *Device) SetDCDC2VoltageSet(a uint8)
- func (d *Device) SetDCDC3VoltageSet(a uint8)
- func (d *Device) SetDCVoltage(number uint8, voltage uint16)
- func (d *Device) SetGPIO1Control(a uint8)
- func (d *Device) SetGPIO20SignalStatus(a uint8)
- func (d *Device) SetGPIO2Control(a uint8)
- func (d *Device) SetGPIO43FunctionControl(a uint8)
- func (d *Device) SetGPIO43SignalStatus(a uint8)
- func (d *Device) SetLDO23VoltageSet(a uint8)
- func (d *Device) SetLDOEnable(number uint8, state bool)
- func (d *Device) SetLDOVoltage(number uint8, voltage uint16)
- func (d *Device) SetPEKParameterSet(a uint8)
- func (d *Device) SetVbusIPSOutAccessManagement(a uint8)
- type Error
Constants ¶
const ( // Address is default I2C address. Address = 0x34 RegPowerSupplyStatus = 0x00 RegDCDC13LDO23Switch = 0x12 RegVbusIPSOutAccessManagement = 0x30 RegBackupBatteryChargingControl = 0x35 RegDCDC2VoltageSet = 0x25 RegDCDC1VoltageSet = 0x26 RegDCDC3VoltageSet = 0x27 RegLDO23VoltageSet = 0x28 RegPEKParameterSet = 0x36 RegADCEnableSet = 0x82 RegGPIO1Control = 0x92 RegGPIO2Control = 0x93 RegGPIO20SignalStatus = 0x94 RegGPIO43FunctionControl = 0x95 RegGPIO43SignalStatus = 0x96 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Address uint8 // contains filtered or unexported fields }
func (*Device) GetADCEnableSet ¶
GetADCEnableSet gets ADC enable 1.
func (*Device) GetBackupBatteryChargingControl ¶
GetBackupBatteryChargingControl gets backup battery charge control.
func (*Device) GetDCDC13LDO23Switch ¶
GetDCDC13LDO23Switch gets DC-DC1/3 & LOD2/3 output control.
func (*Device) GetDCDC1VoltageSet ¶
GetDCDC1VoltageSet gets DC-DC1 output voltage.
func (*Device) GetDCDC2VoltageSet ¶
GetDCDC2VoltageSet gets DC-DC2 dynamic voltage parameter.
func (*Device) GetDCDC3VoltageSet ¶
GetDCDC3VoltageSet gets DC-DC3 output voltage.
func (*Device) GetGPIO1Control ¶
GetGPIO1Control gets GPIO1 function.
func (*Device) GetGPIO20SignalStatus ¶
GetGPIO20SignalStatus gets GPIO[2:0] signal status.
func (*Device) GetGPIO2Control ¶
GetGPIO2Control gets GPIO2 function.
func (*Device) GetGPIO43FunctionControl ¶
GetGPIO43FunctionControl gets GPIO[4:3] pin function.
func (*Device) GetGPIO43SignalStatus ¶
GetGPIO43SignalStatus gets GPIO[4:3] signal status.
func (*Device) GetLDO23VoltageSet ¶
GetLDO23VoltageSet gets LDO2/3 output voltage.
func (*Device) GetPEKParameterSet ¶
GetPEKParameterSet gets PEK press key parameter.
func (*Device) GetVbusIPSOutAccessManagement ¶
GetVbusIPSOutAccessManagement gets VBUS-IPSOUT access management.
func (*Device) ReadPowerSupplyStatus ¶
ReadPowerSupplyStatus reads power supply status.
func (*Device) SetADCEnableSet ¶
SetADCEnableSet sets ADC enable 1.
func (*Device) SetBackupBatteryChargingControl ¶
SetBackupBatteryChargingControl sets backup battery charge control.
func (*Device) SetDCDC13LDO23Switch ¶
SetDCDC13LDO23Switch sets DC-DC1/3 & LOD2/3 output control.
func (*Device) SetDCDC1VoltageSet ¶
SetDCDC1VoltageSet sets DC-DC1 output voltage.
func (*Device) SetDCDC2VoltageSet ¶
SetDCDC2VoltageSet sets DC-DC2 dynamic voltage parameter.
func (*Device) SetDCDC3VoltageSet ¶
SetDCDC3VoltageSet sets DC-DC3 output voltage.
func (*Device) SetDCVoltage ¶
SetDCVoltage sets DC voltage.
func (*Device) SetGPIO1Control ¶
SetGPIO1Control sets GPIO1 function.
func (*Device) SetGPIO20SignalStatus ¶
SetGPIO20SignalStatus sets GPIO[2:0] signal status.
func (*Device) SetGPIO2Control ¶
SetGPIO2Control sets GPIO2 function.
func (*Device) SetGPIO43FunctionControl ¶
SetGPIO43FunctionControl sets GPIO[4:3] pin function.
func (*Device) SetGPIO43SignalStatus ¶
SetGPIO43SignalStatus sets GPIO[4:3] signal status.
func (*Device) SetLDO23VoltageSet ¶
SetLDO23VoltageSet sets LDO2/3 output voltage.
func (*Device) SetLDOEnable ¶
SetLDOEnable enable LDO.
func (*Device) SetLDOVoltage ¶
SetLDOVoltage sets LDO voltage.
func (*Device) SetPEKParameterSet ¶
SetPEKParameterSet sets PEK press key parameter.
func (*Device) SetVbusIPSOutAccessManagement ¶
SetVbusIPSOutAccessManagement sets VBUS-IPSOUT access management.