/* 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) 2022 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 "stm32wbaxx_hal.h"
#include "app_conf.h"
#include "app_entry.h"
#include "app_common.h"
#include "app_debug.h"

#include "stm32wbaxx_ll_icache.h"
#include "stm32wbaxx_ll_tim.h"
#include "stm32wbaxx_ll_bus.h"
#include "stm32wbaxx_ll_cortex.h"
#include "stm32wbaxx_ll_rcc.h"
#include "stm32wbaxx_ll_system.h"
#include "stm32wbaxx_ll_utils.h"
#include "stm32wbaxx_ll_pwr.h"
#include "stm32wbaxx_ll_gpio.h"
#include "stm32wbaxx_ll_dma.h"

#include "stm32wbaxx_ll_exti.h"

#include "nfc_conf.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 */

#define REBOOT_ON_SERIAL_KEYPRESS()     do{while((GPIOA->IDR & GPIO_PIN_8) != 0) {} ; HAL_NVIC_SystemReset();}while(0)
#define REBOOT_ON_ERROR()               REBOOT_ON_SERIAL_KEYPRESS()
#define REBOOT_ON_FAULT()               REBOOT_ON_SERIAL_KEYPRESS()

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
void MX_GPIO_Init(void);
void MX_GPDMA1_Init(void);
void MX_RAMCFG_Init(void);
void MX_RTC_Init(void);
void MX_USART1_UART_Init(void);
void MX_ADC4_Init(void);
void MX_CRC_Init(void);
void MX_RNG_Init(void);
void MX_ICACHE_Init(void);
void MX_HASH_Init(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define PRESCALER_VALUE 9999
#define NFC_LED1_Pin GPIO_PIN_6
#define NFC_LED1_GPIO_Port GPIOA
#define NFC_IRQ_Pin GPIO_PIN_4
#define NFC_IRQ_GPIO_Port GPIOA
#define NFC_LED3_Pin GPIO_PIN_1
#define NFC_LED3_GPIO_Port GPIOA
#define NFC_SS_Pin GPIO_PIN_9
#define NFC_SS_GPIO_Port GPIOB
#define NFC_LED4_Pin GPIO_PIN_14
#define NFC_LED4_GPIO_Port GPIOD
#define NFC_LED5_Pin GPIO_PIN_0
#define NFC_LED5_GPIO_Port GPIOB
#define NFC_LED2_Pin GPIO_PIN_4
#define NFC_LED2_GPIO_Port GPIOC
#define NFC_RESET_Pin GPIO_PIN_10
#define NFC_RESET_GPIO_Port GPIOA
#define NFC_LED6_Pin GPIO_PIN_14
#define NFC_LED6_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
