1、【完善】STM32F10X 裸机 Demo 。

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink
2016-12-27 19:05:10 +08:00
parent cc1c291aa5
commit 711a7998af
4 changed files with 7 additions and 8 deletions
@@ -7,6 +7,7 @@
#include <bsp.h>
#include <stdio.h>
#include <cm_backtrace.h>
/*
*********************************************************************************************************
@@ -88,8 +89,6 @@ static void GPIO_Configuration(void)
GPIO_Init(GPIOF, &GPIO_InitStructure);
GPIO_Init(GPIOG, &GPIO_InitStructure);
/******************system run led*******************/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
@@ -147,7 +146,6 @@ int fgetc(FILE *f)
while(!(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == SET))
{
}
return (USART_ReceiveData(USART1));
}
@@ -157,6 +155,7 @@ void assert_failed(u8* file, u32 line)
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
cm_backtrace_assert(__get_SP());
printf("assert failed at %s:%d \n", file, line);
while (1) {
}