RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Functions | Variables
tms570-sci.c File Reference

This source file contains the Console Driver implementation using the Serial Communication Interface (SCI). More...

#include <bspopts.h>
#include <termios.h>
#include <rtems/termiostypes.h>
#include <bsp/tms570-sci-driver.h>
#include <rtems/console.h>
#include <bsp.h>
#include <bsp/fatal.h>
#include <bsp/irq.h>

Functions

void tms570_sci_initialize (tms570_sci_context *ctx)
 
rtems_device_driver console_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
 Serial drivers init function.
 
bool tms570_sci_set_attributes (rtems_termios_device_context *base, const struct termios *t)
 Set attributes of the HW peripheral.
 

Variables

tms570_sci_context driver_context_table []
 Table including all serial drivers.
 
const rtems_termios_device_handler tms570_sci_handler_polled
 Struct containing definitions of polled driver functions.
 
const rtems_termios_device_handler tms570_sci_handler_interrupt
 Struct containing definitions of interrupt driven driver functions.
 

Detailed Description

This source file contains the Console Driver implementation using the Serial Communication Interface (SCI).

Function Documentation

◆ console_initialize()

rtems_device_driver console_initialize ( rtems_device_major_number  major,
rtems_device_minor_number  minor,
void *  arg 
)

Serial drivers init function.

Console initialization entry point.

Initialize all serial drivers specified in driver_context_table

Parameters
[in]major
[in]minor
[in]arg
Return values
RTEMS_SUCCESSFULInitialization completed

◆ tms570_sci_set_attributes()

bool tms570_sci_set_attributes ( rtems_termios_device_context base,
const struct termios *  t 
)

Set attributes of the HW peripheral.

Sets attributes of the HW peripheral (parity, baud rate, etc.)

Parameters
[in]basecontext of the driver
[in]ttermios driver
Return values
trueperipheral setting is changed

Variable Documentation

◆ driver_context_table

tms570_sci_context driver_context_table[]
Initial value:
= {
{
.device_name = "/dev/console",
.regs = (volatile tms570_sci_t *) &TMS570_LIN,
.irq = TMS570_IRQ_SCI_LEVEL_0,
},
{
.device_name = "/dev/ttyS1",
.regs = &TMS570_SCI,
.irq = TMS570_IRQ_SCI2_LEVEL_0,
}
}
Definition: reg_sci.h:54
#define RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER(name)
Initializer for static initialization of Termios device contexts.
Definition: termiosdevice.h:257

Table including all serial drivers.

Definitions of all serial drivers

◆ tms570_sci_handler_interrupt

const rtems_termios_device_handler tms570_sci_handler_interrupt
Initial value:
= {
.first_open = tms570_sci_interrupt_first_open,
.last_close = tms570_sci_interrupt_last_close,
.poll_read = NULL,
.write = tms570_sci_interrupt_write,
.set_attributes = tms570_sci_set_attributes,
.mode = TERMIOS_IRQ_DRIVEN
}
bool tms570_sci_set_attributes(rtems_termios_device_context *base, const struct termios *t)
Set attributes of the HW peripheral.
Definition: tms570-sci.c:232

Struct containing definitions of interrupt driven driver functions.

Encapsulates interrupt driven driver functions. Use of this table is determited by defining TMS570_USE_INTERRUPTS

◆ tms570_sci_handler_polled

const rtems_termios_device_handler tms570_sci_handler_polled
Initial value:
= {
.first_open = tms570_sci_poll_first_open,
.last_close = tms570_sci_poll_last_close,
.poll_read = tms570_sci_poll_read,
.write = tms570_sci_poll_write,
.set_attributes = tms570_sci_set_attributes,
.mode = TERMIOS_POLLED
}

Struct containing definitions of polled driver functions.

Encapsulates polled driver functions. Use of this table is determited by not defining TMS570_USE_INTERRUPTS