llvm-mos-sdk
eater
eater.h
Go to the documentation of this file.
1
#ifndef _EATER_H_
2
#define _EATER_H_
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
// Get the value of the system millisecond tick counter.
9
unsigned
long
millis
(
void
);
10
11
// Wait for a specific number of milliseconds.
12
void
delay
(
unsigned
ms);
13
14
// LCD instructions.
15
#define LCD_I_CLEAR 0x01 // Clear the display.
16
#define LCD_I_HOME 0x02 // Move the cursor to the home position.
17
#define LCD_I_MODE_INC 0x06 // Set mode to increment, no display shift.
18
#define LCD_I_DISP_OFF 0x08 // Display off, cursor off, blinking off.
19
#define LCD_I_DISP_ON 0x0E // Display on, cursor on, blinking off.
20
#define LCD_I_MOVE_L 0x10 // Move the cursor left one position.
21
#define LCD_I_MOVE_R 0x14 // Move the cursor right one position.
22
#define LCD_I_SHIFT_L 0x18 // Move the display left one position.
23
#define LCD_I_SHIFT_R 0x1C // Move the display right one position.
24
#define LCD_I_FUNC_SET 0x28 // 4-bit mode, 2 lines, 5x8 font.
25
#define LCD_I_CGRAM 0x40 // Set CGRAM address (offset in low bits).
26
#define LCD_I_DDRAM 0x80 // Set DDRAM address (offset in low bits).
27
28
// Initialize the LCD in 4-bit mode, 2 lines, 5x8 font and clear the display.
29
void
lcd_init
(
void
);
30
31
// Send an instruction to the LCD.
32
void
lcd_instruction
(
unsigned
char
insn);
33
34
// Put a character to the LCD.
35
void
lcd_putchar
(
unsigned
char
c
);
36
37
// Put a string to the LCD.
38
void
lcd_puts
(
const
char
*str);
39
40
#ifdef __cplusplus
41
}
42
#endif
43
44
#endif // not _EATER_H_
delay
void delay(unsigned ms)
lcd_puts
void lcd_puts(const char *str)
millis
unsigned long millis(void)
lcd_instruction
void lcd_instruction(unsigned char insn)
lcd_putchar
void lcd_putchar(unsigned char c)
lcd_init
void lcd_init(void)
c
byte byte c
Definition:
api.h:59
Generated by
1.8.17