Diego Rondini dd2b8c1155 cmd: gpio: Add gpio read subcommand
As explained in commit 4af2a33ee5b9 ("cmd: gpio: Make `gpio input`
return pin value again") the `gpio input` is used in scripts to obtain
the value of a pin, despite the fact that CMD_RET_FAILURE is
indistinguishable from a valid pin value.
To be able to detect failures and properly use the value of a GPIO in
scripts we introduce the `gpio read` command that sets the variable
`name` to the value of the pin. Return code of the `gpio read` command
can be used to check for CMD_RET_SUCCESS or CMD_RET_FAILURE.
CONFIG_CMD_GPIO_READ is used to enable the `gpio read` command.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2022-04-20 11:14:39 -04:00
..
2017-02-08 15:56:28 -05:00
2022-01-25 11:44:36 -07:00
2022-01-14 13:16:11 -05:00
2022-02-05 15:49:00 +01:00
2021-08-26 08:08:11 +02:00
2022-03-31 14:12:23 -04:00
2020-05-18 18:36:55 -04:00
2020-05-18 18:36:55 -04:00
2022-02-25 01:41:04 -05:00
2022-03-28 20:14:24 +02:00
2020-05-18 18:36:55 -04:00
2020-12-18 20:32:21 -07:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2020-05-18 18:36:55 -04:00
2022-01-15 10:57:22 +01:00
2021-11-16 14:35:09 -05:00
2022-03-15 16:19:29 -04:00
2020-05-18 18:36:55 -04:00
2022-03-10 08:28:36 -05:00
2020-05-18 18:36:55 -04:00
2020-05-18 18:36:55 -04:00
2020-10-23 13:33:07 -04:00
2022-01-21 14:01:35 -05:00
2022-04-20 11:14:39 -04:00
2022-01-19 18:11:34 +01:00
2020-05-18 18:36:55 -04:00
2020-05-18 18:36:55 -04:00
2021-12-05 09:23:15 -07:00
2021-08-30 14:10:07 -04:00
2020-05-18 18:36:55 -04:00
2020-05-18 18:36:55 -04:00
2022-01-19 18:11:34 +01:00
2022-04-20 11:14:39 -04:00
2020-05-18 18:36:55 -04:00
2022-03-15 16:19:29 -04:00
2021-11-28 16:51:51 -07:00
2022-01-19 18:11:34 +01:00
2020-10-28 11:49:31 -04:00
2020-05-18 18:36:55 -04:00
2020-07-08 17:21:46 -04:00
2022-01-15 10:57:22 +01:00
2022-01-19 18:11:34 +01:00
2020-05-18 18:36:55 -04:00
2020-12-18 20:32:21 -07:00
2020-05-18 18:36:55 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2021-09-24 14:30:46 -04:00
2020-08-07 22:31:32 -04:00
2020-05-18 21:19:18 -04:00
2020-05-18 18:36:55 -04:00
2021-10-21 07:39:05 +02:00
2022-01-19 18:11:34 +01:00
2021-10-09 13:09:56 -04:00
2020-05-18 18:36:55 -04:00
2020-05-18 18:36:55 -04:00