当前位置: 首页>>代码示例>>Java>>正文


Java Uart.Parity方法代码示例

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


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

示例1: uartConfigure

import ioio.lib.api.Uart; //导入方法依赖的package包/类
synchronized public void uartConfigure(int uartNum, int rate,
		boolean speed4x, Uart.StopBits stopbits, Uart.Parity parity)
		throws IOException {
	int parbits = parity == Uart.Parity.EVEN ? 1
			: (parity == Uart.Parity.ODD ? 2 : 0);
	beginBatch();
	writeByte(UART_CONFIG);
	writeByte((uartNum << 6) | (speed4x ? 0x08 : 0x00)
			| (stopbits == Uart.StopBits.TWO ? 0x04 : 0x00) | parbits);
	writeTwoBytes(rate);
	endBatch();
}
 
开发者ID:jrieke,项目名称:ioiometer,代码行数:13,代码来源:IOIOProtocol.java

示例2: openUart

import ioio.lib.api.Uart; //导入方法依赖的package包/类
@Override
public Uart openUart(int rx, int tx, int baud, Uart.Parity parity,
		Uart.StopBits stopbits) throws ConnectionLostException {
	return openUart(rx == INVALID_PIN ? null : new DigitalInput.Spec(rx),
			tx == INVALID_PIN ? null : new DigitalOutput.Spec(tx), baud,
			parity, stopbits);
}
 
开发者ID:jrieke,项目名称:ioiometer,代码行数:8,代码来源:IOIOImpl.java

示例3: uartConfigure

import ioio.lib.api.Uart; //导入方法依赖的package包/类
synchronized public void uartConfigure(int uartNum, int rate, boolean speed4x,
                                       Uart.StopBits stopbits, Uart.Parity parity) throws IOException {
    int parbits = parity == Uart.Parity.EVEN ? 1 : (parity == Uart.Parity.ODD ? 2 : 0);
    beginBatch();
    writeByte(UART_CONFIG);
    writeByte((uartNum << 6) | (speed4x ? 0x08 : 0x00)
            | (stopbits == Uart.StopBits.TWO ? 0x04 : 0x00) | parbits);
    writeTwoBytes(rate);
    endBatch();
}
 
开发者ID:flyver,项目名称:Flyver-Apps,代码行数:11,代码来源:IOIOProtocol.java

示例4: openUart

import ioio.lib.api.Uart; //导入方法依赖的package包/类
@Override
public Uart openUart(int rx, int tx, int baud, Uart.Parity parity,
                     Uart.StopBits stopbits) throws ConnectionLostException {
    return openUart(rx == INVALID_PIN ? null : new DigitalInput.Spec(rx),
            tx == INVALID_PIN ? null : new DigitalOutput.Spec(tx), baud,
            parity, stopbits);
}
 
开发者ID:flyver,项目名称:Flyver-Apps,代码行数:8,代码来源:IOIOImpl.java

示例5: uartConfigure

import ioio.lib.api.Uart; //导入方法依赖的package包/类
synchronized public void uartConfigure(int uartNum, int rate, boolean speed4x,
		Uart.StopBits stopbits, Uart.Parity parity) throws IOException {
	int parbits = parity == Uart.Parity.EVEN ? 1 : (parity == Uart.Parity.ODD ? 2 : 0);
	beginBatch();
	writeByte(UART_CONFIG);
	writeByte((uartNum << 6) | (speed4x ? 0x08 : 0x00)
			| (stopbits == Uart.StopBits.TWO ? 0x04 : 0x00) | parbits);
	writeTwoBytes(rate);
	endBatch();
}
 
开发者ID:edarn,项目名称:kryp-client,代码行数:11,代码来源:IOIOProtocol.java


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