main.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under Ultimate Liberty license
  14. * SLA0044, the "License"; You may not use this file except in compliance with
  15. * the License. You may obtain a copy of the License at:
  16. * www.st.com/SLA0044
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __MAIN_H
  23. #define __MAIN_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f1xx_hal.h"
  29. /* Private includes ----------------------------------------------------------*/
  30. /* USER CODE BEGIN Includes */
  31. #include <stdbool.h>
  32. #include "../Src/nrf24/RF24.h"
  33. void ad0x0_err(void);
  34. void onRF24DataReady(pipe_data_t *p);
  35. /* USER CODE END Includes */
  36. /* Exported types ------------------------------------------------------------*/
  37. /* USER CODE BEGIN ET */
  38. /* USER CODE END ET */
  39. /* Exported constants --------------------------------------------------------*/
  40. /* USER CODE BEGIN EC */
  41. /* USER CODE END EC */
  42. /* Exported macro ------------------------------------------------------------*/
  43. /* USER CODE BEGIN EM */
  44. /* USER CODE END EM */
  45. /* Exported functions prototypes ---------------------------------------------*/
  46. void Error_Handler(void);
  47. /* USER CODE BEGIN EFP */
  48. /* USER CODE END EFP */
  49. /* Private defines -----------------------------------------------------------*/
  50. #define AD_DBG_S1_Pin GPIO_PIN_1
  51. #define AD_DBG_S1_GPIO_Port GPIOA
  52. #define AD_DBG_S2_Pin GPIO_PIN_2
  53. #define AD_DBG_S2_GPIO_Port GPIOA
  54. #define AD_DC_Pin GPIO_PIN_3
  55. #define AD_DC_GPIO_Port GPIOA
  56. #define AD_RES_Pin GPIO_PIN_0
  57. #define AD_RES_GPIO_Port GPIOB
  58. #define MPU6050_POWER_Pin GPIO_PIN_1
  59. #define MPU6050_POWER_GPIO_Port GPIOB
  60. #define SPI2_NSS_Pin GPIO_PIN_12
  61. #define SPI2_NSS_GPIO_Port GPIOB
  62. #define AD_NFR24_CE_Pin GPIO_PIN_8
  63. #define AD_NFR24_CE_GPIO_Port GPIOA
  64. #define NRF24_IRQ_Pin GPIO_PIN_11
  65. #define NRF24_IRQ_GPIO_Port GPIOA
  66. #define NRF24_IRQ_EXTI_IRQn EXTI15_10_IRQn
  67. #define MPU6050_IRQ_Pin GPIO_PIN_5
  68. #define MPU6050_IRQ_GPIO_Port GPIOB
  69. #define MPU6050_IRQ_EXTI_IRQn EXTI9_5_IRQn
  70. /* USER CODE BEGIN Private defines */
  71. /* USER CODE END Private defines */
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* __MAIN_H */
  76. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/