magneto.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /**
  2. ******************************************************************************
  3. * @file magneto.h
  4. * @author MCD Application Team
  5. * @brief This header file contains the functions prototypes for the MAGNETO driver.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __MAGNETO_H
  21. #define __MAGNETO_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include <stdint.h>
  27. /** @addtogroup BSP
  28. * @{
  29. */
  30. /** @addtogroup Components
  31. * @{
  32. */
  33. /** @addtogroup MAGNETO
  34. * @{
  35. */
  36. /** @defgroup MAGNETO_Exported_Types
  37. * @{
  38. */
  39. /** @defgroup MAGNETO_Config_structure Magnetometer Configuration structure
  40. * @{
  41. */
  42. typedef struct
  43. {
  44. uint8_t Register1;
  45. uint8_t Register2;
  46. uint8_t Register3;
  47. uint8_t Register4;
  48. uint8_t Register5;
  49. }MAGNETO_InitTypeDef;
  50. /**
  51. * @}
  52. */
  53. /** @defgroup MAGNETO_Driver_structure Magnetometer Driver structure
  54. * @{
  55. */
  56. typedef struct
  57. {
  58. void (*Init)(MAGNETO_InitTypeDef);
  59. void (*DeInit)(void);
  60. uint8_t (*ReadID)(void);
  61. void (*Reset)(void);
  62. void (*LowPower)(uint16_t);
  63. void (*ConfigIT)(void);
  64. void (*EnableIT)(uint8_t);
  65. void (*DisableIT)(uint8_t);
  66. uint8_t (*ITStatus)(uint16_t);
  67. void (*ClearIT)(void);
  68. void (*FilterConfig)(uint8_t);
  69. void (*FilterCmd)(uint8_t);
  70. void (*GetXYZ)(int16_t *);
  71. }MAGNETO_DrvTypeDef;
  72. /**
  73. * @}
  74. */
  75. /**
  76. * @}
  77. */
  78. /**
  79. * @}
  80. */
  81. /**
  82. * @}
  83. */
  84. /**
  85. * @}
  86. */
  87. #ifdef __cplusplus
  88. }
  89. #endif
  90. #endif /* __MAGNETO_H */
  91. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/