Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:53

0001 /*
0002  *  Console declarations
0003  *
0004  *
0005  *  MPC5xx port sponsored by Defence Research and Development Canada - Suffield
0006  *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
0007  *
0008  *  The license and distribution terms for this file may be
0009  *  found in the file LICENSE in this distribution or at
0010  *  http://www.rtems.org/license/LICENSE.
0011  */
0012 
0013 #ifndef _MPC5XX_CONSOLE_H
0014 #define _MPC5XX_CONSOLE_H
0015 
0016 #include <rtems/libio.h>
0017 #include <rtems/termiostypes.h>
0018 
0019 void m5xx_uart_initialize(int minor);
0020 
0021 /* Termios callbacks */
0022 int m5xx_uart_firstOpen(int maj, int min, void *arg);
0023 int m5xx_uart_lastClose(int maj, int min, void *arg);
0024 int m5xx_uart_pollRead(int minor);
0025 ssize_t m5xx_uart_pollWrite(int minor, const char* buf, size_t len);
0026 ssize_t m5xx_uart_write    (int minor, const char *buf, size_t len);
0027 int m5xx_uart_setAttributes(int, const struct termios* t);
0028 
0029 #define NUM_PORTS   2   /* number of serial ports */
0030 
0031 #define SCI1_MINOR  0
0032 #define SCI2_MINOR  1
0033 
0034 #endif /* _MPC5XX_CONSOLE_H */