]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52259_CodeWarrior/Freescale_Headers/MCF52259_QSPI.h
Change to the file headers only.
[freertos] / Demo / ColdFire_MCF52259_CodeWarrior / Freescale_Headers / MCF52259_QSPI.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2008/04/17 Revision: 0.2\r
6  *\r
7  * (c) Copyright UNIS, spol. s r.o. 1997-2008\r
8  * UNIS, spol. s r.o.\r
9  * Jundrovska 33\r
10  * 624 00 Brno\r
11  * Czech Republic\r
12  * http      : www.processorexpert.com\r
13  * mail      : info@processorexpert.com\r
14  */\r
15 \r
16 #ifndef __MCF52259_QSPI_H__\r
17 #define __MCF52259_QSPI_H__\r
18 \r
19 \r
20 /*********************************************************************\r
21 *\r
22 * Queued Serial Peripheral Interface (QSPI)\r
23 *\r
24 *********************************************************************/\r
25 \r
26 /* Register read/write macros */\r
27 #define MCF_QSPI_QMR                         (*(vuint16*)(0x40000340))\r
28 #define MCF_QSPI_QDLYR                       (*(vuint16*)(0x40000344))\r
29 #define MCF_QSPI_QWR                         (*(vuint16*)(0x40000348))\r
30 #define MCF_QSPI_QIR                         (*(vuint16*)(0x4000034C))\r
31 #define MCF_QSPI_QAR                         (*(vuint16*)(0x40000350))\r
32 #define MCF_QSPI_QDR                         (*(vuint16*)(0x40000354))\r
33 \r
34 \r
35 /* Bit definitions and macros for MCF_QSPI_QMR */\r
36 #define MCF_QSPI_QMR_BAUD(x)                 (((x)&0xFF)<<0)\r
37 #define MCF_QSPI_QMR_CPHA                    (0x100)\r
38 #define MCF_QSPI_QMR_CPOL                    (0x200)\r
39 #define MCF_QSPI_QMR_BITS(x)                 (((x)&0xF)<<0xA)\r
40 #define MCF_QSPI_QMR_DOHIE                   (0x4000)\r
41 #define MCF_QSPI_QMR_MSTR                    (0x8000)\r
42 \r
43 /* Bit definitions and macros for MCF_QSPI_QDLYR */\r
44 #define MCF_QSPI_QDLYR_DTL(x)                (((x)&0xFF)<<0)\r
45 #define MCF_QSPI_QDLYR_QCD(x)                (((x)&0x7F)<<0x8)\r
46 #define MCF_QSPI_QDLYR_SPE                   (0x8000)\r
47 \r
48 /* Bit definitions and macros for MCF_QSPI_QWR */\r
49 #define MCF_QSPI_QWR_NEWQP(x)                (((x)&0xF)<<0)\r
50 #define MCF_QSPI_QWR_CPTQP(x)                (((x)&0xF)<<0x4)\r
51 #define MCF_QSPI_QWR_ENDQP(x)                (((x)&0xF)<<0x8)\r
52 #define MCF_QSPI_QWR_CSIV                    (0x1000)\r
53 #define MCF_QSPI_QWR_WRTO                    (0x2000)\r
54 #define MCF_QSPI_QWR_WREN                    (0x4000)\r
55 #define MCF_QSPI_QWR_HALT                    (0x8000)\r
56 \r
57 /* Bit definitions and macros for MCF_QSPI_QIR */\r
58 #define MCF_QSPI_QIR_SPIF                    (0x1)\r
59 #define MCF_QSPI_QIR_ABRT                    (0x4)\r
60 #define MCF_QSPI_QIR_WCEF                    (0x8)\r
61 #define MCF_QSPI_QIR_SPIFE                   (0x100)\r
62 #define MCF_QSPI_QIR_ABRTE                   (0x400)\r
63 #define MCF_QSPI_QIR_WCEFE                   (0x800)\r
64 #define MCF_QSPI_QIR_ABRTL                   (0x1000)\r
65 #define MCF_QSPI_QIR_ABRTB                   (0x4000)\r
66 #define MCF_QSPI_QIR_WCEFB                   (0x8000)\r
67 \r
68 /* Bit definitions and macros for MCF_QSPI_QAR */\r
69 #define MCF_QSPI_QAR_ADDR(x)                 (((x)&0x3F)<<0)\r
70 #define MCF_QSPI_QAR_TRANS                   (0)\r
71 #define MCF_QSPI_QAR_RECV                    (0x10)\r
72 #define MCF_QSPI_QAR_CMD                     (0x20)\r
73 \r
74 /* Bit definitions and macros for MCF_QSPI_QDR */\r
75 #define MCF_QSPI_QDR_DATA(x)                 (((x)&0xFFFF)<<0)\r
76 #define MCF_QSPI_QDR_CONT                    (0x8000)\r
77 #define MCF_QSPI_QDR_BITSE                   (0x4000)\r
78 #define MCF_QSPI_QDR_DT                      (0x2000)\r
79 #define MCF_QSPI_QDR_DSCK                    (0x1000)\r
80 #define MCF_QSPI_QDR_QSPI_CS3                (0x800)\r
81 #define MCF_QSPI_QDR_QSPI_CS2                (0x400)\r
82 #define MCF_QSPI_QDR_QSPI_CS1                (0x200)\r
83 #define MCF_QSPI_QDR_QSPI_CS0                (0x100)\r
84 \r
85 \r
86 #endif /* __MCF52259_QSPI_H__ */\r