STSW-STLKT01: Drivers/BSP/SensorTile/SensorTile_magneto.c Source File

STSW-STLKT01

STSW-STLKT01
SensorTile_magneto.c
Go to the documentation of this file.
1 
39 /* Includes ------------------------------------------------------------------*/
40 #include "SensorTile_magneto.h"
41 
42 
43 
61 static DrvContextTypeDef MAGNETO_SensorHandle[ MAGNETO_SENSORS_MAX_NUM ];
62 static MAGNETO_Data_t MAGNETO_Data[ MAGNETO_SENSORS_MAX_NUM ]; // Magnetometer - all.
63 static LSM303AGR_M_Data_t LSM303AGR_M_0_Data; // Magnetometer - sensor 0.
64 
73 static DrvStatusTypeDef BSP_LSM303AGR_MAGNETO_Init( void **handle );
74 
83 /* Sensor IO functions */
84 extern DrvStatusTypeDef Sensor_IO_Init( void );
85 
101 DrvStatusTypeDef BSP_MAGNETO_Init( MAGNETO_ID_t id, void **handle )
102 {
103 
104  *handle = NULL;
105 
106  switch(id)
107  {
108  case MAGNETO_SENSORS_AUTO:
109  default:
110  {
111  if( BSP_LSM303AGR_MAGNETO_Init(handle) == COMPONENT_ERROR )
112  {
113  return COMPONENT_ERROR;
114  }
115  break;
116  }
117  case LSM303AGR_M_0:
118  {
119  if( BSP_LSM303AGR_MAGNETO_Init(handle) == COMPONENT_ERROR )
120  {
121  return COMPONENT_ERROR;
122  }
123  break;
124  }
125  }
126 
127  return COMPONENT_OK;
128 }
129 
130 
131 static DrvStatusTypeDef BSP_LSM303AGR_MAGNETO_Init( void **handle )
132 {
133  MAGNETO_Drv_t *driver = NULL;
134  uint8_t data = 0x01;
135 
136  if(MAGNETO_SensorHandle[ LSM303AGR_M_0 ].isInitialized == 1)
137  {
138  /* We have reached the max num of instance for this component */
139  return COMPONENT_ERROR;
140  }
141 
142  if ( Sensor_IO_SPI_Init() == COMPONENT_ERROR )
143  {
144  return COMPONENT_ERROR;
145  }
146 
147  /* Setup sensor handle. */
148  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].who_am_i = LSM303AGR_MAG_WHO_AM_I;
149  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].ifType = 1; // SPI interface
150  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].address = LSM303AGR_MAG_I2C_ADDRESS;
151  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].spiDevice = LSM303AGR_M;
152  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].instance = LSM303AGR_M_0;
153  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].isInitialized = 0;
154  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].isEnabled = 0;
155  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].isCombo = 0;
156  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].pData = ( void * )&MAGNETO_Data[ LSM303AGR_M_0 ];
157  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].pVTable = ( void * )&LSM303AGR_M_Drv;
158  MAGNETO_SensorHandle[ LSM303AGR_M_0 ].pExtVTable = 0;
159 
160  LSM303AGR_M_0_Data.comboData = &LSM303AGR_Combo_Data[0];
161  MAGNETO_Data[ LSM303AGR_M_0 ].pComponentData = ( void * )&LSM303AGR_M_0_Data;
162  MAGNETO_Data[ LSM303AGR_M_0 ].pExtData = 0;
163 
164  *handle = (void *)&MAGNETO_SensorHandle[ LSM303AGR_M_0 ];
165 
166  Sensor_IO_SPI_CS_Init(*handle);
167 
168  if(LSM303AGR_Combo_Data[0].isAccInitialized == 0)
169  {
170  // SPI Serial Interface Mode selection --> 3Wires
171  if( Sensor_IO_Write(*handle, 0X23, &data, 1) )
172  {
173  return COMPONENT_ERROR;
174  }
175  }
176 
177  driver = ( MAGNETO_Drv_t * )((DrvContextTypeDef *)(*handle))->pVTable;
178 
179  if ( driver->Init == NULL )
180  {
181  memset((*handle), 0, sizeof(DrvContextTypeDef));
182  *handle = NULL;
183  return COMPONENT_ERROR;
184  }
185 
186  if ( driver->Init( (DrvContextTypeDef *)(*handle) ) == COMPONENT_ERROR )
187  {
188  memset((*handle), 0, sizeof(DrvContextTypeDef));
189  *handle = NULL;
190  return COMPONENT_ERROR;
191  }
192 
193  /* Disable I2C interface */
194  if ( LSM303AGR_MAG_W_I2C_DIS( *handle, LSM303AGR_MAG_I2C_DISABLED ) == MEMS_ERROR )
195  {
196  return COMPONENT_ERROR;
197  }
198 
199  return COMPONENT_OK;
200 }
201 
202 
209 DrvStatusTypeDef BSP_MAGNETO_DeInit( void **handle )
210 {
211  DrvContextTypeDef *ctx = (DrvContextTypeDef *)(*handle);
212  MAGNETO_Drv_t *driver = NULL;
213 
214  if(ctx == NULL)
215  {
216  return COMPONENT_ERROR;
217  }
218 
219  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
220 
221  if ( driver->DeInit == NULL )
222  {
223  return COMPONENT_ERROR;
224  }
225 
226  if ( driver->DeInit( ctx ) == COMPONENT_ERROR )
227  {
228  return COMPONENT_ERROR;
229  }
230 
231  memset(ctx, 0, sizeof(DrvContextTypeDef));
232 
233  *handle = NULL;
234 
235  return COMPONENT_OK;
236 }
237 
238 
245 DrvStatusTypeDef BSP_MAGNETO_Sensor_Enable( void *handle )
246 {
247 
248  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
249  MAGNETO_Drv_t *driver = NULL;
250 
251  if(ctx == NULL)
252  {
253  return COMPONENT_ERROR;
254  }
255 
256  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
257 
258  if ( driver->Sensor_Enable == NULL )
259  {
260  return COMPONENT_ERROR;
261  }
262 
263  if ( driver->Sensor_Enable( ctx ) == COMPONENT_ERROR )
264  {
265  return COMPONENT_ERROR;
266  }
267 
268  return COMPONENT_OK;
269 }
270 
271 
272 
279 DrvStatusTypeDef BSP_MAGNETO_Sensor_Disable( void *handle )
280 {
281 
282  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
283  MAGNETO_Drv_t *driver = NULL;
284 
285  if(ctx == NULL)
286  {
287  return COMPONENT_ERROR;
288  }
289 
290  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
291 
292  if ( driver->Sensor_Disable == NULL )
293  {
294  return COMPONENT_ERROR;
295  }
296 
297  if ( driver->Sensor_Disable( ctx ) == COMPONENT_ERROR )
298  {
299  return COMPONENT_ERROR;
300  }
301 
302  return COMPONENT_OK;
303 }
304 
305 
313 DrvStatusTypeDef BSP_MAGNETO_IsInitialized( void *handle, uint8_t *status )
314 {
315  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
316 
317  if(ctx == NULL)
318  {
319  return COMPONENT_ERROR;
320  }
321 
322  if ( status == NULL )
323  {
324  return COMPONENT_ERROR;
325  }
326 
327  *status = ctx->isInitialized;
328 
329  return COMPONENT_OK;
330 }
331 
332 
340 DrvStatusTypeDef BSP_MAGNETO_IsEnabled( void *handle, uint8_t *status )
341 {
342  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
343 
344  if(ctx == NULL)
345  {
346  return COMPONENT_ERROR;
347  }
348 
349  if ( status == NULL )
350  {
351  return COMPONENT_ERROR;
352  }
353 
354  *status = ctx->isEnabled;
355 
356  return COMPONENT_OK;
357 }
358 
359 
367 DrvStatusTypeDef BSP_MAGNETO_IsCombo( void *handle, uint8_t *status )
368 {
369  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
370 
371  if(ctx == NULL)
372  {
373  return COMPONENT_ERROR;
374  }
375 
376  if ( status == NULL )
377  {
378  return COMPONENT_ERROR;
379  }
380 
381  *status = ctx->isCombo;
382 
383  return COMPONENT_OK;
384 }
385 
386 
394 DrvStatusTypeDef BSP_MAGNETO_Get_Instance( void *handle, uint8_t *instance )
395 {
396  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
397 
398  if(ctx == NULL)
399  {
400  return COMPONENT_ERROR;
401  }
402 
403  if ( instance == NULL )
404  {
405  return COMPONENT_ERROR;
406  }
407 
408  *instance = ctx->instance;
409 
410  return COMPONENT_OK;
411 }
412 
413 
414 
422 DrvStatusTypeDef BSP_MAGNETO_Get_WhoAmI( void *handle, uint8_t *who_am_i )
423 {
424 
425  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
426  MAGNETO_Drv_t *driver = NULL;
427 
428  if(ctx == NULL)
429  {
430  return COMPONENT_ERROR;
431  }
432 
433  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
434 
435  if ( who_am_i == NULL )
436  {
437  return COMPONENT_ERROR;
438  }
439  if ( driver->Get_WhoAmI == NULL )
440  {
441  return COMPONENT_ERROR;
442  }
443  if ( driver->Get_WhoAmI( ctx, who_am_i ) == COMPONENT_ERROR )
444  {
445  return COMPONENT_ERROR;
446  }
447 
448  return COMPONENT_OK;
449 }
450 
451 
452 
459 DrvStatusTypeDef BSP_MAGNETO_Check_WhoAmI( void *handle )
460 {
461 
462  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
463  MAGNETO_Drv_t *driver = NULL;
464 
465  if(ctx == NULL)
466  {
467  return COMPONENT_ERROR;
468  }
469 
470  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
471 
472  if ( driver->Check_WhoAmI == NULL )
473  {
474  return COMPONENT_ERROR;
475  }
476  if ( driver->Check_WhoAmI( ctx ) == COMPONENT_ERROR )
477  {
478  return COMPONENT_ERROR;
479  }
480 
481  return COMPONENT_OK;
482 }
483 
484 
485 
493 DrvStatusTypeDef BSP_MAGNETO_Get_Axes( void *handle, SensorAxes_t *magnetic_field )
494 {
495 
496  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
497  MAGNETO_Drv_t *driver = NULL;
498 
499  if(ctx == NULL)
500  {
501  return COMPONENT_ERROR;
502  }
503 
504  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
505 
506  if ( magnetic_field == NULL )
507  {
508  return COMPONENT_ERROR;
509  }
510  if ( driver->Get_Axes == NULL )
511  {
512  return COMPONENT_ERROR;
513  }
514  if ( driver->Get_Axes( ctx, magnetic_field ) == COMPONENT_ERROR )
515  {
516  return COMPONENT_ERROR;
517  }
518 
519  return COMPONENT_OK;
520 }
521 
522 
523 
531 DrvStatusTypeDef BSP_MAGNETO_Get_AxesRaw( void *handle, SensorAxesRaw_t *value )
532 {
533 
534  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
535  MAGNETO_Drv_t *driver = NULL;
536 
537  if(ctx == NULL)
538  {
539  return COMPONENT_ERROR;
540  }
541 
542  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
543 
544  if ( value == NULL )
545  {
546  return COMPONENT_ERROR;
547  }
548 
549  if ( driver->Get_AxesRaw == NULL )
550  {
551  return COMPONENT_ERROR;
552  }
553 
554  if ( driver->Get_AxesRaw( ctx, value ) == COMPONENT_ERROR )
555  {
556  return COMPONENT_ERROR;
557  }
558 
559  return COMPONENT_OK;
560 }
561 
562 
563 
564 
572 DrvStatusTypeDef BSP_MAGNETO_Get_Sensitivity( void *handle, float *sensitivity )
573 {
574 
575  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
576  MAGNETO_Drv_t *driver = NULL;
577 
578  if(ctx == NULL)
579  {
580  return COMPONENT_ERROR;
581  }
582 
583  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
584 
585  if ( sensitivity == NULL )
586  {
587  return COMPONENT_ERROR;
588  }
589  if ( driver->Get_Sensitivity == NULL )
590  {
591  return COMPONENT_ERROR;
592  }
593  if ( driver->Get_Sensitivity( ctx, sensitivity ) == COMPONENT_ERROR )
594  {
595  return COMPONENT_ERROR;
596  }
597 
598  return COMPONENT_OK;
599 }
600 
601 
602 
610 DrvStatusTypeDef BSP_MAGNETO_Get_ODR( void *handle, float *odr )
611 {
612 
613  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
614  MAGNETO_Drv_t *driver = NULL;
615 
616  if(ctx == NULL)
617  {
618  return COMPONENT_ERROR;
619  }
620 
621  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
622 
623  if ( odr == NULL )
624  {
625  return COMPONENT_ERROR;
626  }
627  if ( driver->Get_ODR == NULL )
628  {
629  return COMPONENT_ERROR;
630  }
631  if ( driver->Get_ODR( ctx, odr ) == COMPONENT_ERROR )
632  {
633  return COMPONENT_ERROR;
634  }
635 
636  return COMPONENT_OK;
637 }
638 
639 
640 
648 DrvStatusTypeDef BSP_MAGNETO_Set_ODR( void *handle, SensorOdr_t odr )
649 {
650 
651  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
652  MAGNETO_Drv_t *driver = NULL;
653 
654  if(ctx == NULL)
655  {
656  return COMPONENT_ERROR;
657  }
658 
659  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
660 
661  if ( driver->Set_ODR == NULL )
662  {
663  return COMPONENT_ERROR;
664  }
665  if ( driver->Set_ODR( ctx, odr ) == COMPONENT_ERROR )
666  {
667  return COMPONENT_ERROR;
668  }
669 
670  return COMPONENT_OK;
671 }
672 
673 
674 
682 DrvStatusTypeDef BSP_MAGNETO_Set_ODR_Value( void *handle, float odr )
683 {
684 
685  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
686  MAGNETO_Drv_t *driver = NULL;
687 
688  if(ctx == NULL)
689  {
690  return COMPONENT_ERROR;
691  }
692 
693  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
694 
695  if ( driver->Set_ODR_Value == NULL )
696  {
697  return COMPONENT_ERROR;
698  }
699  if ( driver->Set_ODR_Value( ctx, odr ) == COMPONENT_ERROR )
700  {
701  return COMPONENT_ERROR;
702  }
703 
704  return COMPONENT_OK;
705 }
706 
707 
708 
716 DrvStatusTypeDef BSP_MAGNETO_Get_FS( void *handle, float *fullScale )
717 {
718 
719  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
720  MAGNETO_Drv_t *driver = NULL;
721 
722  if(ctx == NULL)
723  {
724  return COMPONENT_ERROR;
725  }
726 
727  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
728 
729  if ( fullScale == NULL )
730  {
731  return COMPONENT_ERROR;
732  }
733  if ( driver->Get_FS == NULL )
734  {
735  return COMPONENT_ERROR;
736  }
737  if ( driver->Get_FS( ctx, fullScale ) == COMPONENT_ERROR )
738  {
739  return COMPONENT_ERROR;
740  }
741 
742  return COMPONENT_OK;
743 }
744 
745 
746 
754 DrvStatusTypeDef BSP_MAGNETO_Set_FS( void *handle, SensorFs_t fullScale )
755 {
756 
757  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
758  MAGNETO_Drv_t *driver = NULL;
759 
760  if(ctx == NULL)
761  {
762  return COMPONENT_ERROR;
763  }
764 
765  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
766 
767  if ( driver->Set_FS == NULL )
768  {
769  return COMPONENT_ERROR;
770  }
771  if ( driver->Set_FS( ctx, fullScale ) == COMPONENT_ERROR )
772  {
773  return COMPONENT_ERROR;
774  }
775 
776  return COMPONENT_OK;
777 }
778 
779 
780 
788 DrvStatusTypeDef BSP_MAGNETO_Set_FS_Value( void *handle, float fullScale )
789 {
790 
791  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
792  MAGNETO_Drv_t *driver = NULL;
793 
794  if(ctx == NULL)
795  {
796  return COMPONENT_ERROR;
797  }
798 
799  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
800 
801  if ( driver->Set_FS_Value == NULL )
802  {
803  return COMPONENT_ERROR;
804  }
805  if ( driver->Set_FS_Value( ctx, fullScale ) == COMPONENT_ERROR )
806  {
807  return COMPONENT_ERROR;
808  }
809 
810  return COMPONENT_OK;
811 }
812 
813 
822 DrvStatusTypeDef BSP_MAGNETO_Read_Reg( void *handle, uint8_t reg, uint8_t *data )
823 {
824 
825  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
826  MAGNETO_Drv_t *driver = NULL;
827 
828  if(ctx == NULL)
829  {
830  return COMPONENT_ERROR;
831  }
832 
833  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
834 
835  if(data == NULL)
836  {
837  return COMPONENT_ERROR;
838  }
839 
840  if ( driver->Read_Reg == NULL )
841  {
842  return COMPONENT_ERROR;
843  }
844 
845  if ( driver->Read_Reg( ctx, reg, data ) == COMPONENT_ERROR )
846  {
847  return COMPONENT_ERROR;
848  }
849 
850  return COMPONENT_OK;
851 }
852 
853 
854 
863 DrvStatusTypeDef BSP_MAGNETO_Write_Reg( void *handle, uint8_t reg, uint8_t data )
864 {
865 
866  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
867  MAGNETO_Drv_t *driver = NULL;
868 
869  if(ctx == NULL)
870  {
871  return COMPONENT_ERROR;
872  }
873 
874  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
875 
876  if ( driver->Write_Reg == NULL )
877  {
878  return COMPONENT_ERROR;
879  }
880 
881  if ( driver->Write_Reg( ctx, reg, data ) == COMPONENT_ERROR )
882  {
883  return COMPONENT_ERROR;
884  }
885 
886  return COMPONENT_OK;
887 }
888 
889 
890 
898 DrvStatusTypeDef BSP_MAGNETO_Get_DRDY_Status( void *handle, uint8_t *status )
899 {
900 
901  DrvContextTypeDef *ctx = (DrvContextTypeDef *)handle;
902  MAGNETO_Drv_t *driver = NULL;
903 
904  if(ctx == NULL)
905  {
906  return COMPONENT_ERROR;
907  }
908 
909  driver = ( MAGNETO_Drv_t * )ctx->pVTable;
910 
911  if ( driver->Get_DRDY_Status == NULL )
912  {
913  return COMPONENT_ERROR;
914  }
915 
916  if ( driver->Get_DRDY_Status( ctx, status ) == COMPONENT_ERROR )
917  {
918  return COMPONENT_ERROR;
919  }
920 
921  return COMPONENT_OK;
922 }
923 
924 
941 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
DrvStatusTypeDef BSP_MAGNETO_Check_WhoAmI(void *handle)
Check the WHO_AM_I ID of the magnetometer sensor.
DrvStatusTypeDef BSP_MAGNETO_Set_ODR(void *handle, SensorOdr_t odr)
Set the magnetometer sensor output data rate.
DrvStatusTypeDef BSP_MAGNETO_DeInit(void **handle)
Deinitialize a magnetometer sensor.
DrvStatusTypeDef BSP_MAGNETO_Set_ODR_Value(void *handle, float odr)
Set the magnetometer sensor output data rate.
DrvStatusTypeDef BSP_MAGNETO_Get_FS(void *handle, float *fullScale)
Get the magnetometer sensor full scale.
DrvStatusTypeDef BSP_MAGNETO_Get_AxesRaw(void *handle, SensorAxesRaw_t *value)
Get the magnetometer sensor raw axes.
uint8_t Sensor_IO_Write(void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite)
Writes a buffer to the sensor.
Definition: SensorTile.c:427
DrvStatusTypeDef BSP_MAGNETO_Set_FS_Value(void *handle, float fullScale)
Set the magnetometer sensor full scale.
DrvStatusTypeDef BSP_MAGNETO_Set_FS(void *handle, SensorFs_t fullScale)
Set the magnetometer sensor full scale.
DrvStatusTypeDef Sensor_IO_SPI_Init(void)
Configures sensor SPI interface.
Definition: SensorTile.c:293
DrvStatusTypeDef BSP_MAGNETO_Get_WhoAmI(void *handle, uint8_t *who_am_i)
Get the WHO_AM_I ID of the magnetometer sensor.
DrvStatusTypeDef BSP_MAGNETO_IsCombo(void *handle, uint8_t *status)
Check if the magnetometer sensor is combo.
DrvStatusTypeDef BSP_MAGNETO_Get_DRDY_Status(void *handle, uint8_t *status)
Get magnetometer data ready status.
DrvStatusTypeDef BSP_MAGNETO_Get_Instance(void *handle, uint8_t *instance)
Get the magnetometer sensor instance.
DrvStatusTypeDef BSP_MAGNETO_Sensor_Enable(void *handle)
Enable magnetometer sensor.
DrvStatusTypeDef BSP_MAGNETO_IsEnabled(void *handle, uint8_t *status)
Check if the magnetometer sensor is enabled.
DrvStatusTypeDef BSP_MAGNETO_Get_Axes(void *handle, SensorAxes_t *magnetic_field)
Get the magnetometer sensor axes.
DrvStatusTypeDef BSP_MAGNETO_IsInitialized(void *handle, uint8_t *status)
Check if the magnetometer sensor is initialized.
DrvStatusTypeDef BSP_MAGNETO_Init(MAGNETO_ID_t id, void **handle)
Initialize a magnetometer sensor.
DrvStatusTypeDef BSP_MAGNETO_Get_Sensitivity(void *handle, float *sensitivity)
Get the magnetometer sensor sensitivity.
DrvStatusTypeDef BSP_MAGNETO_Get_ODR(void *handle, float *odr)
Get the magnetometer sensor output data rate.
DrvStatusTypeDef BSP_MAGNETO_Read_Reg(void *handle, uint8_t reg, uint8_t *data)
Read the data from register.
DrvStatusTypeDef BSP_MAGNETO_Write_Reg(void *handle, uint8_t reg, uint8_t data)
Write the data to register.
DrvStatusTypeDef BSP_MAGNETO_Sensor_Disable(void *handle)
Disable magnetometer sensor.
This file contains definitions for SensorTile_magneto.c driver.
Generated by   doxygen 1.8.13