stm32f4_discovery_accelerometer.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4_discovery_accelerometer.h
  4. * @author MCD Application Team
  5. * @brief This file contains all the functions prototypes for the
  6. * stm32f4_discovery_accelerometer.c firmware driver.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2017 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __STM32F4_DISCOVERY_ACCELEROMETER_H
  21. #define __STM32F4_DISCOVERY_ACCELEROMETER_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32f4_discovery.h"
  27. /* Include Accelerometer component drivers */
  28. #include "../Components/lis302dl/lis302dl.h"
  29. #include "../Components/lis3dsh/lis3dsh.h"
  30. /** @addtogroup BSP
  31. * @{
  32. */
  33. /** @addtogroup STM32F4_DISCOVERY
  34. * @{
  35. */
  36. /** @addtogroup STM32F4_DISCOVERY_ACCELEROMETER
  37. * @{
  38. */
  39. /** @defgroup STM32F4_DISCOVERY_ACCELEROMETER_Exported_Types STM32F4 DISCOVERY ACCELEROMETER Exported Types
  40. * @{
  41. */
  42. typedef enum
  43. {
  44. ACCELERO_OK = 0,
  45. ACCELERO_ERROR = 1,
  46. ACCELERO_TIMEOUT = 2
  47. }ACCELERO_StatusTypeDef;
  48. /**
  49. * @}
  50. */
  51. /** @defgroup STM32F4_DISCOVERY_ACCELEROMETER_Exported_Functions STM32F4 DISCOVERY ACCELEROMETER Exported Functions
  52. * @{
  53. */
  54. /* Accelerometer functions */
  55. uint8_t BSP_ACCELERO_Init(void);
  56. uint8_t BSP_ACCELERO_ReadID(void);
  57. void BSP_ACCELERO_Reset(void);
  58. void BSP_ACCELERO_Click_ITConfig(void);
  59. void BSP_ACCELERO_Click_ITClear(void);
  60. void BSP_ACCELERO_GetXYZ(int16_t *pDataXYZ);
  61. /**
  62. * @}
  63. */
  64. /**
  65. * @}
  66. */
  67. /**
  68. * @}
  69. */
  70. /**
  71. * @}
  72. */
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif /* __STM32F4_DISCOVERY_ACCELEROMETER_H */