FreeCalypso > hg > tcs211-fcmodem
comparison chipsetsw/drivers/drv_app/spi/spi_env.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /*****************************************************************************/ | |
2 /* */ | |
3 /* File Name: spi_env.h */ | |
4 /* */ | |
5 /* Purpose: This file contains prototypes for RV manager related */ | |
6 /* functions used to get info, start and stop the spi block */ | |
7 /* */ | |
8 /* Version 0.1 */ | |
9 /* */ | |
10 /* Date Modification */ | |
11 /* ------------------------------------ */ | |
12 /* 20/08/2000 Create */ | |
13 /* */ | |
14 /* Author David Lamy-Charrier (dlamy@tif.ti.com) */ | |
15 /* */ | |
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved */ | |
17 /*****************************************************************************/ | |
18 | |
19 #ifndef __SPI_ENV_H_ | |
20 #define __SPI_ENV_H_ | |
21 | |
22 #include "rvm/rvm_gen.h" | |
23 #include "abb/abb_inth.h" // for MADC_NUMBER_OF_MEAS | |
24 | |
25 #include "spi/spi_pool_size.h" /* Stack & Memory Bank sizes definitions */ | |
26 | |
27 /* SPI mailbox */ | |
28 #define SPI_MAILBOX RVF_TASK_MBOX_0 | |
29 | |
30 | |
31 /* memory bank size and watermark */ | |
32 #define SPI_MB_PRIM_SIZE SPI_MB1_SIZE | |
33 #define SPI_MB_PRIM_WATERMARK (SPI_MB_PRIM_SIZE - 56) | |
34 #define SPI_MB_PRIM_INC_SIZE 0 | |
35 #define SPI_MB_PRIM_INC_WATERMARK 0 | |
36 | |
37 | |
38 | |
39 typedef struct SPI_GBL_INFO | |
40 { | |
41 T_RVF_MB_ID prim_id; | |
42 T_RVF_ADDR_ID addr_id; | |
43 UINT16 adc_result[MADC_NUMBER_OF_MEAS]; | |
44 BOOLEAN is_gsm_on; | |
45 BOOLEAN is_adc_on; | |
46 BOOLEAN SpiTaskReady; | |
47 } T_SPI_GBL_INFO; | |
48 | |
49 | |
50 /* Global variables */ | |
51 extern T_SPI_GBL_INFO *SPI_GBL_INFO_PTR; | |
52 | |
53 | |
54 /* generic functions declarations */ | |
55 T_RVM_RETURN spi_get_info (T_RVM_INFO_SWE *infoSWE); | |
56 | |
57 T_RVM_RETURN spi_set_info(T_RVF_ADDR_ID addr_id, | |
58 T_RV_RETURN ReturnPath[], | |
59 T_RVF_MB_ID mbId[], | |
60 T_RVM_RETURN (*callBackFct)(T_RVM_NAME SWEntName, | |
61 T_RVM_RETURN errorCause, | |
62 T_RVM_ERROR_TYPE errorType, | |
63 T_RVM_STRING errorMsg)); | |
64 | |
65 T_RVM_RETURN spi_init (void); | |
66 | |
67 T_RVM_RETURN spi_stop (void); | |
68 | |
69 T_RVM_RETURN spi_kill (void); | |
70 | |
71 #endif /*__SPI_ENV_H_*/ | |
72 |