forked from Imagelibrary/rtems
bsp/mpc55xx: PR2077: Add BSP_DEFAULT_BAUD_RATE
This commit is contained in:
committed by
Sebastian Huber
parent
6527d879b7
commit
52c8df84ca
@@ -44,6 +44,10 @@ RTEMS_BSPOPTS_SET([MPC55XX_CONSOLE_MINOR],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([MPC55XX_CONSOLE_MINOR],
|
||||
[determines which serial device will be registered as /dev/console])
|
||||
|
||||
RTEMS_BSPOPTS_SET([BSP_DEFAULT_BAUD_RATE],[*],[115200])
|
||||
RTEMS_BSPOPTS_HELP([BSP_DEFAULT_BAUD_RATE],
|
||||
[default console baud])
|
||||
|
||||
RTEMS_BSPOPTS_SET([MPC55XX_ESCI_USE_INTERRUPTS],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([MPC55XX_ESCI_USE_INTERRUPTS],
|
||||
[define to zero or one to disable or enable interrupts for the eSCI devices])
|
||||
|
||||
@@ -266,7 +266,7 @@ static int mpc55xx_esci_first_open(int major, int minor, void *arg)
|
||||
|
||||
self->tty = tty;
|
||||
|
||||
rv = rtems_termios_set_initial_baud(tty, 115200);
|
||||
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
||||
if (rv != 0) {
|
||||
rtems_fatal_error_occurred(0xdeadbeef);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,15 @@
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/console-generic.h>
|
||||
|
||||
#include <rtems/console.h>
|
||||
|
||||
static const struct termios console_generic_termios = {
|
||||
.c_cflag = CS8 | CREAD | CLOCAL | B115200
|
||||
.c_cflag = CS8 | CREAD | CLOCAL | __CONCAT(B, BSP_DEFAULT_BAUD_RATE)
|
||||
};
|
||||
|
||||
static void console_generic_char_out(char c)
|
||||
|
||||
@@ -259,7 +259,7 @@ static int mpc55xx_linflex_first_open(int major, int minor, void *arg)
|
||||
pcr.B.PA = self->tx_pa_value;
|
||||
self->tx_pcr_register->R = pcr.R;
|
||||
|
||||
rv = rtems_termios_set_initial_baud(tty, 115200);
|
||||
rv = rtems_termios_set_initial_baud(tty, BSP_DEFAULT_BAUD_RATE);
|
||||
if (rv != 0) {
|
||||
rtems_fatal_error_occurred(0xdeadbeef);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user