// BOOTLOADER defines

// RCC defines
#define __RCC_UART_BOOT_CLK_ENABLE() 	__HAL_RCC_USART3_CLK_ENABLE()
#define __RCC_UART_PORT_CLK_ENABLE() 	__HAL_RCC_GPIOB_CLK_ENABLE()
#define __RCC_DMA_UART_CLK_ENABLE() 	__HAL_RCC_DMA1_CLK_ENABLE()
#define __RCC_DMA_SDIO_CLK_ENABLE() 	__HAL_RCC_DMA2_CLK_ENABLE()
#define __RCC_TIM_BOOT_CLK_ENABLE() 	__HAL_RCC_TIM7_CLK_ENABLE()


// USART defines
#define UART_BOOT 			USART3 			// usart
#define UART_SPEED 			256000
#define UART_BOOT_IRQn 	USART3_IRQn

#define UART_PORT 			GPIOB				// usart port
#define UART_PIN_TX 		GPIO_PIN_10
#define UART_PIN_RX 		GPIO_PIN_11


// DMA defines
#define DMA_UART_Channel 	DMA1_Channel3
#define DMA_SDIO_Channel 	DMA2_Channel4
#define DMA_UART_IRQn 		DMA1_Channel3_IRQn
#define DMA_SDIO_IRQn 		DMA2_Channel4_5_IRQn

// TIM defines
#define TIM_BOOT 						TIM7
#define TIM_BOOT_Prescaler 	64000 // set up for 1 tick - 1 ms (no decrement needed)
#define TIM_BOOT_IRQn 			TIM7_IRQn

// SDIO defines
#define SDIO_SDCard_In_PORT GPIOB
#define SDIO_SDCard_In_PIN 	GPIO_PIN_5
#define SDIO_SDCard_In_IRQn EXTI9_5_IRQn

