OSDN Git Service

[SCHEMATIC] Modify SW/MW/LW Preamp, insert galbanic-isolator replace of common-mode...
[openi2cradio/OpenI2CRadio.git] / ui.h
1 /*
2  * OpenI2CRADIO
3  * UI Handler(Header)
4  * Copyright (C) 2013-06-10 K.Ohta <whatisthis.sowhat ai gmail.com>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2,
9  *  or (at your option) any later version.
10  *  This library / program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  *  See the GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this library; see the file COPYING. If not, write to the
17  *  Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
18  *  MA 02110-1301, USA.
19  *
20  *  As a special exception, if you link this(includeed from sdcc) library
21  *  with other files, some of which are compiled with SDCC,
22  *  to produce an executable, this library does not by itself cause
23  *  the resulting executable to be covered by the GNU General Public License.
24  *  This exception does not however invalidate any other reasons why
25  *  the executable file might be covered by the GNU General Public License.
26  */
27
28
29 #ifndef UI_H
30 #define UI_H
31
32 #if defined(__SDCC)
33 #include <sdcc-lib.h>
34 #include <pic18fregs.h> /* ONLY FOR PIC18x */
35 #endif
36
37 #include "lcd_acm1602.h"
38 #include "iodef.h"
39
40 #ifdef  __cplusplus
41 extern "C" {
42 #endif
43
44
45 extern keyin_defs keyin_old[2];
46 extern keyin_defs keyin_now;
47 extern char keyin_fifo[32];
48 extern char keyin_nowp;
49 extern char keyin_counter;
50
51 /*
52  * LCD Primitives
53  */
54 extern void _PUTCHAR(unsigned char c);
55 extern void _LOCATE(unsigned char x, unsigned char y);
56 extern void _LOCATE_0_0(void);
57 extern void _LOCATE_0_1(void);
58 extern void _CLS(void);
59 extern void _HOME(void);
60 extern void _CURSOR_ON(void);
61 extern void _CURSOR_OFF(void);
62 extern void _CURSOR_LEFT(void);
63 extern void _CURSOR_RIGHT(void);
64
65
66 extern void keyin_init(void);
67 #ifdef __SDCC
68 extern void push_keyinfifo(char b) __critical;
69 extern char pop_keyinfifo(void) __critical;
70 #else
71 extern void push_keyinfifo(char b);
72 extern char pop_keyinfifo(void);
73 #endif
74 extern unsigned char readkey_compare(void);
75
76 extern void printstr(const char *s);
77 extern void print_numeric(int i, unsigned char supressf);
78 extern void setsignal_tune(unsigned char flag);
79 extern void set_backlight(unsigned char flag, unsigned int val);
80 extern unsigned long read_numeric(unsigned int initial, unsigned char digit,
81         char startx, char starty);
82 extern unsigned long subst_numeric(unsigned long start, unsigned char pos, unsigned char c);
83 extern void print_numeric_nosupress(unsigned long data, unsigned char digit);
84 extern unsigned char readkey(void);
85 extern unsigned char pollkey_single(void);
86 extern unsigned char pollkey_single_timeout(unsigned char limit, unsigned char repeat);
87 extern unsigned char pollkey_numeric(unsigned char init);
88
89 #ifdef  __cplusplus
90 }
91 #endif
92
93 #endif  /* UI_H */
94