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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_LM3S102_KEIL/] [include/] [pdc.h] - Blame information for rev 600

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

Line No. Rev Author Line
1 581 jeremybenn
//*****************************************************************************
2
//
3
// pdc.h - Stellaris development board Peripheral Device Controller definitions
4
//         and prototypes.
5
//
6
// Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved.
7
//
8
// Software License Agreement
9
//
10
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
11
// exclusively on LMI's Stellaris Family of microcontroller products.
12
//
13
// The software is owned by LMI and/or its suppliers, and is protected under
14
// applicable copyright laws.  All rights are reserved.  Any use in violation
15
// of the foregoing restrictions may subject the user to criminal sanctions
16
// under applicable laws, as well as to civil liability for the breach of the
17
// terms and conditions of this license.
18
//
19
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
20
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
21
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
22
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
23
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
24
//
25
//*****************************************************************************
26
 
27
#ifndef __PDC_H__
28
#define __PDC_H__
29
 
30
#ifdef __cplusplus
31
extern "C"
32
{
33
#endif
34
 
35
//*****************************************************************************
36
//
37
// The registers within the peripheral device controller.
38
//
39
//*****************************************************************************
40
#define PDC_VER                 0x0         // Version register
41
#define PDC_CSR                 0x1         // Command/Status register
42
#define PDC_DSW                 0x4         // DIP Switch register
43
#define PDC_LED                 0x5         // LED register
44
#define PDC_LCD_CSR             0x6         // LCD Command/Status register
45
#define PDC_LCD_RAM             0x7         // LCD RAM register
46
#define PDC_GPXDAT              0x8         // GPIO X Data register
47
#define PDC_GPXDIR              0x9         // GPIO X Direction register
48
#define PDC_GPYDAT              0xA         // GPIO Y Data register
49
#define PDC_GPYDIR              0xB         // GPIO Y Direction register
50
#define PDC_GPZDAT              0xC         // GPIO Z Data register
51
#define PDC_GPZDIR              0xD         // GPIO Z Direction register
52
 
53
//*****************************************************************************
54
//
55
// Flags indicating a read or write to the peripheral device controller.
56
//
57
//*****************************************************************************
58
#define PDC_RD                  0x80        // PDC read command
59
#define PDC_WR                  0x00        // PDC write command
60
 
61
//*****************************************************************************
62
//
63
// LCD panel (Crystalfontz CFAH1602B) commands, RS = 0
64
//
65
//*****************************************************************************
66
#define LCD_CLEAR               0x01        // Clear display (0 fill DDRAM).
67
#define LCD_HOME                0x02        // Cursor home.
68
#define LCD_MODE                0x04        // Set entry mode (cursor dir)
69
#define LCD_ON                  0x08        // Set display, cursor, blinking
70
                                            // on/off
71
#define LCD_CUR                 0x10        // Cursor, display shift
72
#define LCD_IF                  0x20        // Set interface data length,
73
                                            // lines, font
74
#define LCD_CGADDR              0x40        // Set CGRAM AC address
75
#define LCD_DDADDR              0x80        // Set DDRAM AC address
76
 
77
//*****************************************************************************
78
//
79
// LCD Status bit
80
//
81
//*****************************************************************************
82
#define LCD_B_BUSY              0x80        // Busy flag.
83
 
84
//*****************************************************************************
85
//
86
// The GPIO port A pin numbers for the various SSI signals.
87
//
88
//*****************************************************************************
89
#define SSI_CS                  GPIO_PIN_3
90
#define PDC_CS                  GPIO_PIN_3
91
#define SSI_CLK                 GPIO_PIN_2
92
#define SSI_TX                  GPIO_PIN_5
93
#define SSI_RX                  GPIO_PIN_4
94
 
95
//*****************************************************************************
96
//
97
// Function Prototypes
98
//
99
//*****************************************************************************
100
extern void PDCInit(void);
101
extern unsigned char PDCRead(unsigned char ucAddr);
102
extern void PDCWrite(unsigned char ucAddr, unsigned char ucData);
103
extern unsigned char PDCDIPRead(void);
104
extern void PDCLEDWrite(unsigned char ucLED);
105
extern unsigned char PDCLEDRead(void);
106
extern void PDCLCDInit(void);
107
extern void PDCLCDBacklightOn(void);
108
extern void PDCLCDBacklightOff(void);
109
extern void PDCLCDClear(void);
110
extern void PDCLCDCreateChar(unsigned char ucChar, unsigned char *pucData);
111
extern void PDCLCDSetPos(unsigned char ucX, unsigned char ucY);
112
extern void PDCLCDWrite(const char *pcStr, unsigned long ulCount);
113
extern unsigned char PDCGPIODirRead(unsigned char ucIdx);
114
extern void PDCGPIODirWrite(unsigned char ucIdx, unsigned char ucValue);
115
extern unsigned char PDCGPIORead(unsigned char ucIdx);
116
extern void PDCGPIOWrite(unsigned char ucIdx, unsigned char ucValue);
117
 
118
#ifdef __cplusplus
119
}
120
#endif
121
 
122
#endif // __PDC_H__

powered by: WebSVN 2.1.0

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