forked from Imagelibrary/rtems
mips/rbtx4925: Fix warnings
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* This file contains the RBTX4925 console IO package.
|
* This file contains the RBTX4925 console IO package.
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
* Author: Craig Lebakken <craigl@transition.com>
|
* Author: Craig Lebakken <craigl@transition.com>
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1996 by Transition Networks Inc.
|
* COPYRIGHT (c) 1996 by Transition Networks Inc.
|
||||||
@@ -26,16 +28,6 @@
|
|||||||
* http://www.rtems.org/license/LICENSE.
|
* http://www.rtems.org/license/LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Rather than deleting this, it is commented out to (hopefully) help
|
|
||||||
* the submitter send updates.
|
|
||||||
*
|
|
||||||
* static char _sccsid[] = "@(#)console.c 08/20/96 1.6\n";
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
#include <rtems/libio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -44,18 +36,10 @@
|
|||||||
int mon_read(int fd, char *buf, int cnt); /* stdin is fd=0 */
|
int mon_read(int fd, char *buf, int cnt); /* stdin is fd=0 */
|
||||||
int mon_write(int fd, char *buf, int cnt); /* stdout is fd=1 */
|
int mon_write(int fd, char *buf, int cnt); /* stdout is fd=1 */
|
||||||
|
|
||||||
|
|
||||||
/* console_initialize
|
/* console_initialize
|
||||||
*
|
*
|
||||||
* This routine initializes the console IO driver.
|
* This routine initializes the console IO driver.
|
||||||
*
|
|
||||||
* Input parameters: NONE
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*
|
|
||||||
* Return values:
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_initialize(
|
rtems_device_driver console_initialize(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
@@ -76,41 +60,14 @@ rtems_device_driver console_initialize(
|
|||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* is_character_ready
|
|
||||||
*
|
|
||||||
* This routine returns TRUE if a character is available.
|
|
||||||
*
|
|
||||||
* Input parameters: NONE
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*
|
|
||||||
* Return values:
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool is_character_ready(
|
|
||||||
char *ch
|
|
||||||
)
|
|
||||||
{
|
|
||||||
*ch = '\0'; /* return NULL for no particular reason */
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* inbyte
|
/* inbyte
|
||||||
*
|
*
|
||||||
* This routine reads a character from the SOURCE.
|
* This routine reads a character from the SOURCE.
|
||||||
*
|
|
||||||
* Input parameters: NONE
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*
|
|
||||||
* Return values:
|
|
||||||
* character read from SOURCE
|
|
||||||
*/
|
*/
|
||||||
|
static char inbyte( void )
|
||||||
char inbyte( void )
|
|
||||||
{
|
{
|
||||||
char buf[10];
|
char buf[10];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If polling, wait until a character is available.
|
* If polling, wait until a character is available.
|
||||||
*/
|
*/
|
||||||
@@ -124,18 +81,13 @@ char inbyte( void )
|
|||||||
*
|
*
|
||||||
* This routine transmits a character out the SOURCE. It may support
|
* This routine transmits a character out the SOURCE. It may support
|
||||||
* XON/XOFF flow control.
|
* XON/XOFF flow control.
|
||||||
*
|
|
||||||
* Input parameters:
|
|
||||||
* ch - character to be transmitted
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*/
|
*/
|
||||||
|
static void outbyte(
|
||||||
void outbyte(
|
|
||||||
char ch
|
char ch
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
char buf[10];
|
char buf[10];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If polling, wait for the transmitter to be ready.
|
* If polling, wait for the transmitter to be ready.
|
||||||
* Check for flow control requests and process.
|
* Check for flow control requests and process.
|
||||||
@@ -146,48 +98,33 @@ void outbyte(
|
|||||||
mon_write( 1, buf, 1 ); /* stdout is fd=1, write 1 byte */
|
mon_write( 1, buf, 1 ); /* stdout is fd=1, write 1 byte */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int console_fd = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open entry point
|
* Open entry point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_open(
|
rtems_device_driver console_open(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
int console_fd = open("tty0", 2); /* open for read/write */
|
|
||||||
#endif
|
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close entry point
|
* Close entry point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_close(
|
rtems_device_driver console_close(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if ( console_fd )
|
|
||||||
close( console_fd );
|
|
||||||
#endif
|
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* read bytes from the serial port. We only have stdin.
|
* read bytes from the serial port. We only have stdin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_read(
|
rtems_device_driver console_read(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
@@ -219,7 +156,6 @@ rtems_device_driver console_read(
|
|||||||
/*
|
/*
|
||||||
* write bytes to the serial port. Stdout and stderr are the same.
|
* write bytes to the serial port. Stdout and stderr are the same.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_write(
|
rtems_device_driver console_write(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
@@ -250,7 +186,6 @@ rtems_device_driver console_write(
|
|||||||
/*
|
/*
|
||||||
* IO Control entry point
|
* IO Control entry point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_device_driver console_control(
|
rtems_device_driver console_control(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
@@ -260,10 +195,9 @@ rtems_device_driver console_control(
|
|||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include <rtems/bspIo.h>
|
#include <rtems/bspIo.h>
|
||||||
|
|
||||||
void RBTX4925_output_char(char c) { outbyte( c ); }
|
static void RBTX4925_output_char(char c) { outbyte( c ); }
|
||||||
|
|
||||||
BSP_output_char_function_type BSP_output_char = RBTX4925_output_char;
|
BSP_output_char_function_type BSP_output_char = RBTX4925_output_char;
|
||||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#ifndef _BSP_H
|
#ifndef _BSP_H
|
||||||
#define _BSP_H
|
#define _BSP_H
|
||||||
|
|
||||||
|
#ifndef ASM
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -32,8 +34,16 @@ extern "C" {
|
|||||||
#define BSP_FEATURE_IRQ_EXTENSION
|
#define BSP_FEATURE_IRQ_EXTENSION
|
||||||
#define BSP_SHARED_HANDLER_SUPPORT 1
|
#define BSP_SHARED_HANDLER_SUPPORT 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prototypes for methods called from .S for dependency tracking
|
||||||
|
*/
|
||||||
|
void init_tlb(void);
|
||||||
|
void resettlb(int i);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* !ASM */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ LICENSED MATERIAL - PROGRAM PROPERTY OF IDT
|
|||||||
#include <rtems/mips/idtcpu.h>
|
#include <rtems/mips/idtcpu.h>
|
||||||
#include <rtems/asm.h>
|
#include <rtems/asm.h>
|
||||||
|
|
||||||
|
#include <bsp.h>
|
||||||
|
|
||||||
.extern mon_flush_cache
|
.extern mon_flush_cache
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* inittlb.c
|
* inittlb.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <bsp.h>
|
||||||
#include <rtems/mips/idtcpu.h>
|
#include <rtems/mips/idtcpu.h>
|
||||||
|
|
||||||
extern void resettlb( int i );
|
extern void resettlb( int i );
|
||||||
|
|||||||
Reference in New Issue
Block a user