mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-21 00:27:19 +08:00
[BSP] Update bsp code
1. Use RT_USING_LIBC instead of RT_USING_NEWLIB in the beagonebone. 2. Enable LIBC in default in LPC4088. 3. Remove the unnecessary interrupt clean in STM32 UART; 4. Use HSE_VALUE to calculate PLL_M in STM32F2/F4;
This commit is contained in:
parent
677d5323e8
commit
7962a5c46c
@ -122,8 +122,8 @@
|
||||
// </section>
|
||||
|
||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
||||
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
|
||||
//#define RT_USING_NEWLIB
|
||||
// <bool name="RT_USING_LIBC" description="Using C library" default="true" />
|
||||
#define RT_USING_LIBC
|
||||
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
|
||||
#define RT_USING_PTHREADS
|
||||
// </section>
|
||||
|
@ -105,7 +105,7 @@
|
||||
|
||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
||||
// <bool name="RT_USING_LIBC" description="Using C library" default="true" />
|
||||
// #define RT_USING_LIBC
|
||||
#define RT_USING_LIBC
|
||||
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
|
||||
#define RT_USING_PTHREADS
|
||||
// </section>
|
||||
|
@ -152,8 +152,6 @@ void USART1_IRQHandler(void)
|
||||
if(USART_GetITStatus(uart->uart_device, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
rt_hw_serial_isr(&serial1, RT_SERIAL_EVENT_RX_IND);
|
||||
/* clear interrupt */
|
||||
USART_ClearITPendingBit(uart->uart_device, USART_IT_RXNE);
|
||||
}
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_TC) != RESET)
|
||||
{
|
||||
@ -186,8 +184,6 @@ void USART2_IRQHandler(void)
|
||||
if(USART_GetITStatus(uart->uart_device, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
rt_hw_serial_isr(&serial2, RT_SERIAL_EVENT_RX_IND);
|
||||
/* clear interrupt */
|
||||
USART_ClearITPendingBit(uart->uart_device, USART_IT_RXNE);
|
||||
}
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_TC) != RESET)
|
||||
{
|
||||
|
@ -142,7 +142,7 @@
|
||||
|
||||
|
||||
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
|
||||
#define PLL_M 25
|
||||
#define PLL_M (HSE_VALUE / 1000000)
|
||||
#define PLL_N 240
|
||||
|
||||
/* SYSCLK = PLL_VCO / PLL_P */
|
||||
|
@ -146,7 +146,7 @@
|
||||
|
||||
/************************* PLL Parameters *************************************/
|
||||
/* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
|
||||
#define PLL_M 25
|
||||
#define PLL_M (HSE_VALUE / 1000000)
|
||||
#define PLL_N 336
|
||||
|
||||
/* SYSCLK = PLL_VCO / PLL_P */
|
||||
|
@ -177,8 +177,6 @@ void USART1_IRQHandler(void)
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
rt_hw_serial_isr(&serial1, RT_SERIAL_EVENT_RX_IND);
|
||||
/* clear interrupt */
|
||||
USART_ClearITPendingBit(uart->uart_device, USART_IT_RXNE);
|
||||
}
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_TC) != RESET)
|
||||
{
|
||||
@ -211,8 +209,6 @@ void USART2_IRQHandler(void)
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
rt_hw_serial_isr(&serial2, RT_SERIAL_EVENT_RX_IND);
|
||||
/* clear interrupt */
|
||||
USART_ClearITPendingBit(uart->uart_device, USART_IT_RXNE);
|
||||
}
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_TC) != RESET)
|
||||
{
|
||||
@ -245,8 +241,6 @@ void USART3_IRQHandler(void)
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_RXNE) != RESET)
|
||||
{
|
||||
rt_hw_serial_isr(&serial3, RT_SERIAL_EVENT_RX_IND);
|
||||
/* clear interrupt */
|
||||
USART_ClearITPendingBit(uart->uart_device, USART_IT_RXNE);
|
||||
}
|
||||
if (USART_GetITStatus(uart->uart_device, USART_IT_TC) != RESET)
|
||||
{
|
||||
|
@ -16,6 +16,10 @@
|
||||
|
||||
#include <i386.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*******************************************************************/
|
||||
/* Timer Register */
|
||||
/*******************************************************************/
|
||||
|
@ -105,4 +105,8 @@ struct Pseudodesc {
|
||||
#define STS_IG32 0xe // 32-bit Interrupt Gate
|
||||
#define STS_TG32 0xf // 32-bit Trap Gate
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user