Explorar el Código

Use NEW_POWER to update output state

We don't need to update the source's capabilities when setting our
output state.  Now we just send a new Request.  For now, that request is
redundant, but soon I want to make the Sink request less current when
the output is disabled.  Whether the voltage should be the same or
always vSafe5V in that case, I haven't decided yet.  There are
advantages to each, but the difference is so minor in terms of using the
device that I don't see a reason to let the user choose, which of course
puts the decision on me.
Clara Hobbs hace 6 años
padre
commit
377b2da4fe
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/shell.c

+ 2
- 2
src/shell.c Ver fichero

@@ -329,10 +329,10 @@ static void cmd_output(BaseSequentialStream *chp, int argc, char *argv[])
329 329
         /* Set the output status and re-negotiate power */
330 330
         if (strcmp(argv[0], "enable") == 0) {
331 331
             pdb_dpm_output_enabled = true;
332
-            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_GET_SOURCE_CAP);
332
+            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_NEW_POWER);
333 333
         } else if (strcmp(argv[0], "disable") == 0) {
334 334
             pdb_dpm_output_enabled = false;
335
-            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_GET_SOURCE_CAP);
335
+            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_NEW_POWER);
336 336
         } else {
337 337
             /* Or, if the argument was invalid, print a usage message */
338 338
             chprintf(chp, "Usage: output [enable|disable]\r\n");

Loading…
Cancelar
Guardar