libbsp/lm32/shared: Fix warnings

This commit is contained in:
Joel Sherrill
2014-10-12 14:00:53 -05:00
parent 5039d92c5d
commit 11c1657a29
2 changed files with 11 additions and 53 deletions

View File

@@ -1,7 +1,8 @@
/* ckinit.c /*
*
* Clock device driver for Lattice Mico32 (lm32). * Clock device driver for Lattice Mico32 (lm32).
* */
/*
* COPYRIGHT (c) 1989-2009. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
@@ -36,7 +37,6 @@ static inline void clockwrite(unsigned int reg, int value)
* The interrupt vector number associated with the clock tick device * The interrupt vector number associated with the clock tick device
* driver. * driver.
*/ */
#define CLOCK_VECTOR ( TIMER0_IRQ ) #define CLOCK_VECTOR ( TIMER0_IRQ )
#define CLOCK_IRQMASK ( 1 << CLOCK_VECTOR ) #define CLOCK_IRQMASK ( 1 << CLOCK_VECTOR )
@@ -52,7 +52,7 @@ static inline void clockwrite(unsigned int reg, int value)
_old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \ _old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \
} while (0) } while (0)
void Clock_driver_support_initialize_hardware(void) static void Clock_driver_support_initialize_hardware(void)
{ {
/* Set clock period */ /* Set clock period */
clockwrite(LM32_CLOCK_PERIOD, clockwrite(LM32_CLOCK_PERIOD,
@@ -67,7 +67,7 @@ void Clock_driver_support_initialize_hardware(void)
lm32_interrupt_unmask(CLOCK_IRQMASK); lm32_interrupt_unmask(CLOCK_IRQMASK);
} }
void Clock_driver_support_shutdown_hardware(void) static void Clock_driver_support_shutdown_hardware(void)
{ {
/* Disable clock interrupts and stop */ /* Disable clock interrupts and stop */

View File

@@ -1,6 +1,8 @@
/* /*
* Console driver for Lattice Mico32 (lm32). * Console driver for Lattice Mico32 (lm32).
* */
/*
* COPYRIGHT (c) 1989-1999. * COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
@@ -25,14 +27,7 @@ char BSP_uart_is_character_ready(char *ch);
/* 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,
@@ -55,37 +50,11 @@ 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
)
{
return BSP_uart_is_character_ready(ch);
}
/* 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 int inbyte( void )
int inbyte( void )
{ {
/* /*
* If polling, wait until a character is available. * If polling, wait until a character is available.
@@ -98,14 +67,8 @@ int 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
) )
{ {
@@ -121,7 +84,6 @@ void outbyte(
/* /*
* 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,
@@ -134,7 +96,6 @@ rtems_device_driver console_open(
/* /*
* 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,
@@ -147,7 +108,6 @@ rtems_device_driver console_close(
/* /*
* 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,
@@ -179,7 +139,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,
@@ -210,7 +169,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,