OpenCores
URL https://opencores.org/ocsvn/mips789/mips789/trunk

Subversion Repositories mips789

[/] [mips789/] [branches/] [avendor/] [Clib/] [dvc_lib.h] - Blame information for rev 55

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 mcupro
/*
2
`define       UART_DATA_ADDR        'H80_00_00_28
3
`define       CMD_ADDR        'H80_00_00_14
4
`define       STATUS_ADDR        'H80_00_00_18
5
`define       SEG7LED_ADDR        'H80_00_00_1C
6
`define       SIM_DIS_ADDR        'H80_00_00_20
7
`define       LCD_DATA_ADDR        'H80_00_00_24
8
`define       TMR_IRQ_ADDR        'H80_00_00_28
9
`define       TMR_DATA_ADDR        'H80_00_00_34
10
`define       KEY1_IRQ_ADDR        'H80_00_00_2C
11
`define       KEY2_IRQ_ADDR        'H80_00_00_30
12
*/
13
 
14
#define FRQ 50*1000*1000
15
#define LCDDATA                    *(volatile unsigned char*)0X80000024 
16
#define SEG7LED                    *(volatile unsigned char*)0X8000001C                  
17
#define UART0_DATA         *(volatile unsigned char*)0x80000028
18
#define CMD                *(volatile unsigned int* )0x80000014
19
#define STATUS             *(volatile unsigned int* )0x80000018 
20
#define TMR_DATA           *(volatile unsigned int* )0x80000034 
21
 
22
#define set_bit(a,b)            a=a|(1<<b)
23
#define clr_bit(a,b)            a=a&(~(1<<b))
24
 
25
#define  LINE1     0
26
#define  LINE2     1
27
#define  LINE1_HEAD    0x80
28
#define  LINE2_HEAD    0xC0
29
#define  DATA_MODE    0x38
30
#define  OPEN_SCREEN    0x0C
31
#define  DISPLAY_ADDRESS   0x80
32
#define  CLEARSCREEN    LCD_en_command(0x01)
33
#define  LCD_DLY_US 100*10
34
#define  LCD_INIT_US 50*1000*10
35
 
36
#define  HIGH    1
37
#define  LOW     0
38
#define  TRUE    1
39
#define  ZERO    0      
40
 
41
void LCD_write_string(unsigned char X,unsigned char Y,unsigned char *s);
42
void LCD_write_char( unsigned x,unsigned char y,unsigned char dat);
43
void LCD_set_xy( unsigned char x, unsigned char y );
44
void LCD_en_dat(unsigned char dat);
45
void LCD_en_command(unsigned char command);
46
void LCD_delay(void);
47
void dly_us(unsigned int us );
48
void LCD_init(void);
49
void led1_on();
50
void led1_off();
51
void led2_on();
52
void led2_off();
53
void uart0_putstr(char *str);
54
unsigned char uart0_getc(void);
55
unsigned char  enqire_rxd(void);
56
void uart0_putc(unsigned char data);
57
void dis_byte(unsigned char data);
58
void download();
59
unsigned char get_key1();
60
unsigned char get_key2();
61
#define getkey1 get_key1
62
#define getkey2 get_key2
63
 
64
void tmr_en(unsigned int cntr);
65
void tmr_disen(void);
66
void tmr_clr(void);
67
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.