stm32f103-template/applications/main.c

69 lines
1.3 KiB
C

/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
// UART_HandleTypeDef huart4;
/* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1)
int main(void)
{
// MX_UART4_Init();
printf("Hello world!\n");
while (1)
{
/* code */
}
return RT_EOK;
}
// /**
// * @brief UART4 Initialization Function
// * @param None
// * @retval None
// */
// static void MX_UART4_Init(void)
// {
// /* USER CODE BEGIN UART4_Init 0 */
// /* USER CODE END UART4_Init 0 */
// /* USER CODE BEGIN UART4_Init 1 */
// /* USER CODE END UART4_Init 1 */
// huart4.Instance = UART4;
// huart4.Init.BaudRate = 115200;
// huart4.Init.WordLength = UART_WORDLENGTH_8B;
// huart4.Init.StopBits = UART_STOPBITS_1;
// huart4.Init.Parity = UART_PARITY_NONE;
// huart4.Init.Mode = UART_MODE_TX_RX;
// huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE;
// huart4.Init.OverSampling = UART_OVERSAMPLING_16;
// if (HAL_UART_Init(&huart4) != HAL_OK)
// {
// Error_Handler();
// }
// /* USER CODE BEGIN UART4_Init 2 */
// /* USER CODE END UART4_Init 2 */
// }