001package com.pi4j.io.serial;
002
003/*
004 * #%L
005 * **********************************************************************
006 * ORGANIZATION  :  Pi4J
007 * PROJECT       :  Pi4J :: Java Library (Core)
008 * FILENAME      :  OdroidSerial.java
009 *
010 * This file is part of the Pi4J project. More information about
011 * this project can be found here:  http://www.pi4j.com/
012 * **********************************************************************
013 * %%
014 * Copyright (C) 2012 - 2016 Pi4J
015 * %%
016 * This program is free software: you can redistribute it and/or modify
017 * it under the terms of the GNU Lesser General Public License as
018 * published by the Free Software Foundation, either version 3 of the
019 * License, or (at your option) any later version.
020 *
021 * This program is distributed in the hope that it will be useful,
022 * but WITHOUT ANY WARRANTY; without even the implied warranty of
023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
024 * GNU General Lesser Public License for more details.
025 *
026 * You should have received a copy of the GNU General Lesser Public
027 * License along with this program.  If not, see
028 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
029 * #L%
030 */
031
032/**
033 * This class simply exposed the available UART/serial port
034 * address (device file paths) that are exposed on the Odroid C1/C1+/C2.
035 *
036 * SEE: http://odroid.com/dokuwiki/doku.php?id=en:c1_hardware_uart
037 */
038public class OdroidSerial {
039
040    // SEE:  http://odroid.com/dokuwiki/doku.php?id=en:c1_hardware_uart  (C1, C1+)
041    //       http://odroid.com/dokuwiki/doku.php?id=en:c2_hardware_uart  (C2)
042    //       http://odroid.com/dokuwiki/doku.php?id=en:xu3_hardware_uart (XU3)
043    //       http://odroid.com/dokuwiki/doku.php?id=en:xu3_hardware_uart (XU4)
044
045    // (UART0)  SUPPORTED BY: C1, C1+, C2
046    // this com port is exposed on the CON5 header and is typically
047    // configured for terminal access to the operating system
048    // - TX is located at CON5-2
049    // - RX is located at CON5-3
050    public static final String UART0_COM_PORT_C = "/dev/ttyS0";
051    public static final String CON5_COM_PORT_C = UART0_COM_PORT_C;
052
053    // (UART1)  SUPPORTED BY: C2
054    // this com port is exposed on the CON6 header
055    // - TX is located at 40-pin GPIO header, pin #8
056    // - RX is located at 40-pin GPIO header, pin #10
057    public static final String UART1_COM_PORT_C2 = "/dev/ttyS1";
058    public static final String DEFAULT_COM_PORT_C2 = UART1_COM_PORT_C2;
059
060    // (UART2)  SUPPORTED BY: C1, C1+
061    // this com port is exposed on the CON6 header
062    // - TX is located at 40-pin GPIO header, pin #8
063    // - RX is located at 40-pin GPIO header, pin #10
064    public static final String UART2_COM_PORT_C1 = "/dev/ttyS2";
065    public static final String DEFAULT_COM_PORT_C1 = UART2_COM_PORT_C1;
066
067
068    // (UART0)  SUPPORTED BY: XU3, XU4
069    // this com port is exposed on the CON6 header
070    // - RX is located at CON10, pin #6
071    // - TX is located at CON10, pin #8
072    public static final String UART0_COM_PORT_XU = "/dev/ttySAC0";
073    public static final String DEFAULT_COM_PORT_XU = UART0_COM_PORT_XU;
074}