]> git.sur5r.net Git - freertos/blob - Demo/MCF5235_GCC/include/arch/mcf523x/mcf523x_qspi.h
Add PIC24, dsPIC and Coldfire files.
[freertos] / Demo / MCF5235_GCC / include / arch / mcf523x / mcf523x_qspi.h
1 /*
2  * These files are taken from the MCF523X source code example package
3  * which is available on the Freescale website. Freescale explicitly 
4  * grants the redistribution and modification of these source files.
5  * The complete licensing information is available in the file 
6  * LICENSE_FREESCALE.TXT.
7  *
8  * File:        mcf523x_qspi.h
9  * Purpose:     Register and bit definitions for the MCF523X
10  *
11  * Notes:       
12  *      
13  */
14
15 #ifndef __MCF523X_QSPI_H__
16 #define __MCF523X_QSPI_H__
17
18 /*********************************************************************
19 *
20 * Queued Serial Peripheral Interface (QSPI)
21 *
22 *********************************************************************/
23
24 /* Register read/write macros */
25 #define MCF_QSPI_QMR      (*(vuint16*)(void*)(&__IPSBAR[0x000340]))
26 #define MCF_QSPI_QDLYR    (*(vuint16*)(void*)(&__IPSBAR[0x000344]))
27 #define MCF_QSPI_QWR      (*(vuint16*)(void*)(&__IPSBAR[0x000348]))
28 #define MCF_QSPI_QIR      (*(vuint16*)(void*)(&__IPSBAR[0x00034C]))
29 #define MCF_QSPI_QAR      (*(vuint16*)(void*)(&__IPSBAR[0x000350]))
30 #define MCF_QSPI_QDR      (*(vuint16*)(void*)(&__IPSBAR[0x000354]))
31
32 /* Bit definitions and macros for MCF_QSPI_QMR */
33 #define MCF_QSPI_QMR_BAUD(x)     (((x)&0x00FF)<<0)
34 #define MCF_QSPI_QMR_CPHA        (0x0100)
35 #define MCF_QSPI_QMR_CPOL        (0x0200)
36 #define MCF_QSPI_QMR_BITS(x)     (((x)&0x000F)<<10)
37 #define MCF_QSPI_QMR_DOHIE       (0x4000)
38 #define MCF_QSPI_QMR_MSTR        (0x8000)
39
40 /* Bit definitions and macros for MCF_QSPI_QDLYR */
41 #define MCF_QSPI_QDLYR_DTL(x)    (((x)&0x00FF)<<0)
42 #define MCF_QSPI_QDLYR_QCD(x)    (((x)&0x007F)<<8)
43 #define MCF_QSPI_QDLYR_SPE       (0x8000)
44
45 /* Bit definitions and macros for MCF_QSPI_QWR */
46 #define MCF_QSPI_QWR_NEWQP(x)    (((x)&0x000F)<<0)
47 #define MCF_QSPI_QWR_ENDQP(x)    (((x)&0x000F)<<8)
48 #define MCF_QSPI_QWR_CSIV        (0x1000)
49 #define MCF_QSPI_QWR_WRTO        (0x2000)
50 #define MCF_QSPI_QWR_WREN        (0x4000)
51 #define MCF_QSPI_QWR_HALT        (0x8000)
52
53 /* Bit definitions and macros for MCF_QSPI_QIR */
54 #define MCF_QSPI_QIR_SPIF        (0x0001)
55 #define MCF_QSPI_QIR_ABRT        (0x0004)
56 #define MCF_QSPI_QIR_WCEF        (0x0008)
57 #define MCF_QSPI_QIR_SPIFE       (0x0100)
58 #define MCF_QSPI_QIR_ABRTE       (0x0400)
59 #define MCF_QSPI_QIR_WCEFE       (0x0800)
60 #define MCF_QSPI_QIR_ABRTL       (0x1000)
61 #define MCF_QSPI_QIR_ABRTB       (0x4000)
62 #define MCF_QSPI_QIR_WCEFB       (0x8000)
63
64 /* Bit definitions and macros for MCF_QSPI_QAR */
65 #define MCF_QSPI_QAR_ADDR(x)     (((x)&0x003F)<<0)
66
67 /********************************************************************/
68
69 #endif /* __MCF523X_QSPI_H__ */