Line No. | Rev | Author | Line |
---|---|---|---|
1 | 32 | kaklik | /********************************************************************* |
2 | * |
||
3 | * Data SPI RAM Access Routines |
||
4 | * -Tested with AMI Semiconductor N256S0830HDA |
||
5 | * |
||
6 | ********************************************************************* |
||
7 | * FileName: SPIRAM.h |
||
8 | * Dependencies: Compiler.h |
||
9 | * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32 |
||
10 | * Compiler: Microchip C32 v1.05 or higher |
||
11 | * Microchip C30 v3.12 or higher |
||
12 | * Microchip C18 v3.30 or higher |
||
13 | * HI-TECH PICC-18 PRO 9.63PL2 or higher |
||
14 | * Company: Microchip Technology, Inc. |
||
15 | * |
||
16 | * Software License Agreement |
||
17 | * |
||
18 | * Copyright (C) 2002-2009 Microchip Technology Inc. All rights |
||
19 | * reserved. |
||
20 | * |
||
21 | * Microchip licenses to you the right to use, modify, copy, and |
||
22 | * distribute: |
||
23 | * (i) the Software when embedded on a Microchip microcontroller or |
||
24 | * digital signal controller product ("Device") which is |
||
25 | * integrated into Licensee's product; or |
||
26 | * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h, |
||
27 | * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device |
||
28 | * used in conjunction with a Microchip ethernet controller for |
||
29 | * the sole purpose of interfacing with the ethernet controller. |
||
30 | * |
||
31 | * You should refer to the license agreement accompanying this |
||
32 | * Software for additional information regarding your rights and |
||
33 | * obligations. |
||
34 | * |
||
35 | * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT |
||
36 | * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT |
||
37 | * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A |
||
38 | * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
||
39 | * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR |
||
40 | * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF |
||
41 | * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS |
||
42 | * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE |
||
43 | * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER |
||
44 | * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT |
||
45 | * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. |
||
46 | * |
||
47 | * \file SPIRAM.h |
||
48 | * \author Howard Henry Schlunder |
||
49 | * \date 25 July 2007 |
||
50 | ********************************************************************/ |
||
51 | #ifndef __SPIRAM_H |
||
52 | #define __SPIRAM_H |
||
53 | |||
54 | #include "HardwareProfile.h" |
||
55 | |||
56 | #if defined(SPIRAM_CS_TRIS) |
||
57 | void SPIRAMInit(void); |
||
58 | void SPIRAMGetArray(WORD wAddress, BYTE *vData, WORD wLength); |
||
59 | void SPIRAMPutArray(WORD wAddress, BYTE *vData, WORD wLength); |
||
60 | |||
61 | #define SPIRAMPutString(a,b) SPIRAMPutArray(a, strlen((char*)b)) |
||
62 | |||
63 | #if defined(__18CXX) |
||
64 | void SPIRAMPutROMArray(WORD wAddress, ROM BYTE *vData, WORD wLength); |
||
65 | #define SPIRAMPutROMString(a,b) SPIRAMPutROMArray(a, strlenpgm((ROM char*)b)) |
||
66 | #else |
||
67 | #define SPIRAMPutROMString(a,b) SPIRAMPutArray(a, strlen((char*)b)) |
||
68 | #define SPIRAMPutROMArray(a,b,c) SPIRAMPutROMArray(a, b, c) |
||
69 | #endif |
||
70 | #else |
||
71 | // If you get any of these linker errors, it means that you either have an |
||
72 | // error in your HardwareProfile.h or TCPIPConfig.h definitions. The code |
||
73 | // is attempting to call a function that can't possibly work because you |
||
74 | // have not specified what pins and SPI module the physical SPI SRAM chip |
||
75 | // is connected to. Alternatively, if you don't have an SPI SRAM chip, it |
||
76 | // means you have enabled a stack feature that requires SPI SRAM hardware. |
||
77 | // In this case, you need to edit TCPIPConfig.h and disable this stack |
||
78 | // feature. The linker error tells you which object file this error was |
||
79 | // generated from. It should be a clue as to what feature you need to |
||
80 | // disable. |
||
81 | void You_cannot_call_the_SPIRAMInit_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
82 | void You_cannot_call_the_SPIRAMGetArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
83 | void You_cannot_call_the_SPIRAMPutArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
84 | void You_cannot_call_the_SPIRAMPutString_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
85 | void You_cannot_call_the_SPIRAMPutROMArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
86 | void You_cannot_call_the_SPIRAMPutROMString_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first(void); |
||
87 | #define SPIRAMInit() You_cannot_call_the_SPIRAMInit_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
88 | #define SPIRAMGetArray(a,b,c) You_cannot_call_the_SPIRAMGetArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
89 | #define SPIRAMPutArray(a,b,c) You_cannot_call_the_SPIRAMPutArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
90 | #define SPIRAMPutString(a,b) You_cannot_call_the_SPIRAMPutString_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
91 | #define SPIRAMPutROMArray(a,b,c) You_cannot_call_the_SPIRAMPutROMArray_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
92 | #define SPIRAMPutROMString(a,b) You_cannot_call_the_SPIRAMPutROMString_function_without_defining_SPIRAM_CS_TRIS_in_HardwareProfile_h_first() |
||
93 | #endif |
||
94 | |||
95 | |||
96 | #endif |
Powered by WebSVN v2.8.3