]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_LM3S102_Rowley/hw_include/ssi.h
First version under SVN is V4.0.1
[freertos] / Demo / CORTEX_LM3S102_Rowley / hw_include / ssi.h
1 //*****************************************************************************\r
2 //\r
3 // ssi.h - Prototypes for the Synchronous Serial Interface Driver.\r
4 //\r
5 // Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved.\r
6 //\r
7 // Software License Agreement\r
8 //\r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and\r
10 // exclusively on LMI's Stellaris Family of microcontroller products.\r
11 //\r
12 // The software is owned by LMI and/or its suppliers, and is protected under\r
13 // applicable copyright laws.  All rights are reserved.  Any use in violation\r
14 // of the foregoing restrictions may subject the user to criminal sanctions\r
15 // under applicable laws, as well as to civil liability for the breach of the\r
16 // terms and conditions of this license.\r
17 //\r
18 // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED\r
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF\r
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.\r
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR\r
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.\r
23 //\r
24 // This is part of revision 523 of the Stellaris Driver Library.\r
25 //\r
26 //*****************************************************************************\r
27 \r
28 #ifndef __SSI_H__\r
29 #define __SSI_H__\r
30 \r
31 #ifdef __cplusplus\r
32 extern "C"\r
33 {\r
34 #endif\r
35 \r
36 //*****************************************************************************\r
37 //\r
38 // Values that can be passed to SSIIntEnable, SSIIntDisable, and SSIIntClear\r
39 // as the ulIntFlags parameter, and returned by SSIIntStatus.\r
40 //\r
41 //*****************************************************************************\r
42 #define SSI_TXFF                0x00000008  // TX FIFO half empty or less\r
43 #define SSI_RXFF                0x00000004  // RX FIFO half full or less\r
44 #define SSI_RXTO                0x00000002  // RX timeout\r
45 #define SSI_RXOR                0x00000001  // RX overrun\r
46 \r
47 //*****************************************************************************\r
48 //\r
49 // Values that can be passed to SSIConfig.\r
50 //\r
51 //*****************************************************************************\r
52 #define SSI_FRF_MOTO_MODE_0     0x00000000  // Moto fmt, polarity 0, phase 0\r
53 #define SSI_FRF_MOTO_MODE_1     0x00000002  // Moto fmt, polarity 0, phase 1\r
54 #define SSI_FRF_MOTO_MODE_2     0x00000001  // Moto fmt, polarity 1, phase 0\r
55 #define SSI_FRF_MOTO_MODE_3     0x00000003  // Moto fmt, polarity 1, phase 1\r
56 #define SSI_FRF_TI              0x00000010  // TI frame format\r
57 #define SSI_FRF_NMW             0x00000020  // National MicroWire frame format\r
58 \r
59 #define SSI_MODE_MASTER         0x00000000  // SSI master\r
60 #define SSI_MODE_SLAVE          0x00000001  // SSI slave\r
61 #define SSI_MODE_SLAVE_OD       0x00000002  // SSI slave with output disabled\r
62 \r
63 //*****************************************************************************\r
64 //\r
65 // Prototypes for the APIs.\r
66 //\r
67 //*****************************************************************************\r
68 extern void SSIConfig(unsigned long ulBase, unsigned long ulProtocol,\r
69                       unsigned long ulMode, unsigned long ulBitRate,\r
70                       unsigned long ulDataWidth);\r
71 extern void SSIDataGet(unsigned long ulBase, unsigned long *ulData);\r
72 extern long SSIDataNonBlockingGet(unsigned long ulBase, unsigned long *ulData);\r
73 extern void SSIDataPut(unsigned long ulBase, unsigned long ulData);\r
74 extern long SSIDataNonBlockingPut(unsigned long ulBase, unsigned long ulData);\r
75 extern void SSIDisable(unsigned long ulBase);\r
76 extern void SSIEnable(unsigned long ulBase);\r
77 extern void SSIIntClear(unsigned long ulBase, unsigned long ulIntFlags);\r
78 extern void SSIIntDisable(unsigned long ulBase, unsigned long ulIntFlags);\r
79 extern void SSIIntEnable(unsigned long ulBase, unsigned long ulIntFlags);\r
80 extern void SSIIntRegister(unsigned long ulBase, void(*pfnHandler)(void));\r
81 extern unsigned long SSIIntStatus(unsigned long ulBase, tBoolean bMasked);\r
82 extern void SSIIntUnregister(unsigned long ulBase);\r
83 \r
84 #ifdef __cplusplus\r
85 }\r
86 #endif\r
87 \r
88 #endif // __SSI_H__\r