217 {
218#if HAL_USE_SPI
219 static SPIDriver *bus;
220 msg_t ret = MSG_RESET;
221
223 return;
224
226 if (bus == nullptr) {
227
228 return;
229 }
230
231
232
235 }
238
239
240
241#if (EFI_ONBOARD_MEMS_LIS2DW12 == TRUE)
242 if (ret != MSG_OK) {
244
245
247
248
250 if (ret == MSG_OK) {
252 }
253 }
254#endif
255#if (EFI_ONBOARD_MEMS_LIS2DH12 == TRUE)
256 if (ret != MSG_OK) {
258
259
261
262
264 if (ret == MSG_OK) {
266 }
267 }
268#endif
269#if (EFI_ONBOARD_MEMS_LIS302DL == TRUE)
270 if (ret != MSG_OK) {
272
273
275
276
278 if (ret == MSG_OK) {
280 }
281 }
282#endif
283#if (EFI_ONBOARD_MEMS_LIS3DSH == TRUE)
284 if (ret != MSG_OK) {
286
287
289
290
292 if (ret == MSG_OK) {
294 }
295 }
296#endif
297
298 if (ret == MSG_OK) {
299
302 efiPrintf("accelerometer init OK");
303 } else {
304 efiPrintf("accelerometer init failed %d", (int)ret);
305 }
306#endif
307}
static LIS2DW12Driver LIS2DW12
static LIS3DSHConfig lis3dshcfg
OutputPin accelerometerChipSelect
static LIS2DW12Config lis2dw12cfg
static AccelController instance
static LIS3DSHDriver LIS3DSH
static LIS302DLDriver LIS302DL
static SPIConfig accelerometerSpiCfg
static LSM303AGRDriver LIS2DH12
static AccelType_t AccelType
static LIS302DLConfig lis302dlcfg
static LSM303AGRConfig lis2dh12cfg
void initPin(const char *msg, brain_pin_e brainPin, pin_output_mode_e outputMode, bool forceInitWithFatalError=false)
bool isInitialized() const
ioportid_t getHwPort(const char *msg, brain_pin_e brainPin)
ioportmask_t getHwPin(const char *msg, brain_pin_e brainPin)
static constexpr engine_configuration_s * engineConfiguration
SPIDriver * getSpiDevice(spi_device_e spiDevice)
bool isBrainPinValid(brain_pin_e brainPin)
spi_device_e accelerometerSpiDevice