change adc driver not to use chibios hal

This commit is contained in:
TT 2016-12-17 13:16:56 +09:00
parent 8d39e43471
commit 8038df8c66
7 changed files with 187 additions and 38 deletions

14
plot.c
View file

@ -1237,15 +1237,17 @@ draw_frequencies(void)
{
char buf[24];
if (frequency1 > 0) {
int start = frequency0;
int stop = frequency1;
chsnprintf(buf, 24, "START %d.%03d %03d MHz ",
(int)(frequency0 / 1000000),
(int)((frequency0 / 1000) % 1000),
(int)(frequency0 % 1000));
(int)(start / 1000000),
(int)((start / 1000) % 1000),
(int)(start % 1000));
ili9341_drawstring_5x7(buf, OFFSETX, 233, 0xffff, 0x0000);
chsnprintf(buf, 24, "STOP %d.%03d %03d MHz",
(int)(frequency1 / 1000000),
(int)((frequency1 / 1000) % 1000),
(int)(frequency1 % 1000));
(int)(stop / 1000000),
(int)((stop / 1000) % 1000),
(int)(stop % 1000));
ili9341_drawstring_5x7(buf, 205, 233, 0xffff, 0x0000);
} else if (frequency1 < 0) {
int fcenter = frequency0;