Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
730 | woggle | 1 | /***************************************************************************** |
2 | * Copyright (C) 2010 Peter "woggle" Mack, mac@denich.net * |
||
3 | * * |
||
4 | * This program is free software; you can redistribute it and/or modify * |
||
5 | * it under the terms of the GNU General Public License as published by * |
||
6 | * the Free Software Foundation; either version 2 of the License. * |
||
7 | * * |
||
8 | * This program is distributed in the hope that it will be useful, * |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
11 | * GNU General Public License for more details. * |
||
12 | * * |
||
13 | * You should have received a copy of the GNU General Public License * |
||
14 | * along with this program; if not, write to the * |
||
15 | * Free Software Foundation, Inc., * |
||
16 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
17 | * * |
||
18 | *****************************************************************************/ |
||
19 | |||
20 | #include <avr/io.h> |
||
21 | #include <avr/interrupt.h> |
||
22 | #include <avr/pgmspace.h> |
||
23 | |||
24 | #include "lcd.h" |
||
25 | #include "timer.h" // Keys |
||
26 | #include "usart.h" |
||
27 | #include "status.h" |
||
28 | #include "debug.h" |
||
29 | |||
30 | |||
31 | //***************************************************************************** |
||
32 | // |
||
33 | void status (void) |
||
34 | { |
||
35 | uint8_t line = 1; |
||
36 | |||
37 | lcd_cls (); |
||
38 | |||
39 | lcd_printp (PSTR("Status:"), 0); |
||
40 | lcd_printpns_at (0, 7, PSTR(" Back "), 0); |
||
41 | |||
42 | lcd_printp_at(0, line, PSTR("MMB Version: "), 0); |
||
43 | lcd_write_number_u (VERSION_MAJOR); |
||
44 | lcd_printp(PSTR("."), 0); |
||
45 | lcd_write_number_u (VERSION_MINOR); |
||
46 | line++; |
||
47 | |||
48 | lcd_printp_at(0, line, PSTR("UART CRC ERR: "), 0); |
||
49 | write_ndigit_number_u(15, line, stat_crc_error, 5, 0); |
||
50 | line++; |
||
51 | |||
52 | lcd_printp_at(0, line, PSTR("UART OVEFLOW: "), 0); |
||
53 | write_ndigit_number_u(15, line, stat_overflow_error, 5, 0); |
||
54 | line++; |
||
55 | |||
56 | #if defined (__AVR_ATmega32__) |
||
57 | lcd_printp_at(0, line, PSTR("Names: "), 0); |
||
58 | write_ndigit_number_u(15, line, AnalogNamesRead, 5, 0); |
||
59 | line++; |
||
60 | #else |
||
61 | lcd_printp_at(0, line, PSTR("Names NC: "), 0); |
||
62 | write_ndigit_number_u(15, line, AnalogNamesRead[0], 5, 0); |
||
63 | line++; |
||
64 | |||
65 | lcd_printp_at(0, line, PSTR("AN FC: "), 0); |
||
66 | write_ndigit_number_u(15, line, AnalogNamesRead[1], 5, 0); |
||
67 | line++; |
||
68 | #endif |
||
69 | |||
70 | while (!get_key_press (1 << KEY_ESC)); |
||
71 | } |