222 {
223#if HAL_USE_SPI
224 static SPIDriver *bus;
225 msg_t ret = MSG_RESET;
226
228 return;
229
231 if (bus == nullptr) {
232
233 return;
234 }
235
236
237
240 }
243
244
245
246#if (EFI_ONBOARD_MEMS_LIS2DW12 == TRUE)
247 if (ret != MSG_OK) {
249
250
252
253
255 if (ret == MSG_OK) {
257 }
258 }
259#endif
260#if (EFI_ONBOARD_MEMS_LIS2DH12 == TRUE)
261 if (ret != MSG_OK) {
263
264
266
267
269 if (ret == MSG_OK) {
271 }
272 }
273#endif
274#if (EFI_ONBOARD_MEMS_LIS302DL == TRUE)
275 if (ret != MSG_OK) {
277
278
280
281
283 if (ret == MSG_OK) {
285 }
286 }
287#endif
288#if (EFI_ONBOARD_MEMS_LIS3DSH == TRUE)
289 if (ret != MSG_OK) {
291
292
294
295
297 if (ret == MSG_OK) {
299 }
300 }
301#endif
302
303 if (ret == MSG_OK) {
304
307 efiPrintf("accelerometer init OK");
308 } else {
309 efiPrintf("accelerometer init failed %d", (int)ret);
310 }
311#endif
312}
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