RTEMS
5.0.0
|
Extension of the generic libchip console driver shell. More...
#include <bsp.h>
#include <bsp/fatal.h>
#include <rtems/libio.h>
#include <rtems/console.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <termios.h>
#include <rtems/termiostypes.h>
#include <libchip/serial.h>
#include "legacy-console.h"
Functions | |
console_tbl * | console_find_console_entry (const char *match, size_t length, rtems_device_minor_number *match_minor) |
console_find_console_entry More... | |
void | console_initialize_data (void) |
console_initialize_data More... | |
void | console_register_devices (console_tbl *new_ports, size_t number_of_ports) |
console_register_devices More... | |
rtems_device_driver | console_open (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Console open entry point. More... | |
rtems_device_driver | console_close (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Console close entry point. More... | |
rtems_device_driver | console_initialize (rtems_device_major_number major, rtems_device_minor_number minor_arg, void *arg) |
Console initialization entry point. More... | |
rtems_device_driver | console_read (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Console read entry point. More... | |
rtems_device_driver | console_write (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Console write entry point. More... | |
Variables | |
unsigned long | Console_Port_Count = 0 |
console_tbl ** | Console_Port_Tbl = NULL |
console_data * | Console_Port_Data = NULL |
rtems_device_minor_number | Console_Port_Minor = 0 |
Extension of the generic libchip console driver shell.
rtems_device_driver console_close | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Console close entry point.
This method closes a specific device supported by the console device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
RTEMS_SUCCESSFUL | The device driver is successfully closed. |
console_tbl* console_find_console_entry | ( | const char * | match, |
size_t | length, | ||
rtems_device_minor_number * | match_minor | ||
) |
console_find_console_entry
This method is used to search the console entries for a specific device entry and return it. If match is NULL the minor number provided is matched.
rtems_device_driver console_initialize | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor_arg, | ||
void * | arg | ||
) |
Console initialization entry point.
This method initializes the console device driver.
[in] | major | is the device driver major number. |
[in] | minor | is the device driver minor number. |
[in] | arg | is the parameters to this call. |
RTEMS_SUCCESSFUL | The device driver is successfully initialized. |
Console initialization entry point.
Initialize all serial drivers specified in driver_context_table
[in] | major | |
[in] | minor | |
[in] | arg |
RTEMS_SUCCESSFUL | Initialization completed |
This routine initializes the console IO driver.
Parameters
major | major number |
minor | minor number |
Output parameters: NONE
void console_initialize_data | ( | void | ) |
console_initialize_data
This must be called before dynamic registration of devices can occur. It is normally called as a side-effect of console_initialize() but if a probe and dynamic registration occurs before that, then this method should be explicitly invoked.
rtems_device_driver console_open | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Console open entry point.
This method opens a specific device supported by the console device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
RTEMS_SUCCESSFUL | The device driver is successfully opened. |
rtems_device_driver console_read | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Console read entry point.
This method reads from a specific device supported by the console device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
RTEMS_SUCCESSFUL | The device is successfully read from. |
void console_register_devices | ( | console_tbl * | new_ports, |
size_t | number_of_ports | ||
) |
console_register_devices
This function expands the console table to include previous ports and the array of new ports specified.
[in] | new_ports | specifies an array of new ports to register |
[in] | number_of_ports | specifies the number of elements in the new_ports array |
rtems_device_driver console_write | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Console write entry point.
This method writes to a specific device supported by the console device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
RTEMS_SUCCESSFUL | The device is successfully written. |
unsigned long Console_Port_Count = 0 |
This is the number of serial ports defined in the Console_Port_Tbl.
console_data* Console_Port_Data = NULL |
This is an array of per port information.
console_tbl** Console_Port_Tbl = NULL |
This is a dynamically sized set of tables containing the serial port information.