forked from Imagelibrary/rtems
Added console_reserve_resources.
This commit is contained in:
@@ -19,10 +19,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#undef CONSOLE_USE_POLLED
|
|
||||||
#define CONSOLE_USE_INTERRUPTS
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Should we use a polled or interrupt drived console?
|
* Should we use a polled or interrupt drived console?
|
||||||
*
|
*
|
||||||
@@ -368,15 +364,22 @@ int console_write_support (int minor, char *buf, int len)
|
|||||||
|
|
||||||
while (nwrite < len) {
|
while (nwrite < len) {
|
||||||
#if defined(CONSOLE_USE_INTERRUPTS)
|
#if defined(CONSOLE_USE_INTERRUPTS)
|
||||||
console_outbyte_polled( minor, *buf++ );
|
|
||||||
#else
|
|
||||||
console_outbyte_interrupt( minor, *buf++ );
|
console_outbyte_interrupt( minor, *buf++ );
|
||||||
|
#else
|
||||||
|
console_outbyte_polled( minor, *buf++ );
|
||||||
#endif
|
#endif
|
||||||
nwrite++;
|
nwrite++;
|
||||||
}
|
}
|
||||||
return nwrite;
|
return nwrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void console_reserve_resources(
|
||||||
|
rtems_configuration_table *configuration
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_termios_reserve_resources( configuration, 2 );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Console Device Driver Entry Points
|
* Console Device Driver Entry Points
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -323,6 +323,12 @@ void bsp_start( void )
|
|||||||
|
|
||||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Account for the console's resources
|
||||||
|
*/
|
||||||
|
|
||||||
|
console_reserve_resources( &BSP_Configuration );
|
||||||
|
|
||||||
#ifdef RTEMS_NEWLIB
|
#ifdef RTEMS_NEWLIB
|
||||||
/*
|
/*
|
||||||
* Add 1 extension for newlib libc
|
* Add 1 extension for newlib libc
|
||||||
|
|||||||
Reference in New Issue
Block a user