comparison src/cs/drivers/drv_app/r2d/uwire.h @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /**
2
3 @file: uwire.h
4
5 @author Davide Carpegna
6
7 @version 1.0
8
9 Purpose: Driver for the uwire HD module
10
11 */
12
13 /*
14
15 Date Modification
16 ------------------------------------
17 09/22/2000 Create
18 10/18/2001 Updated for R2D by Christophe Favergeon
19
20
21 (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved
22 */
23
24 #ifndef _UWIRE_H_
25 #define _UWIRE_H_
26
27 #define MEM_UWIRE 0xFFFE4000
28 #define TDR (MEM_UWIRE)
29 #define RDR (MEM_UWIRE)
30 #define CSR (MEM_UWIRE+0x02)
31 #define SR1 (MEM_UWIRE+0x04)
32 #define SR2 (MEM_UWIRE+0x06)
33 #define SR3 (MEM_UWIRE+0x08)
34
35 #define INDEX_CS1 (1 << 10)
36 #define NB_BITS_WR_8 (1 << 8 )
37 #define INDEX_CS0 0
38 #define NB_BITS_WR_9 (9 << 5)
39 #define CS_CMD (1 << 12)
40 #define START (1 << 13)
41 #define CS1_EDGE_RD (1 << 6)
42 #define CS1_FRQ_FINT_4 (1 << 9)
43 #define CS0_FRQ_FINT_2 0
44 #define CS0_FRQ_FINT_4 (1 << 3)
45 #define SR3_CLK_EN 1
46
47 #define CSRB ( 1<<14 )
48
49 #define IO_SEL0 0xFFFEF008
50 #define IO_SEL 0xFFFEF00A
51
52 #define GPIO_INOUT 0xFFFE4804
53 #define GPIO_OUT 0xFFFE4802
54 #define CNTL_RST 0xFFFFFD04
55
56 #ifdef _WINDOWS
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 #endif
62
63 // prototypes of uwire functions for lcd
64 BOOLEAN lcd_polling(void);
65 void lcd_transmit_cmd(UINT8 cmd);
66 void uwire_init_lcd(void);
67
68 // Defined only for board
69 void lcd_transmit_data(UINT8 data);
70
71 // Defined only for PC
72 void lcd_refresh(void);
73 void lcd_set_pos(unsigned char x,unsigned char y);
74 void* lcd_get_dc(void);
75
76 #ifdef _WINDOWS
77 #ifdef __cplusplus
78 }
79 #endif
80 #endif
81
82 #endif /*_UWIRE_H_*/