|
@@ -28,7 +28,7 @@
|
28
|
28
|
|
29
|
29
|
|
30
|
30
|
/* Whether or not the power supply is unconstrained */
|
31
|
|
-static uint8_t dpm_unconstrained_power;
|
|
31
|
+static bool dpm_unconstrained_power;
|
32
|
32
|
|
33
|
33
|
bool pdb_dpm_evaluate_capability(const union pd_msg *capabilities, union pd_msg *request)
|
34
|
34
|
{
|
|
@@ -41,11 +41,7 @@ bool pdb_dpm_evaluate_capability(const union pd_msg *capabilities, union pd_msg
|
41
|
41
|
chEvtSignal(pdb_led_thread, PDB_EVT_LED_FAST_BLINK);
|
42
|
42
|
|
43
|
43
|
/* Get whether or not the power supply is constrained */
|
44
|
|
- if (capabilities->obj[0] & PD_PDO_SRC_FIXED_UNCONSTRAINED) {
|
45
|
|
- dpm_unconstrained_power = 1;
|
46
|
|
- } else {
|
47
|
|
- dpm_unconstrained_power = 0;
|
48
|
|
- }
|
|
44
|
+ dpm_unconstrained_power = capabilities->obj[0] & PD_PDO_SRC_FIXED_UNCONSTRAINED;
|
49
|
45
|
|
50
|
46
|
/* Make sure we have configuration */
|
51
|
47
|
if (cfg != NULL) {
|