drivers: regulator: shell: fix printing of first voltage
The first supported voltages was not printed. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
4f3d5a10c4
commit
ea7293e464
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ static int cmd_vlist(const struct shell *sh, size_t argc, char **argv)
|
||||||
(void)regulator_list_voltage(dev, i, &volt_uv);
|
(void)regulator_list_voltage(dev, i, &volt_uv);
|
||||||
|
|
||||||
/* do not print repeated voltages */
|
/* do not print repeated voltages */
|
||||||
if ((i > 0U) && (last_volt_uv != volt_uv)) {
|
if ((i == 0U) || (last_volt_uv != volt_uv)) {
|
||||||
microtoshell(sh, 'V', volt_uv);
|
microtoshell(sh, 'V', volt_uv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue