forked from Imagelibrary/rtems
lm32 BSP shared and lm32_evr: Fix BSPs
This commit is contained in:
@@ -76,6 +76,13 @@ rtems_isr_entry set_vector( /* returns old vector */
|
||||
int type /* RTEMS or RAW intr */
|
||||
);
|
||||
|
||||
/*
|
||||
* Prototypes for BSP methods that cross file boundaries
|
||||
*/
|
||||
void BSP_uart_polled_write(char ch);
|
||||
int BSP_uart_polled_read( void );
|
||||
char BSP_uart_is_character_ready(char *ch);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,14 +16,9 @@
|
||||
|
||||
#define NO_BSP_INIT
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
void BSP_uart_polled_write(char ch);
|
||||
int BSP_uart_polled_read( void );
|
||||
char BSP_uart_is_character_ready(char *ch);
|
||||
|
||||
/* console_initialize
|
||||
*
|
||||
* This routine initializes the console IO driver.
|
||||
@@ -59,7 +54,6 @@ static int inbyte( void )
|
||||
/*
|
||||
* If polling, wait until a character is available.
|
||||
*/
|
||||
|
||||
return BSP_uart_polled_read();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Uart driver for Lattice Mico32 (lm32) UART
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
@@ -14,6 +16,7 @@
|
||||
|
||||
#include "../include/system_conf.h"
|
||||
#include "uart.h"
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
static inline int uartread(unsigned int reg)
|
||||
@@ -51,11 +54,11 @@ void BSP_uart_polled_write(char ch)
|
||||
uartwrite(LM32_UART_RBR, ch);
|
||||
}
|
||||
|
||||
char BSP_uart_polled_read( void )
|
||||
int BSP_uart_polled_read( void )
|
||||
{
|
||||
/* Wait until there is a byte in RBR */
|
||||
while (!(uartread(LM32_UART_LSR) & LM32_UART_LSR_DR));
|
||||
return (char) uartread(LM32_UART_RBR);
|
||||
return (int) uartread(LM32_UART_RBR);
|
||||
}
|
||||
|
||||
char BSP_uart_is_character_ready(char *ch)
|
||||
|
||||
Reference in New Issue
Block a user