Prusa MINI Firmware overview
|
◆ HAL_UART_Init()
◆ HAL_HalfDuplex_Init()
◆ HAL_LIN_Init()
◆ HAL_MultiProcessor_Init()
◆ HAL_UART_DeInit()
◆ HAL_UART_MspInit()
UART MSP Initialization This function configures the hardware resources used in this example.
- Parameters
-
- Return values
-
USART1 GPIO Configuration PB6 ---—> USART1_TX PB7 ---—> USART1_RX
USART2 GPIO Configuration PD5 ---—> USART2_TX PD6 ---—> USART2_RX
USART6 GPIO Configuration PC6 ---—> USART6_TX PC7 ---—> USART6_RX
569 GPIO_InitStruct.
Alternate = GPIO_AF7_USART1;
593 }
else if (huart->
Instance == USART2) {
600 __HAL_RCC_GPIOD_CLK_ENABLE();
609 GPIO_InitStruct.
Alternate = GPIO_AF7_USART2;
633 }
else if (huart->
Instance == USART6) {
649 GPIO_InitStruct.
Alternate = GPIO_AF8_USART6;
◆ HAL_UART_MspDeInit()
UART MSP De-Initialization This function freeze the hardware resources used in this example.
- Parameters
-
- Return values
-
USART1 GPIO Configuration PB6 ---—> USART1_TX PB7 ---—> USART1_RX
USART2 GPIO Configuration PD5 ---—> USART2_TX PD6 ---—> USART2_RX
USART6 GPIO Configuration PC6 ---—> USART6_TX PC7 ---—> USART6_RX
703 }
else if (huart->
Instance == USART2) {
721 }
else if (huart->
Instance == USART6) {
uint32_t PeriphDataAlignment
Definition: stm32f4xx_hal_dma.h:80
#define GPIO_PIN_6
Definition: stm32f4xx_hal_gpio.h:108
#define GPIO_MODE_AF_PP
Definition: stm32f4xx_hal_gpio.h:138
HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
uint32_t PeriphInc
Definition: stm32f4xx_hal_dma.h:74
#define __HAL_RCC_USART6_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:639
uint32_t FIFOMode
Definition: stm32f4xx_hal_dma.h:94
Definition: stm32f4xx_hal_def.h:57
DMA_Stream_TypeDef * Instance
Definition: stm32f4xx_hal_dma.h:157
uint32_t Mode
Definition: stm32f4xx_hal_gpio.h:68
#define __HAL_RCC_GPIOB_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:409
uint32_t Alternate
Definition: stm32f4xx_hal_gpio.h:77
uint32_t Pull
Definition: stm32f4xx_hal_gpio.h:71
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
DMA_InitTypeDef Init
Definition: stm32f4xx_hal_dma.h:159
DMA_HandleTypeDef hdma_usart2_rx
Definition: main.c:94
uint32_t Direction
Definition: stm32f4xx_hal_dma.h:70
uint32_t Priority
Definition: stm32f4xx_hal_dma.h:91
#define DMA_PINC_DISABLE
Definition: stm32f4xx_hal_dma.h:256
#define TX1_Pin
Definition: main.h:193
#define GPIO_PULLUP
Definition: stm32f4xx_hal_gpio.h:171
DMA_HandleTypeDef hdma_usart6_rx
Definition: main.c:95
#define DMA_MINC_ENABLE
Definition: stm32f4xx_hal_dma.h:265
uint32_t MemInc
Definition: stm32f4xx_hal_dma.h:77
#define __HAL_RCC_USART6_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:594
#define DMA_CIRCULAR
Definition: stm32f4xx_hal_dma.h:298
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
uint32_t Channel
Definition: stm32f4xx_hal_dma.h:67
USART_TypeDef * Instance
Definition: stm32f4xx_hal_uart.h:160
#define RX1_Pin
Definition: main.h:195
#define GPIO_SPEED_FREQ_VERY_HIGH
Definition: stm32f4xx_hal_gpio.h:161
uint32_t Mode
Definition: stm32f4xx_hal_dma.h:86
#define ESP_RX_Pin
Definition: main.h:153
#define DMA_MDATAALIGN_BYTE
Definition: stm32f4xx_hal_dma.h:286
#define DMA_FIFOMODE_DISABLE
Definition: stm32f4xx_hal_dma.h:320
#define DMA_CHANNEL_5
Definition: stm32f4xx_hal_dma.h:223
#define __HAL_RCC_USART1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:587
#define __HAL_RCC_GPIOC_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:416
#define GPIO_PIN_5
Definition: stm32f4xx_hal_gpio.h:107
void Error_Handler(void)
This function is executed in case of error occurrence.
Definition: main.c:1057
#define DMA_PERIPH_TO_MEMORY
Definition: stm32f4xx_hal_dma.h:244
uint32_t Pin
Definition: stm32f4xx_hal_gpio.h:65
uint32_t Speed
Definition: stm32f4xx_hal_gpio.h:74
#define DMA_PRIORITY_LOW
Definition: stm32f4xx_hal_dma.h:308
#define ESP_TX_Pin
Definition: main.h:151
#define __HAL_RCC_USART2_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:539
#define DMA_NORMAL
Definition: stm32f4xx_hal_dma.h:297
#define DMA_PDATAALIGN_BYTE
Definition: stm32f4xx_hal_dma.h:275
DMA_HandleTypeDef hdma_usart1_rx
Definition: main.c:93
#define DMA_CHANNEL_4
Definition: stm32f4xx_hal_dma.h:222
uint32_t MemDataAlignment
Definition: stm32f4xx_hal_dma.h:83
#define __HAL_RCC_USART2_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:507
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__)
Definition: stm32f4xx_hal_def.h:81
DMA_HandleTypeDef * hdmarx
Definition: stm32f4xx_hal_uart.h:178
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
#define __HAL_RCC_USART1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:638
GPIO Init structure definition.
Definition: stm32f4xx_hal_gpio.h:63