FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/spi/spi_api.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 |
---|---|
1 /********************************************************************************* | 1 /********************************************************************************* |
2 * | 2 * |
3 * File Name: spi_api.c | 3 * File Name: spi_api.c |
4 * | 4 * |
5 * Bridge functions used to send events to the SPI task | 5 * Bridge functions used to send events to the SPI task |
6 * | 6 * |
7 * (C) Texas Instruments, all rights reserved | 7 * (C) Texas Instruments, all rights reserved |
8 * | 8 * |
9 * Version number: 0.1 Date: 25-September-2000 | 9 * Version number: 0.1 Date: 25-September-2000 |
10 * | 10 * |
11 * History: 0.1 - Created by Candice Bazanegue | 11 * History: 0.1 - Created by Candice Bazanegue |
12 * | 12 * |
13 * Author: | 13 * Author: |
14 * | 14 * |
15 *********************************************************************************/ | 15 *********************************************************************************/ |
16 | 16 |
17 #include "rvf/rvf_api.h" | 17 #include "rvf/rvf_api.h" |
18 #include "spi/spi_api.h" | 18 #include "spi/spi_api.h" |
32 T_SPI_READ *msgPtr; | 32 T_SPI_READ *msgPtr; |
33 | 33 |
34 /* check if the driver has been started */ | 34 /* check if the driver has been started */ |
35 if (SPI_GBL_INFO_PTR == NULL) | 35 if (SPI_GBL_INFO_PTR == NULL) |
36 { | 36 { |
37 rvf_send_trace("ABB read not possible. Reason: SPI task not started",51, NULL_PARAM, | 37 rvf_send_trace("ABB read not possible. Reason: SPI task not started",51, NULL_PARAM, |
38 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 38 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
39 return (RVM_NOT_READY); | 39 return (RVM_NOT_READY); |
40 } | 40 } |
41 | 41 |
42 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) | 42 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) |
43 { | 43 { |
44 rvf_send_trace("ABB read not possible. Reason: SPI Task not ready",49, NULL_PARAM, | 44 rvf_send_trace("ABB read not possible. Reason: SPI Task not ready",49, NULL_PARAM, |
45 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 45 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
46 return (RVM_NOT_READY); | 46 return (RVM_NOT_READY); |
47 } | 47 } |
48 | 48 |
49 rvf_send_trace("SPI_ABB_READ",12, NULL_PARAM, | 49 rvf_send_trace("SPI_ABB_READ",12, NULL_PARAM, |
50 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 50 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
51 | 51 |
52 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_READ),(void **) &msgPtr) == RVF_RED) | 52 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_READ),(void **) &msgPtr) == RVF_RED) |
53 { | 53 { |
54 rvf_send_trace ("SPI ERROR: ABB read not possible. Reason: Not enough memory", | 54 rvf_send_trace ("SPI ERROR: ABB read not possible. Reason: Not enough memory", |
85 T_SPI_WRITE *msgPtr; | 85 T_SPI_WRITE *msgPtr; |
86 | 86 |
87 /* check if the driver has been started */ | 87 /* check if the driver has been started */ |
88 if (SPI_GBL_INFO_PTR == NULL) | 88 if (SPI_GBL_INFO_PTR == NULL) |
89 { | 89 { |
90 rvf_send_trace("ABB write not possible. Reason: SPI task not started",52, NULL_PARAM, | 90 rvf_send_trace("ABB write not possible. Reason: SPI task not started",52, NULL_PARAM, |
91 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 91 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
92 return (RVM_NOT_READY); | 92 return (RVM_NOT_READY); |
93 } | 93 } |
94 | 94 |
95 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) | 95 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) |
96 { | 96 { |
97 rvf_send_trace("ABB write not possible. Reason: SPI Task not ready",50, NULL_PARAM, | 97 rvf_send_trace("ABB write not possible. Reason: SPI Task not ready",50, NULL_PARAM, |
98 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 98 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
99 return (RVM_NOT_READY); | 99 return (RVM_NOT_READY); |
100 } | 100 } |
101 | 101 |
102 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_WRITE),(void **) &msgPtr) == RVF_RED) | 102 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_WRITE),(void **) &msgPtr) == RVF_RED) |
135 T_SPI_ABB_CONF_ADC *msgPtr; | 135 T_SPI_ABB_CONF_ADC *msgPtr; |
136 | 136 |
137 /* check if the driver has been started */ | 137 /* check if the driver has been started */ |
138 if (SPI_GBL_INFO_PTR == NULL) | 138 if (SPI_GBL_INFO_PTR == NULL) |
139 { | 139 { |
140 rvf_send_trace("ABB conf ADC not possible. Reason: SPI task not started",55, NULL_PARAM, | 140 rvf_send_trace("ABB conf ADC not possible. Reason: SPI task not started",55, NULL_PARAM, |
141 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 141 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
142 return (RVM_NOT_READY); | 142 return (RVM_NOT_READY); |
143 } | 143 } |
144 | 144 |
145 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) | 145 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) |
146 { | 146 { |
147 rvf_send_trace("ABB conf ADC not possible. Reason: SPI Task not ready",53, NULL_PARAM, | 147 rvf_send_trace("ABB conf ADC not possible. Reason: SPI Task not ready",53, NULL_PARAM, |
148 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 148 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
149 return (RVM_NOT_READY); | 149 return (RVM_NOT_READY); |
150 } | 150 } |
151 | 151 |
152 rvf_send_trace("SPI_ABB_CONF_ADC",16, NULL_PARAM, | 152 rvf_send_trace("SPI_ABB_CONF_ADC",16, NULL_PARAM, |
153 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 153 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
154 | 154 |
155 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_ABB_CONF_ADC),(void **) &msgPtr) == RVF_RED) | 155 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_ABB_CONF_ADC),(void **) &msgPtr) == RVF_RED) |
156 { | 156 { |
157 rvf_send_trace ("SPI ERROR: ABB conf ADC not possible. Reason: Not enough memory", | 157 rvf_send_trace ("SPI ERROR: ABB conf ADC not possible. Reason: Not enough memory", |
186 T_SPI_ABB_READ_ADC *msgPtr; | 186 T_SPI_ABB_READ_ADC *msgPtr; |
187 | 187 |
188 /* check if the driver has been started */ | 188 /* check if the driver has been started */ |
189 if (SPI_GBL_INFO_PTR == NULL) | 189 if (SPI_GBL_INFO_PTR == NULL) |
190 { | 190 { |
191 rvf_send_trace("ABB read ADC not possible. Reason: SPI task not started",55, NULL_PARAM, | 191 rvf_send_trace("ABB read ADC not possible. Reason: SPI task not started",55, NULL_PARAM, |
192 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 192 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
193 return (RVM_NOT_READY); | 193 return (RVM_NOT_READY); |
194 } | 194 } |
195 | 195 |
196 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) | 196 if(SPI_GBL_INFO_PTR->SpiTaskReady == FALSE) |
197 { | 197 { |
198 rvf_send_trace("ABB conf ADC not possible. Reason: SPI Task not ready",53, NULL_PARAM, | 198 rvf_send_trace("ABB conf ADC not possible. Reason: SPI Task not ready",53, NULL_PARAM, |
199 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 199 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
200 return (RVM_NOT_READY); | 200 return (RVM_NOT_READY); |
201 } | 201 } |
202 | 202 |
203 rvf_send_trace("SPI_ABB_READ_ADC",16, NULL_PARAM, | 203 rvf_send_trace("SPI_ABB_READ_ADC",16, NULL_PARAM, |
204 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); | 204 RV_TRACE_LEVEL_WARNING, SPI_USE_ID); |
205 | 205 |
206 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_ABB_READ_ADC),(void **) &msgPtr) == RVF_RED) | 206 if (rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_SPI_ABB_READ_ADC),(void **) &msgPtr) == RVF_RED) |
207 { | 207 { |
208 rvf_send_trace ("SPI ERROR: ABB read ADC not possible. Reason: Not enough memory", | 208 rvf_send_trace ("SPI ERROR: ABB read ADC not possible. Reason: Not enough memory", |