1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-26 15:54:15 +01:00

Added debugging port buffer handling.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@297 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
gussy 2010-03-13 15:37:00 +00:00 committed by gussy
parent 50215e75c6
commit 7863954f1a
2 changed files with 5 additions and 1 deletions

View File

@ -224,6 +224,8 @@ int32_t PIOS_COM_SendFormattedString(COMPortTypeDef port, char *format, ...)
uint8_t PIOS_COM_ReceiveBuffer(COMPortTypeDef port)
{
switch(port) {
case COM_DEBUG_USART:
return PIOS_USART_RxBufferGet(PIOS_COM_DEBUG_PORT);
case COM_USART1:
return PIOS_USART_RxBufferGet(USART_1);
case COM_USART2:
@ -246,6 +248,8 @@ uint8_t PIOS_COM_ReceiveBuffer(COMPortTypeDef port)
int32_t PIOS_COM_ReceiveBufferUsed(COMPortTypeDef port)
{
switch(port) {
case COM_DEBUG_USART:
return PIOS_USART_RxBufferUsed(PIOS_COM_DEBUG_PORT);
case COM_USART1:
return PIOS_USART_RxBufferUsed(USART_1);
case COM_USART2:

View File

@ -44,7 +44,7 @@
#include "stm32f10x_spi.h"
#include "stm32f10x_tim.h"
#include "stm32f10x_usart.h"
/* #include "stm32f10x_wwdg.h" */
#include "stm32f10x_wwdg.h"
#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
/* Exported types ------------------------------------------------------------*/