• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Parity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中ioio.lib.api.Uart.Parity的典型用法代码示例。如果您正苦于以下问题:Java Parity类的具体用法?Java Parity怎么用?Java Parity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Parity类属于ioio.lib.api.Uart包,在下文中一共展示了Parity类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createIOIOLooper

import ioio.lib.api.Uart.Parity; //导入依赖的package包/类
/** Creates a new connection to an Xbee device.
 *
 * This must be constructed inside a BaseIOIOLooper constructor. Example:
 *<pre>{@code {@literal @}Override
protected IOIOLooper createIOIOLooper() {
return new BaseIOIOLooper() {
{@literal @}Override
protected void setup() throws ConnectionLostException {
Xbee xbee = new Xbee(ioio_, 45, 46, 9600);
}
}
 *}</pre>
 * @param ioio The IOIO device to connect through.
 * @param rX_pin The receiver pin. Must be 3.3V tolerant and must support UART/USART connection.
 * @param tX_pin The transmitter pin. Must be 3.3V tolerant and must support UART/USART connection.
 * @param baud_rate The baud rate of the connection. Must match the baud rate of the Xbee device.
 * The supported standard baud rates are 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps, and any non-standard
 * baud rates in the range 0x80 - 0x3D090 bps.
 * @throws ConnectionLostException Thrown when the connection to the IOIO has been lost or disconnected.
 *
 */
public Xbee(IOIO ioio, int rX_pin, int tX_pin, int baud_rate) throws ConnectionLostException{

    this.Ioio = ioio;
    this.Baud_rate = baud_rate;

    Uart = ioio.openUart(rX_pin, tX_pin, baud_rate, Parity.NONE, StopBits.ONE);
    In = Uart.getInputStream();
    Out = Uart.getOutputStream();

    InReader = new BufferedReader(new InputStreamReader(In));
    OutWriter = new BufferedWriter(new OutputStreamWriter(Out));

}
 
开发者ID:zaiddabaeen,项目名称:XBeeIOIO,代码行数:35,代码来源:Xbee.java


示例2: openUart

import ioio.lib.api.Uart.Parity; //导入依赖的package包/类
/**
 * Open a UART module, enabling a bulk transfer of byte buffers.
 * <p>
 * UART is a very common hardware communication protocol, enabling full-
 * duplex, asynchronous point-to-point data transfer. It typically serves
 * for opening consoles or as a basis for higher-level protocols, such as
 * MIDI RS-232, and RS-485.
 * <p>
 * Note that not every pin can be used for UART RX or TX. In addition, the
 * total number of concurrent UART modules in use is limited. See board
 * documentation for the legal pins and limit on concurrent usage.
 * <p>
 * The UART module will operate, and the pins will work in their respective
 * modes until close() is invoked on the returned interface. It is illegal
 * to use pins that have already been opened and has not been closed. A
 * connection must have been established prior to calling this method, by
 * invoking {@link #waitForConnect()}.
 * 
 * @param rx
 *            Pin specification for the RX pin, consisting of the pin
 *            number, as labeled on the board, and the mode, which
 *            determines whether the pin will be floating, pull-up or
 *            pull-down. See {@link DigitalInput.Spec.Mode} for more
 *            information. null can be passed to designate that we do not
 *            want RX input to this module.
 * @param tx
 *            Pin specification for the TX pin, consisting of the pin
 *            number, as labeled on the board, and the mode, which
 *            determines whether the pin will be normal or open-drain. See
 *            {@link DigitalOutput.Spec.Mode} for more information. null can
 *            be passed to designate that we do not want TX output to this
 *            module.
 * @param baud
 *            The clock frequency of the UART module in Hz.
 * @param parity
 *            The parity mode, as in {@link Parity}.
 * @param stopbits
 *            Number of stop bits, as in {@link StopBits}.
 * @return Interface of the assigned module.
 * @throws ConnectionLostException
 *             Connection was lost before or during the execution of this
 *             method.
 * @throws OutOfResourceException
 *             This is a runtime exception, so it is not necessary to catch
 *             it if the client guarantees that the total number of
 *             concurrent UART resources is not exceeded.
 * @see Uart
 */
public Uart openUart(DigitalInput.Spec rx, DigitalOutput.Spec tx, int baud,
		Parity parity, StopBits stopbits) throws ConnectionLostException;
 
开发者ID:jrieke,项目名称:ioiometer,代码行数:51,代码来源:IOIO.java


示例3: openUart

