Revision 21076167 source/alld_hmc5883l.c
source/alld_hmc5883l.c | ||
---|---|---|
63 | 63 |
* |
64 | 64 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
65 | 65 |
*/ |
66 |
inline apalExitStatus_t |
|
67 |
hmc5883l_lld_check(const HMC5883LDriver* const hmcd, uint8_t* const rxbuffer, const uint8_t num, const apalTime_t timeout) |
|
66 |
apalExitStatus_t hmc5883l_lld_check(const HMC5883LDriver* const hmcd, uint8_t* const rxbuffer, const uint8_t num, const apalTime_t timeout) |
|
68 | 67 |
{ |
69 | 68 |
apalDbgAssert(hmcd != NULL && hmcd->i2cd != NULL); |
70 | 69 |
apalDbgAssert(rxbuffer != NULL); |
... | ... | |
83 | 82 |
* |
84 | 83 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
85 | 84 |
*/ |
86 |
inline apalExitStatus_t |
|
87 |
hmc5883l_lld_write_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, const uint8_t* const data, const uint8_t num, const apalTime_t timeout) |
|
85 |
apalExitStatus_t hmc5883l_lld_write_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, const uint8_t* const data, const uint8_t num, const apalTime_t timeout) |
|
88 | 86 |
{ |
89 | 87 |
apalDbgAssert(hmcd != NULL && hmcd->i2cd != NULL); |
90 | 88 |
apalDbgAssert(data != NULL); |
... | ... | |
104 | 102 |
* |
105 | 103 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
106 | 104 |
*/ |
107 |
inline apalExitStatus_t |
|
108 |
hmc5883l_lld_set_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, const uint8_t data, const apalTime_t timeout) |
|
105 |
apalExitStatus_t hmc5883l_lld_set_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, const uint8_t data, const apalTime_t timeout) |
|
109 | 106 |
{ |
110 | 107 |
apalDbgAssert(hmcd != NULL && hmcd->i2cd != NULL); |
111 | 108 |
|
... | ... | |
125 | 122 |
* |
126 | 123 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
127 | 124 |
*/ |
128 |
inline apalExitStatus_t |
|
129 |
hmc5883l_lld_read_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, uint8_t* const data, const uint8_t num, const apalTime_t timeout) |
|
125 |
apalExitStatus_t hmc5883l_lld_read_register(const HMC5883LDriver* const hmcd, const hmc5883l_lld_register_t regaddr, uint8_t* const data, const uint8_t num, const apalTime_t timeout) |
|
130 | 126 |
{ |
131 | 127 |
apalDbgAssert(hmcd != NULL && hmcd->i2cd != NULL); |
132 | 128 |
apalDbgAssert(data != NULL); |
... | ... | |
142 | 138 |
* |
143 | 139 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
144 | 140 |
*/ |
145 |
inline apalExitStatus_t |
|
146 |
hmc5883l_lld_read_data(const HMC5883LDriver* const hmcd, uint16_t* const data, const apalTime_t timeout) |
|
141 |
apalExitStatus_t hmc5883l_lld_read_data(const HMC5883LDriver* const hmcd, uint16_t* const data, const apalTime_t timeout) |
|
147 | 142 |
{ |
148 | 143 |
apalDbgAssert(data != NULL); |
149 | 144 |
|
... | ... | |
168 | 163 |
* |
169 | 164 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
170 | 165 |
*/ |
171 |
inline apalExitStatus_t |
|
172 |
hmc5883l_lld_read_status(const HMC5883LDriver* const hmcd, uint8_t* const status, const apalTime_t timeout) |
|
166 |
apalExitStatus_t hmc5883l_lld_read_status(const HMC5883LDriver* const hmcd, uint8_t* const status, const apalTime_t timeout) |
|
173 | 167 |
{ |
174 | 168 |
apalDbgAssert(status != NULL); |
175 | 169 |
|
... | ... | |
184 | 178 |
* |
185 | 179 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
186 | 180 |
*/ |
187 |
inline apalExitStatus_t |
|
188 |
hmc5883l_lld_read_config(const HMC5883LDriver* const hmcd, hmc5883l_lld_config_t* const cfg, const apalTime_t timeout) |
|
181 |
apalExitStatus_t hmc5883l_lld_read_config(const HMC5883LDriver* const hmcd, hmc5883l_lld_config_t* const cfg, const apalTime_t timeout) |
|
189 | 182 |
{ |
190 | 183 |
apalDbgAssert(cfg != NULL); |
191 | 184 |
|
... | ... | |
208 | 201 |
* |
209 | 202 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
210 | 203 |
*/ |
211 |
inline apalExitStatus_t |
|
212 |
hmc5883l_lld_write_config(const HMC5883LDriver* const hmcd, const hmc5883l_lld_config_t cfg, const apalTime_t timeout) |
|
204 |
apalExitStatus_t hmc5883l_lld_write_config(const HMC5883LDriver* const hmcd, const hmc5883l_lld_config_t cfg, const apalTime_t timeout) |
|
213 | 205 |
{ |
214 | 206 |
uint8_t conf[3]; |
215 | 207 |
conf[0] = cfg.avg | cfg.outrate | cfg.mbias; |
... | ... | |
226 | 218 |
* |
227 | 219 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
228 | 220 |
*/ |
229 |
inline apalExitStatus_t |
|
230 |
hmc5883l_lld_read_lock(const HMC5883LDriver* const hmcd, uint8_t* const lock, const apalTime_t timeout) |
|
221 |
apalExitStatus_t hmc5883l_lld_read_lock(const HMC5883LDriver* const hmcd, uint8_t* const lock, const apalTime_t timeout) |
|
231 | 222 |
{ |
232 | 223 |
apalDbgAssert(lock != NULL); |
233 | 224 |
|
... | ... | |
244 | 235 |
* |
245 | 236 |
* @return The return status indicates whether the function call was successfull or a timeout occured. |
246 | 237 |
*/ |
247 |
inline apalExitStatus_t |
|
248 |
hmc5883l_lld_read_rdy(const HMC5883LDriver* const hmcd, uint8_t* const rdy, const apalTime_t timeout) |
|
238 |
apalExitStatus_t hmc5883l_lld_read_rdy(const HMC5883LDriver* const hmcd, uint8_t* const rdy, const apalTime_t timeout) |
|
249 | 239 |
{ |
250 | 240 |
apalDbgAssert(rdy != NULL); |
251 | 241 |
|
Also available in: Unified diff