drivers: adc: shell: fix - read result is signed
Previously negative read results were being printed by the shell as large uint16_t. Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
11f0e59d19
commit
50462228f2
1 changed files with 1 additions and 1 deletions
|
@ -305,7 +305,7 @@ static int cmd_adc_read(const struct shell *sh, size_t argc, char **argv)
|
|||
uint8_t adc_channel_id = strtol(argv[1], NULL, 10);
|
||||
/* -1 index of adc label name */
|
||||
struct adc_hdl *adc = get_adc(argv[-1]);
|
||||
uint16_t m_sample_buffer[BUFFER_SIZE];
|
||||
int16_t m_sample_buffer[BUFFER_SIZE];
|
||||
int retval;
|
||||
|
||||
if (!device_is_ready(adc->dev)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue