fix bus msb nibble calculation in case of incomplete MSB nibble. Add sigma delta adc example

This commit is contained in:
Stefan Frederik 2022-02-16 02:27:57 +01:00
parent fa3d97010c
commit f4ff14fbd8
1 changed files with 3 additions and 1 deletions

View File

@ -1641,9 +1641,11 @@ void get_bus_value(int n_bits, int hex_digits, SPICE_DATA **idx_arr, int p, char
hex++;
if(x)
busval[hex_digits - hex] = 'X';
else
else {
hexdigit <<= (3 - bin);
busval[hex_digits - hex] = hexstr[hexdigit];
}
}
busval[hex_digits] = '\0';
}