Subversion Repositories EngineBay2

Rev

Rev 40 | Rev 43 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  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 BSD 3-Clause license,
  14.   * the "License"; You may not use this file except in compliance with the
  15.   * License. You may obtain a copy of the License at:
  16.   *                        opensource.org/licenses/BSD-3-Clause
  17.   *
  18.   ******************************************************************************
  19.   */
  20. /* USER CODE END Header */
  21.  
  22. /* Define to prevent recursive inclusion -------------------------------------*/
  23. #ifndef __MAIN_H
  24. #define __MAIN_H
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "stm32f1xx_hal.h"
  32.  
  33. /* Private includes ----------------------------------------------------------*/
  34. /* USER CODE BEGIN Includes */
  35. #include "main_export.h"
  36. /* USER CODE END Includes */
  37.  
  38. /* Exported types ------------------------------------------------------------*/
  39. /* USER CODE BEGIN ET */
  40.  
  41. /* USER CODE END ET */
  42.  
  43. /* Exported constants --------------------------------------------------------*/
  44. /* USER CODE BEGIN EC */
  45.  
  46. #define TX_USART_BUFF_SIZ 512
  47.  
  48. #define RX_USART_BUFF_SIZ 512
  49.  
  50. #define NUM_SPI_TEMP_SENS 4
  51.  
  52.  
  53. /* USER CODE END EC */
  54.  
  55. /* Exported macro ------------------------------------------------------------*/
  56. /* USER CODE BEGIN EM */
  57.  
  58. /* USER CODE END EM */
  59.  
  60. /* Exported functions prototypes ---------------------------------------------*/
  61. void Error_Handler(void);
  62.  
  63.  
  64. /* USER CODE BEGIN EFP */
  65. // reset temperature SPI system
  66. extern void resetTempCS(void);
  67. // step onto next temperature SPI value
  68. extern void nextTempCS(void);
  69.  
  70. /* USER CODE END EFP */
  71.  
  72. /* Private defines -----------------------------------------------------------*/
  73. #define LED_Blink_Pin GPIO_PIN_13
  74. #define LED_Blink_GPIO_Port GPIOC
  75. #define V_Batt1_Pin GPIO_PIN_0
  76. #define V_Batt1_GPIO_Port GPIOA
  77. #define V_Batt2_Pin GPIO_PIN_1
  78. #define V_Batt2_GPIO_Port GPIOA
  79. #define V_Map_Pin GPIO_PIN_2
  80. #define V_Map_GPIO_Port GPIOA
  81. #define V_Oil_Pin GPIO_PIN_3
  82. #define V_Oil_GPIO_Port GPIOA
  83. #define V_Oil_Temp_Pin GPIO_PIN_4
  84. #define V_Oil_Temp_GPIO_Port GPIOA
  85. #define SPI1_SCK_Pin GPIO_PIN_5
  86. #define SPI1_SCK_GPIO_Port GPIOA
  87. #define SPI1_MISO_Pin GPIO_PIN_6
  88. #define SPI1_MISO_GPIO_Port GPIOA
  89. #define SPI1_MOSI_Pin GPIO_PIN_7
  90. #define SPI1_MOSI_GPIO_Port GPIOA
  91. #define SPI_CS_D_Pin GPIO_PIN_0
  92. #define SPI_CS_D_GPIO_Port GPIOB
  93. #define SPI_CS_Clk_Pin GPIO_PIN_1
  94. #define SPI_CS_Clk_GPIO_Port GPIOB
  95. #define Uart1_TX_Pin GPIO_PIN_9
  96. #define Uart1_TX_GPIO_Port GPIOA
  97. #define Uart1_RX_Pin GPIO_PIN_10
  98. #define Uart1_RX_GPIO_Port GPIOA
  99. #define CB_Pulse_Pin GPIO_PIN_15
  100. #define CB_Pulse_GPIO_Port GPIOA
  101. #define STARTER_ON_Pin GPIO_PIN_3
  102. #define STARTER_ON_GPIO_Port GPIOB
  103. #define ENA_AUX_5V_Pin GPIO_PIN_7
  104. #define ENA_AUX_5V_GPIO_Port GPIOB
  105. /* USER CODE BEGIN Private defines */
  106.  
  107. /* USER CODE END Private defines */
  108.  
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112.  
  113. #endif /* __MAIN_H */
  114.  
  115. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
  116.