12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- /* USER CODE BEGIN Header */
- /**
- ******************************************************************************
- * @file : main.h
- * @brief : Header for main.c file.
- * This file contains the common defines of the application.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2024 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
- /* USER CODE END Header */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef __MAIN_H
- #define __MAIN_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "stm32l4xx_hal.h"
- /* Private includes ----------------------------------------------------------*/
- /* USER CODE BEGIN Includes */
- void Low_Power_Set(void);
- void Configure_GPIOs_For_LowPower(void);
- void Enter_LPSleepMode(void);
- void Enter_LPStop1Mode(void);
- void Enter_LPStop2Mode(void);
- void Enter_StandbyMode(void);
- /* USER CODE END Includes */
- /* Exported types ------------------------------------------------------------*/
- /* USER CODE BEGIN ET */
- uint16_t CalculateCRC(uint8_t *data, uint16_t length);
-
- uint8_t ReadHallSensor(void);
- uint32_t ReadADCValue(void);
- uint16_t CalculateBatteryLevel(uint32_t adcValue);
- uint8_t ReadSC7A20Sensor(void);
- /* USER CODE END ET */
- /* Exported constants --------------------------------------------------------*/
- /* USER CODE BEGIN EC */
- /* USER CODE END EC */
- /* Exported macro ------------------------------------------------------------*/
- /* USER CODE BEGIN EM */
- /* USER CODE END EM */
- /* Exported functions prototypes ---------------------------------------------*/
- void Error_Handler(void);
- /* USER CODE BEGIN EFP */
- /* USER CODE END EFP */
- /* Private defines -----------------------------------------------------------*/
- #define SDA_IIC_Pin GPIO_PIN_1
- #define SDA_IIC_GPIO_Port GPIOB
- #define SCL_IIC_Pin GPIO_PIN_2
- #define SCL_IIC_GPIO_Port GPIOB
- #define LINK_BT_Pin GPIO_PIN_11
- #define LINK_BT_GPIO_Port GPIOA
- /* USER CODE BEGIN Private defines */
- /* USER CODE END Private defines */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __MAIN_H */
|