/**************************************************************************
Данный файл необходим для объявления структур для использования их матлабом
В оригинальном stm32f407xx они объявлены дефайнами через адресс, и матлаб не
имеет доступа к тем адрессам (симулинк вылетает). Поэтому необходимо объявить
данные структуры. Причем объявить через указатель, чтобы исходный код, 
в котором используется NAME_STRUCT->STRUCT_VAR, также работал

**************************************************************************/
#include "stm32f407xx_matlab.h"
// ОБЪЯВЛЕНИЕ СТРУКТУРЫ                     // ОБЪЯВЛЕНИЕ УКАЗАТЕЛЯ НА СТРУКТУРУ
// объявление структур таймеров
//TIM_TypeDef TIM1_Src;						TIM_TypeDef *TIM1 = &TIM1_Src;
//TIM_TypeDef TIM2_Src;						TIM_TypeDef *TIM2 = &TIM2_Src;
//TIM_TypeDef TIM3_Src;						TIM_TypeDef *TIM3 = &TIM3_Src;
//TIM_TypeDef TIM4_Src;						TIM_TypeDef *TIM4 = &TIM4_Src;
//TIM_TypeDef TIM5_Src;						TIM_TypeDef *TIM5 = &TIM5_Src;
//TIM_TypeDef TIM6_Src;						TIM_TypeDef *TIM6 = &TIM6_Src;
//TIM_TypeDef TIM7_Src;						TIM_TypeDef *TIM7 = &TIM7_Src;
//TIM_TypeDef TIM8_Src;						TIM_TypeDef *TIM8 = &TIM8_Src;
//TIM_TypeDef TIM9_Src;						TIM_TypeDef *TIM9 = &TIM9_Src;
//TIM_TypeDef TIM10_Src;						TIM_TypeDef *TIM10 = &TIM10_Src;
//TIM_TypeDef TIM11_Src;						TIM_TypeDef *TIM11 = &TIM11_Src;
//TIM_TypeDef TIM12_Src;						TIM_TypeDef *TIM12 = &TIM12_Src;
//TIM_TypeDef TIM13_Src;						TIM_TypeDef *TIM13 = &TIM13_Src;
//TIM_TypeDef TIM14_Src;						TIM_TypeDef *TIM14 = &TIM14_Src;
//
//// объявление структур "системных" таймеров
//RCC_TypeDef RCC_Src;						RCC_TypeDef *RCC = &RCC_Src;
//RTC_TypeDef RTC_Src;						RTC_TypeDef *RTC = &RTC_Src;
//WWDG_TypeDef WWDG_Src;						WWDG_TypeDef *WWDG = &WWDG_Src;
//IWDG_TypeDef IWDG_Src;						IWDG_TypeDef *IWDG = &IWDG_Src;
//
//
/////* RCC CR register */
////#define RCC_CR_OFFSET              (0x00U)
////uint32_t* const RCC_CR = (uint32_t*)(RCC + RCC_CR_OFFSET);
////uint32_t* const RCC_HSION_BB = (uint32_t*)(RCC + (RCC_CR_OFFSET * 32U) + (RCC_HSION_BIT_NUMBER));
////uint32_t* const RCC_CSSON_BB = (uint32_t*)(RCC + (RCC_CR_OFFSET * 32U) + (RCC_CSSON_BIT_NUMBER);
////uint32_t* const RCC_PLLON_BB = (uint32_t*)(RCC + (RCC_CR_OFFSET * 32U) + (RCC_PLLON_BIT_NUMBER);
////
/////* RCC BDCR register */
////#define RCC_BDCR_OFFSET            (0x70U)
////uint32_t* const RCC_BDCR = (uint32_t*)(RCC + RCC_BDCR_OFFSET);
////uint32_t* const RCC_RTCEN_BB = (uint32_t*)(RCC + (RCC_BDCR_OFFSET * 32U) + (RCC_RTCEN_BIT_NUMBER);
////uint32_t* const RCC_BDRST_BB = (uint32_t*)(RCC + (RCC_BDCR_OFFSET * 32U) + (RCC_BDRST_BIT_NUMBER);
////
/////* RCC CSR register */
////#define RCC_CSR_OFFSET             (0x74U)
////uint32_t* const RCC_CSR = (uint32_t*)(RCC + RCC_CSR_OFFSET);
////uint32_t* const RCC_LSION_BB = (uint32_t*)(RCC + (RCC_CSR_OFFSET * 32U) + (RCC_LSION_BIT_NUMBER);
//
//// объявление структур SPI
//SPI_TypeDef I2S2ext_Src;					SPI_TypeDef *I2S2ext = &I2S2ext_Src;
//SPI_TypeDef SPI2_Src;						SPI_TypeDef *SPI2 = &SPI2_Src;
//SPI_TypeDef SPI3_Src;						SPI_TypeDef *SPI3 = &SPI3_Src;
//SPI_TypeDef I2S3ext_Src;						SPI_TypeDef *I2S3ext = &I2S3ext_Src;
//
//// объявление структур UART
//USART_TypeDef USART1_Src;					USART_TypeDef *USART1 = &USART1_Src;
//USART_TypeDef USART2_Src;					USART_TypeDef *USART2 = &USART2_Src;
//USART_TypeDef USART3_Src;					USART_TypeDef *USART3 = &USART3_Src;
//USART_TypeDef UART4_Src;					USART_TypeDef *UART4 = &UART4_Src;
//USART_TypeDef UART5_Src;					USART_TypeDef *UART5 = &UART5_Src;
//USART_TypeDef USART6_Src;					USART_TypeDef *USART6 = &USART6_Src;
//
//// объявление структур I2C
//I2C_TypeDef I2C1_Src;						I2C_TypeDef *I2C1 = &I2C1_Src;
//I2C_TypeDef I2C2_Src;						I2C_TypeDef *I2C2 = &I2C2_Src;
//I2C_TypeDef I2C3_Src;						I2C_TypeDef *I2C3 = &I2C3_Src;
//
//// объявление структур CAN
//CAN_TypeDef CAN1_Src;						CAN_TypeDef *CAN1 = &CAN1_Src;
//CAN_TypeDef CAN2_Src;						CAN_TypeDef *CAN2 = &CAN2_Src;
//
//PWR_TypeDef PWR_Src;						PWR_TypeDef *PWR = &PWR_Src;
//
//// объявление структур DAC
//DAC_TypeDef DAC1_Src;						DAC_TypeDef *DAC1 = &DAC1_Src;
//DAC_TypeDef DAC_Src;						DAC_TypeDef *DAC = &DAC_Src;
//
//// объявление структур ADC
//ADC_TypeDef ADC1_Src;						ADC_TypeDef *ADC1 = &ADC1_Src;
//ADC_TypeDef ADC2_Src;						ADC_TypeDef *ADC2 = &ADC2_Src;
//ADC_TypeDef ADC3_Src;						ADC_TypeDef *ADC3 = &ADC3_Src;
//ADC_Common_TypeDef ADC123_COMMON_Src;		ADC_Common_TypeDef* ADC123_COMMON = &ADC123_COMMON_Src;
//
//// объявление структур SDIO
//SDIO_TypeDef SDIO_Src;						SDIO_TypeDef *SDIO = &SDIO_Src;
//
//// объявление структур SPI
//SPI_TypeDef SPI1_Src;						SPI_TypeDef *SPI1 = &SPI1_Src;
//
//// объявление структур EXTI
//EXTI_TypeDef EXTI_Src;						EXTI_TypeDef *EXTI = &EXTI_Src;
//
//// объявление структур GPIO
//GPIO_TypeDef GPIOA_Src;						GPIO_TypeDef *GPIOA = &GPIOA_Src;
//GPIO_TypeDef GPIOB_Src;						GPIO_TypeDef *GPIOB = &GPIOB_Src;
//GPIO_TypeDef GPIOC_Src;						GPIO_TypeDef *GPIOC = &GPIOC_Src;
//GPIO_TypeDef GPIOD_Src;						GPIO_TypeDef *GPIOD = &GPIOD_Src;
//GPIO_TypeDef GPIOE_Src;						GPIO_TypeDef *GPIOE = &GPIOE_Src;
//GPIO_TypeDef GPIOF_Src;						GPIO_TypeDef *GPIOF = &GPIOF_Src;
//GPIO_TypeDef GPIOG_Src;						GPIO_TypeDef *GPIOG = &GPIOG_Src;
//GPIO_TypeDef GPIOH_Src;						GPIO_TypeDef *GPIOH = &GPIOH_Src;
//GPIO_TypeDef GPIOI_Src;						GPIO_TypeDef *GPIOI = &GPIOI_Src;
//
//// объявление структур FLASH
//FLASH_TypeDef FLASH_Src;					FLASH_TypeDef *FLASH = &FLASH_Src;
//
//// объявление структур DMA1
//DMA_TypeDef DMA1_Src;						DMA_TypeDef *DMA1 = &DMA1_Src;
//DMA_Stream_TypeDef DMA1_Stream0_Src;		DMA_Stream_TypeDef *DMA1_Stream0 = &DMA1_Stream0_Src;
//DMA_Stream_TypeDef DMA1_Stream1_Src;		DMA_Stream_TypeDef *DMA1_Stream1 = &DMA1_Stream1_Src;
//DMA_Stream_TypeDef DMA1_Stream2_Src;		DMA_Stream_TypeDef *DMA1_Stream2 = &DMA1_Stream2_Src;
//DMA_Stream_TypeDef DMA1_Stream3_Src;		DMA_Stream_TypeDef *DMA1_Stream3 = &DMA1_Stream3_Src;
//DMA_Stream_TypeDef DMA1_Stream4_Src;		DMA_Stream_TypeDef *DMA1_Stream4 = &DMA1_Stream4_Src;
//DMA_Stream_TypeDef DMA1_Stream5_Src;		DMA_Stream_TypeDef *DMA1_Stream5 = &DMA1_Stream5_Src;
//DMA_Stream_TypeDef DMA1_Stream6_Src;		DMA_Stream_TypeDef *DMA1_Stream6 = &DMA1_Stream6_Src;
//DMA_Stream_TypeDef DMA1_Stream7_Src;		DMA_Stream_TypeDef *DMA1_Stream7 = &DMA1_Stream7_Src;
//
//// объявление структур DMA2
//DMA_TypeDef DMA2_Src;						DMA_TypeDef *DMA2 = &DMA2_Src;
//DMA_Stream_TypeDef DMA2_Stream0_Src;		DMA_Stream_TypeDef *DMA2_Stream0 = &DMA2_Stream0_Src;
//DMA_Stream_TypeDef DMA2_Stream1_Src;		DMA_Stream_TypeDef *DMA2_Stream1 = &DMA2_Stream1_Src;
//DMA_Stream_TypeDef DMA2_Stream2_Src;		DMA_Stream_TypeDef *DMA2_Stream2 = &DMA2_Stream2_Src;
//DMA_Stream_TypeDef DMA2_Stream3_Src;		DMA_Stream_TypeDef *DMA2_Stream3 = &DMA2_Stream3_Src;
//DMA_Stream_TypeDef DMA2_Stream4_Src;		DMA_Stream_TypeDef *DMA2_Stream4 = &DMA2_Stream4_Src;
//DMA_Stream_TypeDef DMA2_Stream5_Src;		DMA_Stream_TypeDef *DMA2_Stream5 = &DMA2_Stream5_Src;
//DMA_Stream_TypeDef DMA2_Stream6_Src;		DMA_Stream_TypeDef *DMA2_Stream6 = &DMA2_Stream6_Src;
//DMA_Stream_TypeDef DMA2_Stream7_Src;		DMA_Stream_TypeDef *DMA2_Stream7 = &DMA2_Stream7_Src;
//
//// объявление остальных структур
//CRC_TypeDef CRC_Src;						CRC_TypeDef *CRC = &CRC_Src;
//SYSCFG_TypeDef SYSCFG_Src;					SYSCFG_TypeDef *SYSCFG = &SYSCFG_Src;
//ETH_TypeDef ETH_Src;						ETH_TypeDef *ETH = &ETH_Src;
//DCMI_TypeDef DCMI_Src;						DCMI_TypeDef *DCMI = &DCMI_Src;
//RNG_TypeDef RNG_Src;						RNG_TypeDef *RNG = &RNG_Src;
//FSMC_Bank1_TypeDef FSMC_Bank1_Src;			FSMC_Bank1_TypeDef *FSMC_Bank1 = &FSMC_Bank1_Src;
//FSMC_Bank1E_TypeDef FSMC_Bank1E_Src;		FSMC_Bank1E_TypeDef *FSMC_Bank1E = &FSMC_Bank1E_Src;
//FSMC_Bank2_3_TypeDef FSMC_Bank2_3_Src;		FSMC_Bank2_3_TypeDef *FSMC_Bank2_3 = &FSMC_Bank2_3_Src;
//FSMC_Bank4_TypeDef FSMC_Bank4_Src;			FSMC_Bank4_TypeDef *FSMC_Bank4 = &FSMC_Bank4_Src;
//DBGMCU_TypeDef DBGMCU_Src;					DBGMCU_TypeDef *DBGMCU = &DBGMCU_Src;
//USB_OTG_GlobalTypeDef USB_OTG_FS_Src;		USB_OTG_GlobalTypeDef *USB_OTG_FS = &USB_OTG_FS_Src;
//USB_OTG_GlobalTypeDef USB_OTG_HS_Src;		USB_OTG_GlobalTypeDef *USB_OTG_HS = &USB_OTG_HS_Src;


// Структуры регистров ядра
//SCnSCB_Type SCnSCB_Src;					SCnSCB_Type *SCnSCB = &SCnSCB_Src;
//SCB_Type SCB_Src;						SCB_Type *SCB = &SCB_Src;
//SysTick_Type SysTick_Src;				SysTick_Type *SysTick = &SysTick_Src;
//NVIC_Type NVIC_Src;						NVIC_Type *NVIC = &NVIC_Src;
//ITM_Type ITM_Src;						ITM_Type *ITM = &ITM_Src;
//DWT_Type DWT_Src;						DWT_Type *DWT = &DWT_Src;
//TPI_Type TPI_Src;						TPI_Type *TPI = &TPI_Src;
//CoreDebug_Type CoreDebug_Src;			CoreDebug_Type *CoreDebug = &CoreDebug_Src;
//
//MPU_Type MPU_Src;						MPU_Type *MPU = &MPU_Src;
//FPU_Type FPU_Src;			            FPU_Type *FPU = &FPU_Src;
