versadac  1
versadac - Scalable Recorder Firmware
sysEurothermSpiDrv.h
1 /* sysEurothermLPC3250SpiDrv.h - LPC3250 SPI Driver */
2 
3 /*
4  * Copyright (c) 2009 Eurortherm.
5  */
6 
7 /*
8 modification history
9 --------------------
10 01a,May09,jr initial version
11 */
12 
13 /*
14 DESCRIPTION
15 
16 LPC3250 SPI Driver Header File.
17 
18 */
19 
20 
21 #ifndef __SYS_EUROTHERM_SPI_DRV_H
22 #define __SYS_EUROTHERM_SPI_DRV_H
23 enum
24 {
25  NANO_SPI_NO_DEVICE,
26  NANO_SPI_AI4_BRD_1_CRYSTAL_A2D_1,
27  NANO_SPI_AI4_BRD_1_CRYSTAL_A2D_2,
28  NANO_SPI_AI4_BRD_1_CRYSTAL_A2D_3,
29  NANO_SPI_AI4_BRD_1_CRYSTAL_A2D_4,
30  NANO_SPI_AI4_BRD_1_EEPROM
31 
32 };
33 
34 enum SpiSciEnum
35 {
36  SPI_MODE,
37  SCI_MODE
38 };
39 
40 enum SpiDeselectModeEnum
41 {
42  SPI_DESELECT,
43  SPI_NO_DESELECT
44 };
45 
46 
47 
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif /* __cplusplus */
53 
54 void sysEurothermSpiSend(unsigned short device, unsigned char *txData, unsigned char *rxData, int length, int spiSciMode, unsigned char deselect);
55 void sysEurothermSpiCheckForSendCompletionAction();
56 void sysEurothermSpiTransferCompleteHookAdd( void (*hook)(void));
57 
58 
59 #ifdef __cplusplus
60 }
61 #endif /* __cplusplus */
62 
63 
64 #endif /* __SYS_EUROTHERM_SPI_DRV_H */
65