Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lampda::bsp::powerDelivery::policy::VbusLossTracker Class Reference

#include <input_power_policy.h>

Public Member Functions

void on_vbus_valid (const uint32_t time_ms)
 VBUS is valid: a new loss starts from this time.
 
bool is_unplugged (const uint32_t time_ms, const bool isSinkHardResetting)
 VBUS is not valid: return true if this loss is an unplug.
 

Detailed Description

Follows a VBUS loss, to decide when it is an unplug. A hard reset seen during the loss keeps the hard reset grace until VBUS is valid again: the state machine can leave the hard reset states before VBUS is back over our threshold, and that is not an unplug. The deadline is always counted from the original VBUS loss, so no PD state change can extend it (issue #642).


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