4 * Copyright (C) 2013-06-10 K.Ohta <whatisthis.sowhat ai gmail.com>
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.
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,
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.
33 #include <pic18fregs.h> /* ONLY FOR PIC18x */
35 #include "lcd_acm1602.h"
42 extern keyin_defs keyin_old[2];
43 extern keyin_defs keyin_now;
44 extern char keyin_fifo[16];
45 extern char keyin_nowp;
46 extern char keyin_counter;
48 #define _LOCATE(x,y) acm1602_locate_16x2(0xa0, x, y)
49 #define _PUTCHAR(c) acm1602_putchar(0xa0, c)
50 #define _CURSOR_LEFT() acm1602_cursordir(0xa0, 0x00)
51 #define _CURSOR_RIGHT() acm1602_cursordir(0xa0, 0xff)
52 #define _CLS() acm1602_cls(0xa0);
53 #define _HOME() acm1602_home(0xa0);
56 extern void keyin_init(void);
57 extern void keyin_ioinit(void);
58 extern void push_keyinfifo(char b) __critical;
59 extern char pop_keyinfifo(void) __critical;
60 extern void readkey_io(void);
61 extern unsigned char readkey_compare(void);
63 extern void printstr(char *s);
64 extern void print_numeric(int i, unsigned char supressf);
65 extern void setsignal_tune(unsigned char flag);
66 extern void set_backlight(unsigned char flag, unsigned int val);
67 extern unsigned int read_numeric(unsigned int initial, unsigned char digit,
68 char startx, char starty);
69 extern unsigned int subst_numeric(unsigned int start, unsigned char pos, unsigned char c);
70 extern void print_numeric_nosupress(unsigned int data, unsigned char digit);