import ioio.lib.api.Uart.Parity; //导入依赖的package包/类
/**
 * Open a UART module, enabling a bulk transfer of byte buffers.
 * <p/>
 * UART is a very common hardware communication protocol, enabling full- duplex, asynchronous
 * point-to-point data transfer. It typically serves for opening consoles or as a basis for
 * higher-level protocols, such as MIDI RS-232, and RS-485.
 * <p/>
 * Note that not every pin can be used for UART RX or TX. In addition, the total number of
 * concurrent UART modules in use is limited. See board documentation for the legal pins and
 * limit on concurrent usage.
 * <p/>
 * The UART module will operate, and the pins will work in their respective modes until close()
 * is invoked on the returned interface. It is illegal to use pins that have already been opened
 * and has not been closed. A connection must have been established prior to calling this
 * method, by invoking {@link #waitForConnect()}.
 *
 * @param rx       Pin specification for the RX pin, consisting of the pin number, as labeled on the
 *                 board, and the mode, which determines whether the pin will be floating, pull-up or
 *                 pull-down. See {@link DigitalInput.Spec.Mode} for more information. null can be
 *                 passed to designate that we do not want RX input to this module.
 * @param tx       Pin specification for the TX pin, consisting of the pin number, as labeled on the
 *                 board, and the mode, which determines whether the pin will be normal or
 *                 open-drain. See {@link DigitalOutput.Spec.Mode} for more information. null can be
 *                 passed to designate that we do not want TX output to this module.
 * @param baud     The clock frequency of the UART module in Hz.
 * @param parity   The parity mode, as in {@link Parity}.
 * @param stopbits Number of stop bits, as in {@link StopBits}.
 * @return Interface of the assigned module.
 * @throws ConnectionLostException Connection was lost before or during the execution of this method.
 * @throws OutOfResourceException  This is a runtime exception, so it is not necessary to catch it if the client
 *                                 guarantees that the total number of concurrent UART resources is not exceeded.
 * @see Uart
 */
public Uart openUart(DigitalInput.Spec rx, DigitalOutput.Spec tx, int baud, Parity parity,
                     StopBits stopbits) throws ConnectionLostException;
 
开发者ID:flyver,项目名称:Flyver-Apps,代码行数:36,代码来源:IOIO.java


示例4: openUart

import ioio.lib.api.Uart.Parity; //导入依赖的package包/类
/**
 * Open a UART module, enabling a bulk transfer of byte buffers.
 * <p>
 * UART is a very common hardware communication protocol, enabling full- duplex, asynchronous
 * point-to-point data transfer. It typically serves for opening consoles or as a basis for
 * higher-level protocols, such as MIDI RS-232, and RS-485.
 * <p>
 * Note that not every pin can be used for UART RX or TX. In addition, the total number of
 * concurrent UART modules in use is limited. See board documentation for the legal pins and
 * limit on concurrent usage.
 * <p>
 * The UART module will operate, and the pins will work in their respective modes until close()
 * is invoked on the returned interface. It is illegal to use pins that have already been opened
 * and has not been closed. A connection must have been established prior to calling this
 * method, by invoking {@link #waitForConnect()}.
 *
 * @param rx
 *            Pin specification for the RX pin, consisting of the pin number, as labeled on the
 *            board, and the mode, which determines whether the pin will be floating, pull-up or
 *            pull-down. See {@link DigitalInput.Spec.Mode} for more information. null can be
 *            passed to designate that we do not want RX input to this module.
 * @param tx
 *            Pin specification for the TX pin, consisting of the pin number, as labeled on the
 *            board, and the mode, which determines whether the pin will be normal or
 *            open-drain. See {@link DigitalOutput.Spec.Mode} for more information. null can be
 *            passed to designate that we do not want TX output to this module.
 * @param baud
 *            The clock frequency of the UART module in Hz.
 * @param parity
 *            The parity mode, as in {@link Parity}.
 * @param stopbits
 *            Number of stop bits, as in {@link StopBits}.
 * @return Interface of the assigned module.
 * @throws ConnectionLostException
 *             Connection was lost before or during the execution of this method.
 * @throws OutOfResourceException
 *             This is a runtime exception, so it is not necessary to catch it if the client
 *             guarantees that the total number of concurrent UART resources is not exceeded.
 * @see Uart
 */
public Uart openUart(DigitalInput.Spec rx, DigitalOutput.Spec tx, int baud, Parity parity,
		StopBits stopbits) throws ConnectionLostException;
 
开发者ID:edarn,项目名称:kryp-client,代码行数:43,代码来源:IOIO.java



注:本文中的ioio.lib.api.Uart.Parity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BlueprintListener类代码示例发布时间:2022-05-22
下一篇:
Java Gamma类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap