/* 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) 2026 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 "stm32u3xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* 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 DIP_ADRESS_0_Pin GPIO_PIN_2
#define DIP_ADRESS_0_GPIO_Port GPIOE
#define DIP_ADRESS_1_Pin GPIO_PIN_3
#define DIP_ADRESS_1_GPIO_Port GPIOE
#define DIP_ADRESS_2_Pin GPIO_PIN_4
#define DIP_ADRESS_2_GPIO_Port GPIOE
#define DIP_ADRESS_3_Pin GPIO_PIN_5
#define DIP_ADRESS_3_GPIO_Port GPIOE
#define DIP_ADRESS_4_Pin GPIO_PIN_6
#define DIP_ADRESS_4_GPIO_Port GPIOE
#define DIP_ADRESS_5_Pin GPIO_PIN_13
#define DIP_ADRESS_5_GPIO_Port GPIOC
#define ADC_Weight_DRDY_Pin GPIO_PIN_0
#define ADC_Weight_DRDY_GPIO_Port GPIOA
#define ADC_Weight_DRDY_EXTI_IRQn EXTI0_IRQn
#define LORA_DIO1_Pin GPIO_PIN_1
#define LORA_DIO1_GPIO_Port GPIOA
#define LORA_DIO1_EXTI_IRQn EXTI1_IRQn
#define LORA_DIO2_Pin GPIO_PIN_2
#define LORA_DIO2_GPIO_Port GPIOA
#define LORA_DIO2_EXTI_IRQn EXTI2_IRQn
#define SIG_CHARGING_Pin GPIO_PIN_3
#define SIG_CHARGING_GPIO_Port GPIOA
#define SIG_CHARGING_EXTI_IRQn EXTI3_IRQn
#define SIG_DONE_Pin GPIO_PIN_4
#define SIG_DONE_GPIO_Port GPIOA
#define SIG_DONE_EXTI_IRQn EXTI4_IRQn
#define BAT_ALERT_Pin GPIO_PIN_5
#define BAT_ALERT_GPIO_Port GPIOA
#define ADC_TEMP_DRDY_Pin GPIO_PIN_6
#define ADC_TEMP_DRDY_GPIO_Port GPIOA
#define ADC_TEMP_DRDY_EXTI_IRQn EXTI6_IRQn
#define PowerMOdeControl_Pin GPIO_PIN_0
#define PowerMOdeControl_GPIO_Port GPIOB
#define ADC_TEMP_CS_Pin GPIO_PIN_1
#define ADC_TEMP_CS_GPIO_Port GPIOB
#define ADC_RESET_Pin GPIO_PIN_2
#define ADC_RESET_GPIO_Port GPIOB
#define VCC_LORA_ENABLE_Pin GPIO_PIN_7
#define VCC_LORA_ENABLE_GPIO_Port GPIOE
#define LORA_BUSY_Pin GPIO_PIN_8
#define LORA_BUSY_GPIO_Port GPIOE
#define LORA_RESET_Pin GPIO_PIN_9
#define LORA_RESET_GPIO_Port GPIOE
#define LORA_RXEN_Pin GPIO_PIN_10
#define LORA_RXEN_GPIO_Port GPIOE
#define LORA_TXEN_Pin GPIO_PIN_11
#define LORA_TXEN_GPIO_Port GPIOE
#define LORA_CS_Pin GPIO_PIN_12
#define LORA_CS_GPIO_Port GPIOE
#define ADC_CS_Pin GPIO_PIN_8
#define ADC_CS_GPIO_Port GPIOD
#define HIVE_SELECT_EN_Pin GPIO_PIN_9
#define HIVE_SELECT_EN_GPIO_Port GPIOD
#define HIVE_SELECT_A0_Pin GPIO_PIN_10
#define HIVE_SELECT_A0_GPIO_Port GPIOD
#define HIVE_SELECT_A1_Pin GPIO_PIN_11
#define HIVE_SELECT_A1_GPIO_Port GPIOD
#define CELL_SELECT_EN_Pin GPIO_PIN_12
#define CELL_SELECT_EN_GPIO_Port GPIOD
#define CELL_SELECT_A0_Pin GPIO_PIN_13
#define CELL_SELECT_A0_GPIO_Port GPIOD
#define CELL_SELECT_A1_Pin GPIO_PIN_14
#define CELL_SELECT_A1_GPIO_Port GPIOD
#define AVDD_ENABLE_Pin GPIO_PIN_15
#define AVDD_ENABLE_GPIO_Port GPIOD
#define DIP_HIVE_SETTINGS_0_Pin GPIO_PIN_6
#define DIP_HIVE_SETTINGS_0_GPIO_Port GPIOC
#define DIP_HIVE_SETTINGS_1_Pin GPIO_PIN_7
#define DIP_HIVE_SETTINGS_1_GPIO_Port GPIOC
#define DIP_HIVE_SETTINGS_2_Pin GPIO_PIN_8
#define DIP_HIVE_SETTINGS_2_GPIO_Port GPIOC
#define DIP_HIVE_SETTINGS_3_Pin GPIO_PIN_9
#define DIP_HIVE_SETTINGS_3_GPIO_Port GPIOC
#define DIP_HIVE_SETTINGS_4_Pin GPIO_PIN_8
#define DIP_HIVE_SETTINGS_4_GPIO_Port GPIOA
#define DIP_HIVE_SETTINGS_5_Pin GPIO_PIN_9
#define DIP_HIVE_SETTINGS_5_GPIO_Port GPIOA
#define ADC_VBUS_SENSE_Pin GPIO_PIN_10
#define ADC_VBUS_SENSE_GPIO_Port GPIOA
#define DIP_HIVE_ENABLE_0_Pin GPIO_PIN_12
#define DIP_HIVE_ENABLE_0_GPIO_Port GPIOC
#define DIP_HIVE_ENABLE_1_Pin GPIO_PIN_0
#define DIP_HIVE_ENABLE_1_GPIO_Port GPIOD
#define DIP_HIVE_ENABLE_2_Pin GPIO_PIN_1
#define DIP_HIVE_ENABLE_2_GPIO_Port GPIOD
#define DIP_HIVE_ENABLE_3_Pin GPIO_PIN_2
#define DIP_HIVE_ENABLE_3_GPIO_Port GPIOD
#define DIP_HIVE_ENABLE_4_Pin GPIO_PIN_3
#define DIP_HIVE_ENABLE_4_GPIO_Port GPIOD
#define DIP_HIVE_ENABLE_5_Pin GPIO_PIN_4
#define DIP_HIVE_ENABLE_5_GPIO_Port GPIOD
#define WP_EN_Pin GPIO_PIN_3
#define WP_EN_GPIO_Port GPIOH

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
