FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/spi/spi_env.c @ 259:365833d1d186
drv_app/spi/*: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 May 2021 01:30:13 +0000 |
parents | 4e78acac3d88 |
children | 34b7059b9337 |
comparison
equal
deleted
inserted
replaced
258:45cc81cc6230 | 259:365833d1d186 |
---|---|
37 | 37 |
38 | 38 |
39 /****************************************************************************** | 39 /****************************************************************************** |
40 * Function : spi_get_info | 40 * Function : spi_get_info |
41 * | 41 * |
42 * Description : This function is called by the RV manager to learn | 42 * Description : This function is called by the RV manager to learn |
43 * spi requirements in terms of memory, SWEs... | 43 * spi requirements in terms of memory, SWEs... |
44 * | 44 * |
45 * Parameters : T_RVM_INFO_SWE * swe_info: pointer to the structure to fill | 45 * Parameters : T_RVM_INFO_SWE * swe_info: pointer to the structure to fill |
46 * containing infos related to the SPI SWE. | 46 * containing infos related to the SPI SWE. |
47 * | 47 * |
48 * Return : T_RVM_RETURN | 48 * Return : T_RVM_RETURN |
49 * | 49 * |
50 * History : 0.1 (20-August-2000) | 50 * History : 0.1 (20-August-2000) |
51 * | 51 * |
52 * | 52 * |
53 ******************************************************************************/ | 53 ******************************************************************************/ |
54 T_RVM_RETURN spi_get_info(T_RVM_INFO_SWE * infoSWE) | 54 T_RVM_RETURN spi_get_info(T_RVM_INFO_SWE * infoSWE) |
92 | 92 |
93 | 93 |
94 /****************************************************************************** | 94 /****************************************************************************** |
95 * Function : spi_set_info | 95 * Function : spi_set_info |
96 * | 96 * |
97 * Description : This function is called by the RV manager to inform | 97 * Description : This function is called by the RV manager to inform |
98 * the spi SWE about task_id, mb_id and error function. | 98 * the spi SWE about task_id, mb_id and error function. |
99 * | 99 * |
100 * Parameters : - T_RVM_TASK_ID taskId: task_id. | 100 * Parameters : - T_RVM_TASK_ID taskId: task_id. |
101 * - T_RV_RETURN ReturnPath[], array of return path for linked SWE | 101 * - T_RV_RETURN ReturnPath[], array of return path for linked SWE |
102 * - T_RVF_MB_ID mbId[]: array of memory bank ids. | 102 * - T_RVF_MB_ID mbId[]: array of memory bank ids. |
103 * - callback function to call in case of unrecoverable error. | 103 * - callback function to call in case of unrecoverable error. |
104 * | 104 * |
105 * Return : T_RVM_RETURN | 105 * Return : T_RVM_RETURN |
106 * | 106 * |
107 * History : 0.1 (20-August-2000) | 107 * History : 0.1 (20-August-2000) |
108 * | 108 * |
109 * | 109 * |
110 ******************************************************************************/ | 110 ******************************************************************************/ |
111 T_RVM_RETURN spi_set_info( T_RVF_ADDR_ID addr_id, | 111 T_RVM_RETURN spi_set_info( T_RVF_ADDR_ID addr_id, |
117 T_RVM_STRING errorMsg)) | 117 T_RVM_STRING errorMsg)) |
118 { | 118 { |
119 T_RVF_MB_STATUS mb_status; | 119 T_RVF_MB_STATUS mb_status; |
120 UINT16 i; | 120 UINT16 i; |
121 | 121 |
122 rvf_send_trace("SPI : spi_set_info: try to init GLOBAL INFO SPI structure ... ",62, | 122 rvf_send_trace("SPI : spi_set_info: try to init GLOBAL INFO SPI structure ... ",62, |
123 NULL_PARAM, | 123 NULL_PARAM, |
124 RV_TRACE_LEVEL_DEBUG_LOW, | 124 RV_TRACE_LEVEL_DEBUG_LOW, |
125 SPI_USE_ID); | 125 SPI_USE_ID); |
126 | 126 |
127 mb_status = rvf_get_buf(mbId[0],sizeof(T_SPI_GBL_INFO),(void **) &SPI_GBL_INFO_PTR); | 127 mb_status = rvf_get_buf(mbId[0],sizeof(T_SPI_GBL_INFO),(void **) &SPI_GBL_INFO_PTR); |
128 | 128 |
129 if (mb_status == RVF_RED) | 129 if (mb_status == RVF_RED) |
130 { | 130 { |
131 rvf_send_trace("SPI : spi_set_info: Not enough memory to initiate GLOBAL INFO SPI structure ... ",80, | 131 rvf_send_trace("SPI : spi_set_info: Not enough memory to initiate GLOBAL INFO SPI structure ... ",80, |
132 NULL_PARAM, | 132 NULL_PARAM, |
133 RV_TRACE_LEVEL_ERROR, | 133 RV_TRACE_LEVEL_ERROR, |
134 SPI_USE_ID); | 134 SPI_USE_ID); |
152 | 152 |
153 SPI_GBL_INFO_PTR->is_gsm_on = FALSE; | 153 SPI_GBL_INFO_PTR->is_gsm_on = FALSE; |
154 | 154 |
155 SPI_GBL_INFO_PTR->SpiTaskReady = FALSE; | 155 SPI_GBL_INFO_PTR->SpiTaskReady = FALSE; |
156 | 156 |
157 /* spi task_id and spi mb_id could be retrieved later | 157 /* spi task_id and spi mb_id could be retrieved later |
158 using rvf_get_taskid and rvf_get_mb_id functions */ | 158 using rvf_get_taskid and rvf_get_mb_id functions */ |
159 | 159 |
160 return RV_OK; | 160 return RV_OK; |
161 } | 161 } |
162 | 162 |
163 | 163 |
164 /****************************************************************************** | 164 /****************************************************************************** |
165 * Function : spi_init | 165 * Function : spi_init |
166 * | 166 * |
167 * Description : This function is called by the RV manager to initialize the | 167 * Description : This function is called by the RV manager to initialize the |
168 * spi SWE before creating the task and calling spi_start. | 168 * spi SWE before creating the task and calling spi_start. |
169 * | 169 * |
170 * Parameters : None | 170 * Parameters : None |
171 * | 171 * |
172 * Return : T_RVM_RETURN | 172 * Return : T_RVM_RETURN |
173 * | 173 * |
174 * History : 0.1 (20-August-2000) | 174 * History : 0.1 (20-August-2000) |
175 * | 175 * |
176 * | 176 * |
177 ******************************************************************************/ | 177 ******************************************************************************/ |
178 T_RVM_RETURN spi_init(void) | 178 T_RVM_RETURN spi_init(void) |
189 * Description : This function is called by the RV manager to stop the spi SWE. | 189 * Description : This function is called by the RV manager to stop the spi SWE. |
190 * | 190 * |
191 * Parameters : None | 191 * Parameters : None |
192 * | 192 * |
193 * Return : T_RVM_RETURN | 193 * Return : T_RVM_RETURN |
194 * | 194 * |
195 * History : 0.1 (20-August-2000) | 195 * History : 0.1 (20-August-2000) |
196 * | 196 * |
197 * | 197 * |
198 ******************************************************************************/ | 198 ******************************************************************************/ |
199 T_RVM_RETURN spi_stop(void) | 199 T_RVM_RETURN spi_stop(void) |
205 | 205 |
206 | 206 |
207 /****************************************************************************** | 207 /****************************************************************************** |
208 * Function : spi_kill | 208 * Function : spi_kill |
209 * | 209 * |
210 * Description : This function is called by the RV manager to kill the spi | 210 * Description : This function is called by the RV manager to kill the spi |
211 * SWE, after the spi_stop function has been called. | 211 * SWE, after the spi_stop function has been called. |
212 * | 212 * |
213 * Parameters : None | 213 * Parameters : None |
214 * | 214 * |
215 * Return : T_RVM_RETURN | 215 * Return : T_RVM_RETURN |
216 * | 216 * |
217 * History : 0.1 (20-August-2000) | 217 * History : 0.1 (20-August-2000) |
218 * | 218 * |
219 * | 219 * |
220 ******************************************************************************/ | 220 ******************************************************************************/ |
221 T_RVM_RETURN spi_kill (void) | 221 T_RVM_RETURN spi_kill (void) |