]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/MCF5223x/MCF52235_QSPI.h
Still messing around trying to get the workspace to be distributable.
[freertos] / Demo / ColdFire_MCF52233_Eclipse / RTOSDemo / MCF5223x / MCF52235_QSPI.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2007/03/19 Revision: 0.91\r
6  */\r
7 \r
8 #ifndef __MCF52235_QSPI_H__\r
9 #define __MCF52235_QSPI_H__\r
10 \r
11 \r
12 /*********************************************************************\r
13 *\r
14 * Queued Serial Peripheral Interface (QSPI)\r
15 *\r
16 *********************************************************************/\r
17 \r
18 /* Register read/write macros */\r
19 #define MCF_QSPI_QMR                         (*(vuint16*)(&__IPSBAR[0x340]))\r
20 #define MCF_QSPI_QDLYR                       (*(vuint16*)(&__IPSBAR[0x344]))\r
21 #define MCF_QSPI_QWR                         (*(vuint16*)(&__IPSBAR[0x348]))\r
22 #define MCF_QSPI_QIR                         (*(vuint16*)(&__IPSBAR[0x34C]))\r
23 #define MCF_QSPI_QAR                         (*(vuint16*)(&__IPSBAR[0x350]))\r
24 #define MCF_QSPI_QDR                         (*(vuint16*)(&__IPSBAR[0x354]))\r
25 \r
26 \r
27 /* Bit definitions and macros for MCF_QSPI_QMR */\r
28 #define MCF_QSPI_QMR_BAUD(x)                 (((x)&0xFF)<<0)\r
29 #define MCF_QSPI_QMR_CPHA                    (0x100)\r
30 #define MCF_QSPI_QMR_CPOL                    (0x200)\r
31 #define MCF_QSPI_QMR_BITS(x)                 (((x)&0xF)<<0xA)\r
32 #define MCF_QSPI_QMR_DOHIE                   (0x4000)\r
33 #define MCF_QSPI_QMR_MSTR                    (0x8000)\r
34 \r
35 /* Bit definitions and macros for MCF_QSPI_QDLYR */\r
36 #define MCF_QSPI_QDLYR_DTL(x)                (((x)&0xFF)<<0)\r
37 #define MCF_QSPI_QDLYR_QCD(x)                (((x)&0x7F)<<0x8)\r
38 #define MCF_QSPI_QDLYR_SPE                   (0x8000)\r
39 \r
40 /* Bit definitions and macros for MCF_QSPI_QWR */\r
41 #define MCF_QSPI_QWR_NEWQP(x)                (((x)&0xF)<<0)\r
42 #define MCF_QSPI_QWR_CPTQP(x)                (((x)&0xF)<<0x4)\r
43 #define MCF_QSPI_QWR_ENDQP(x)                (((x)&0xF)<<0x8)\r
44 #define MCF_QSPI_QWR_CSIV                    (0x1000)\r
45 #define MCF_QSPI_QWR_WRTO                    (0x2000)\r
46 #define MCF_QSPI_QWR_WREN                    (0x4000)\r
47 #define MCF_QSPI_QWR_HALT                    (0x8000)\r
48 \r
49 /* Bit definitions and macros for MCF_QSPI_QIR */\r
50 #define MCF_QSPI_QIR_SPIF                    (0x1)\r
51 #define MCF_QSPI_QIR_ABRT                    (0x4)\r
52 #define MCF_QSPI_QIR_WCEF                    (0x8)\r
53 #define MCF_QSPI_QIR_SPIFE                   (0x100)\r
54 #define MCF_QSPI_QIR_ABRTE                   (0x400)\r
55 #define MCF_QSPI_QIR_WCEFE                   (0x800)\r
56 #define MCF_QSPI_QIR_ABRTL                   (0x1000)\r
57 #define MCF_QSPI_QIR_ABRTB                   (0x4000)\r
58 #define MCF_QSPI_QIR_WCEFB                   (0x8000)\r
59 \r
60 /* Bit definitions and macros for MCF_QSPI_QAR */\r
61 #define MCF_QSPI_QAR_ADDR(x)                 (((x)&0x3F)<<0)\r
62 #define MCF_QSPI_QAR_TRANS                   (0)\r
63 #define MCF_QSPI_QAR_RECV                    (0x10)\r
64 #define MCF_QSPI_QAR_CMD                     (0x20)\r
65 \r
66 /* Bit definitions and macros for MCF_QSPI_QDR */\r
67 #define MCF_QSPI_QDR_DATA(x)                 (((x)&0xFFFF)<<0)\r
68 #define MCF_QSPI_QDR_CONT                    (0x8000)\r
69 #define MCF_QSPI_QDR_BITSE                   (0x4000)\r
70 #define MCF_QSPI_QDR_DT                      (0x2000)\r
71 #define MCF_QSPI_QDR_DSCK                    (0x1000)\r
72 #define MCF_QSPI_QDR_QSPI_CS3                (0x800)\r
73 #define MCF_QSPI_QDR_QSPI_CS2                (0x400)\r
74 #define MCF_QSPI_QDR_QSPI_CS1                (0x200)\r
75 #define MCF_QSPI_QDR_QSPI_CS0                (0x100)\r
76 \r
77 \r
78 #endif /* __MCF52235_QSPI_H__ */\r