亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tep117.txt

?? tinyos-2.x.rar
?? TXT
字號:
============================
Low-Level I/O
============================

:TEP: 117
:Group: Core Working Group 
:Type: Documentary
:Status: Final
:TinyOS-Version: 2.x
:Author: Phil Buonadonna, Jonathan Hui

.. Note::

   This memo documents a part of TinyOS for the TinyOS Community, and
   requests discussion and suggestions for improvements.  Distribution
   of this memo is unlimited. This memo is in full compliance with
   TEP 1.

Abstract
====================================================================

The memo documents the TinyOS 2.x interfaces used for controlling
digital IO functionality and digital interfaces.


1. Introduction
====================================================================

The canonical TinyOS device is likely to have a variety of digital
interfaces. These interfaces may be divided into two broad
categories. The first are general purpose digital I/O lines (pins) for
individual digital signals at physical pins on a chip or platform. The
second are digital I/O interfaces that have predefined communication
protocol formats. The three buses covered in this document are the
Serial Peripheral Interface (SPI), the Inter-Integrated Circuit (I2C)
or Two-Wire interface, and the Universal Asynchronous
Receiver/Transmitter (UART) interface. While there are likely other
bus formats, we presume SPI, I2C, and UART to have the largest
coverage.

This memo documents the interfaces used for pins and the three buses.

2. Pins
====================================================================

General Purpose I/O (GPIO) pins are single, versatile digital I/O
signals individually controllable on a particular chip or
platform. Each GPIO can be placed into either an input mode or an
output mode. On some platforms a third 'tri-state' mode may exist, but
this functionality is platform specific and will not be covered in
this document.

On many platforms, a physical pin may function as either a digital
GPIO or another special function I/O such. Examples include ADC I/O or
a bus I/O. Interfaces to configure the specific function of a pin are
platform specific.

The objective of the interfaces described here is not to attempt to
cover all possibilities of GPIO functionality and features, but to
distill down to a basis that may be expected on most platforms.

In input mode, we assume the following capabilities:
 * The ability to arbitrarily sample the pin
 * The ability to generate an interrupt/event from either a rising edge or falling edge digital signal.
 
In output mode, we assume the following capabilities:
 * An I/O may be individually cleared (low) or set (hi)
 
Platform that provide GPIO capabilities MUST provide the following HIL
interfaces:

 * GeneralIO
 * GpioInterrupt

Platforms MAY provide the following capture interface.

 * GpioCapture

2.1 GeneralIO 
--------------------------------------------------------------------

The GeneralIO HIL interface is the fundamental mechanism for controlling a
GPIO pin. The interface provides a mechanism for setting the pin mode
and reading/setting the pin value. The toggle function switches the
output state to the opposite of what it currently is.
 
Platforms with GPIO functionality MUST provide this interface. It
SHOULD be provided in a component named GeneralIOC, but MAY be
provided in other components as needed. ::

 interface GeneralIO
 {
   async command void set();
   async command void clr();
   async command void toggle();
   async command bool get();
   async command void makeInput();
   async command bool isInput();
   async command void makeOutput();
   async command bool isOutput();
 }



2.2 GpioInterrupt
--------------------------------------------------------------------

The GPIO Interrupt HIL interface provides baseline event control for a
GPIO pin. It provides a mechanism to detect a rising edge OR a falling
edge. Note that calls to enableRisingEdge and enableFallingEdge are
NOT cumulative and only one edge may be detected at a time. There may
be other edge events supported by the platform which MAY be exported
through a platform specific HAL interface. ::
 
 interface GpioInterrupt {
 
   async command error_t enableRisingEdge();
   async command bool isRisingEdgeEnabled();
   async command error_t enableFallingEdge();
   async command bool isFallingEdgeEnabled();
   async command error_t disable();
   async event void fired();
 
 }


2.3 GpioCapture
--------------------------------------------------------------------

The GpioCapture interface provides a means of associating a timestamp
with a GPIO event. Platforms MAY provide this interface.

Some platforms may have hardware support for such a feature. Other
platforms may emulate this capability using the SoftCaptureC
component. The interface makes not declaration of the precision or
accuracy of the timestamp with respect to the associated GPIO
event. ::

 interface GpioCapture {
 
   async command error_t captureRisingEdge();
   async command bool isRisingEdgeEnabled();
   async command error_t captureFallingEdge();
   async command bool isFallingEdgeEnabled();
   async event void captured(uint16_t time);
   async command void disable();
 
 }


3. Buses
====================================================================

Bus operations may be divided into two categories: data and
control. The control operations of a particular bus controller are
platform specific and not covered here. Instead, we focus on the data
interfaces at the HIL level that are expected to be provided.

3.1 Serial Peripheral Interface
--------------------------------------------------------------------

The Serial Peripheral Interface (SPI) is part of a larger class of
Synchronous Serial Protocols.  The term SPI typically refers to the
Motorola SPI protocols. Other protocols include the National
Semiconductor Microwire, the TI Synchronous Serial Protocol and the
Programmable Serial Protocol. The dataside interfaces here were
developed for the Motorola SPI format, but may work for others.

Platforms supporting SPI MUST provide these interfaces.

Of note, the interfaces DO NOT define the behavior of any chip select
or framing signals. These SHOULD determined by platform specific HAL
interfaces and implementations.


The interface is split into a synchronous byte level and an
asynchronous packet level interface. The byte level interface is
intended for short transactions (3-4 bytes) on the SPI bus. ::

 interface SpiByte {
   async command uint8_t write( uint8_t tx );
 }

The packet level interface is for larger bus transactions. The
pointer/length interface permits use of hardware assist such as
DMA. ::

 interface SpiPacket {
   async command error_t send( uint8_t* txBuf, uint8_t* rxBuf, uint16_t len );
   async event void sendDone( uint8_t* txBuf, uint8_t* rxBuf, uint16_t len,
                              error_t error );
 }

3.2 I2C
--------------------------------------------------------------------

The Inter-Integrated Circuit (I2C) interface is another type of
digital bus that is often used for chip-to-chip communication. It is
also known as a two-wire interface.

The I2CPacket interface provides for asynchronous Master mode
communication on an I2C with application framed packets. Individual
I2C START-STOP events are controllable which allows the using
component to do multiple calls within a single I2C transaction and
permits multiple START sequences

Platforms providing I2C capability MUST provide this interface. ::

 interface I2CPacket<addr_size> {
   async command error_t read(i2c_flags_t flags, uint16_t addr, uint8_t length, u int8_t* data);
   async event void readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data);
   async command error_t write(i2c_flags_t flags, uint16_t addr, uint8_t length, uint8_t* data);
   async event void writeDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data)
 }

The interface is typed according to the addressing space the
underlying implementation supports.  Valid type values are below. ::

  TI2CExtdAddr - Interfaces uses the extended (10-bit) addressing mode. 
  TI2CBasicAddr - Interfaces uses the basic (7-bit) addressing mode.

The i2c_flags_t values are defined below. The flags define the
behavior of the operation for the call being made. These values may be
ORed together. ::

  I2C_START    - Transmit an I2C STOP at the beginning of the operation.
  I2C_STOP     - Transmit an I2C STOP at the end of the operation. Cannot be used
                 with the I2C_ACK_END flag.
  I2C_ACK_END  - ACK the last byte sent from the buffer. This flags is only valid 
                 a write operation. Cannot be used with the I2C_STOP flag.


3.3 UART
--------------------------------------------------------------------

The Universal Asynchronous Receiver/Transmitter (UART) interface is a
type of serial interconnect. The interface is "asynchronous" since it
recovers timing from the data stream itself, rather than a separate
control stream. The interface is split into an asynchronous multi-byte
level interface and a synchronous single-byte level interface.

The multi-byte level interface, UartStream, provides a split-phase
interface for sending and receiving one or more bytes at a time. When
receiving bytes, a byte-level interrupt can be enabled or an interrupt
can be generated after receiving one or more bytes. The latter is
intended to support use cases where the number of bytes to receive is
already known. If the byte-level receive interrupt is enabled, the
receive command MUST return FAIL. If a multi-byte receive interrupt is
enabled, the enableReceiveInterrupt command MUST return FAIL. ::

 interface UartStream {
   async command error_t send( uint8_t* buf, uint16_t len );
   async event void sendDone( uint8_t* buf, uint16_t len, error_t error );
   
   async command error_t enableReceiveInterrupt();
   async command error_t disableReceiveInterrupt();
   async event void receivedByte( uint8_t byte );
   
   async command error_t receive( uint8_t* buf, uint8_t len );
   async event void receiveDone( uint8_t* buf, uint16_t len, error_t error );
 }

The single-byte level interface, UartByte, provides a synchronous
interface for sending and receiving a single byte. This interface is
intended to support use cases with short transactions. Because UART is
asynchronous, the receive command takes a timeout which represents
units in byte-times, after which the command returns with an
error. Note that use of this interface is discouraged if the UART baud
rate is low. ::
 
 interface UartByte {
   async command error_t send( uint8_t byte );
   async command error_t receive( uint8_t* byte, uint8_t timeout );
 }

4. Implementation
====================================================================

Example implementations of the pin interfaces can be found in tos/chips/msp430/pins,
tos/chips/atm128/pins, and tos/chips/pxa27x/gpio.

Example implementations of the SPI interfaces can be found in tos/chips/msp430/usart,
tos/chips/atm128/spi, and tos/chips/pxa27x/ssp.

Example implementations of the I2C interfaces can be found in tos/chips/msp430/usart,
tos/chips/atm128/i2c, and tos/chips/pxa27x/i2c.

Example implementations of the UART interfaces can be found in tos/chips/msp430/usart,
tos/chips/atm128/uart/ and tos/chips/pxa27x/uart.


5. Author's Address
====================================================================

| Phil Buonadonna
| Arch Rock Corporation
| 657 Mission St. Ste 600
| San Francisco, CA 94105-4120
|
| phone - +1 415 692-0828 x2833
|
|
| Jonathan Hui
| Arch Rock Corporation
| 657 Mission St. Ste 600
| San Francisco, CA 94105-4120
|
| phone - +1 415 692-0828 x2835

6. Citations
====================================================================

.. [tep113] TEP 113: Serial Communication.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产久精国产| 欧美大片一区二区三区| 国产成人免费网站| 精品一区二区三区影院在线午夜 | 亚洲美女淫视频| 亚洲少妇中出一区| 亚洲一区免费观看| 性做久久久久久久久| 亚洲高清在线精品| 亚洲午夜久久久| 天堂在线一区二区| 日韩福利视频导航| 麻豆精品视频在线观看视频| 日本aⅴ免费视频一区二区三区| 亚洲成人你懂的| 日本不卡不码高清免费观看| 久久精品国产一区二区三区免费看 | 亚洲精选视频免费看| 亚洲综合一区二区三区| 视频一区二区不卡| 国产在线精品国自产拍免费| 国产69精品一区二区亚洲孕妇| 成人精品视频网站| 欧美三级电影一区| 日韩你懂的电影在线观看| 精品国产一区二区三区av性色| 精品成人一区二区三区四区| 国产欧美日韩在线看| 亚洲综合免费观看高清完整版在线 | 精品一区二区三区蜜桃| 国产一区二区美女诱惑| 色综合 综合色| 欧美一区二区在线不卡| 国产精品欧美一级免费| 亚洲电影中文字幕在线观看| 精品无人区卡一卡二卡三乱码免费卡| 成人久久久精品乱码一区二区三区| 在线免费观看成人短视频| 久久新电视剧免费观看| 亚洲欧美日韩国产中文在线| 奇米777欧美一区二区| 成人国产免费视频| 91精品国产一区二区三区蜜臀| 久久久久久久久岛国免费| 亚洲免费视频中文字幕| 国产一区视频网站| 欧美丰满一区二区免费视频 | 亚洲综合免费观看高清在线观看| 久久99这里只有精品| 91黄色免费观看| 久久青草国产手机看片福利盒子 | 久久精品国产精品青草| 在线观看一区二区视频| 中文字幕av免费专区久久| 肉色丝袜一区二区| 日本伦理一区二区| 中文字幕一区免费在线观看| 久久99国产精品麻豆| 6080国产精品一区二区| 亚洲国产综合视频在线观看| a4yy欧美一区二区三区| 国产午夜亚洲精品理论片色戒 | 色综合久久中文字幕| 国产视频一区不卡| 激情久久久久久久久久久久久久久久| 欧美日韩一区成人| 亚洲成年人网站在线观看| 色老头久久综合| 亚洲一区二区三区视频在线| 99精品国产热久久91蜜凸| 欧美激情一二三区| 国产999精品久久久久久绿帽| 精品久久久久久无| 久久草av在线| 精品国产免费一区二区三区香蕉| 日本美女一区二区三区视频| 3d成人h动漫网站入口| 亚洲午夜影视影院在线观看| 欧美在线视频日韩| 午夜精品免费在线| 91精品国产综合久久香蕉的特点| 午夜影院久久久| 91精品国产综合久久福利| 美美哒免费高清在线观看视频一区二区 | 国产成人在线观看| 亚洲国产精品av| 99久久精品情趣| 亚洲自拍与偷拍| 3atv一区二区三区| 看电视剧不卡顿的网站| 亚洲精品在线电影| av亚洲精华国产精华精华| 一区二区三区四区在线播放| 欧美性猛交一区二区三区精品| 亚洲大片在线观看| 久久综合九色欧美综合狠狠| 国产乱一区二区| 亚洲欧洲在线观看av| 欧美视频一二三区| 久草热8精品视频在线观看| 久久精品人人做人人综合 | 国产亚洲精品中文字幕| 成年人国产精品| 亚洲国产综合91精品麻豆| 日韩视频免费观看高清完整版| 国产一区 二区| 一区二区三区蜜桃网| 欧美精品一区二区三区蜜桃 | 日韩av在线发布| 国产欧美精品在线观看| 一本到三区不卡视频| 蜜桃一区二区三区在线| 国产精品午夜久久| 欧美人妇做爰xxxⅹ性高电影| 国产最新精品免费| 亚洲影视在线播放| 久久综合色天天久久综合图片| 99国产精品久久久久| 一区二区在线看| 在线观看日韩电影| 白白色 亚洲乱淫| 岛国一区二区在线观看| 国产成人精品影视| 成人高清免费在线播放| 成人综合激情网| aaa亚洲精品| 色诱视频网站一区| 欧美夫妻性生活| 精品99一区二区| 国产三级三级三级精品8ⅰ区| 国产日韩欧美高清在线| 中文字幕人成不卡一区| 日韩一区在线免费观看| 亚洲永久精品国产| 视频一区视频二区中文字幕| 秋霞电影一区二区| 国产老女人精品毛片久久| 成人午夜视频免费看| 色域天天综合网| 69堂精品视频| 日本一区二区三区四区| 亚洲美女在线一区| 麻豆传媒一区二区三区| 国产成人无遮挡在线视频| 波多野结衣亚洲| 欧美精品xxxxbbbb| 国产亚洲人成网站| 亚洲精品免费电影| 美女一区二区三区| 91在线观看一区二区| 欧美精品久久一区二区三区| 久久久精品欧美丰满| 一区二区三区四区激情| 久久国产精品99久久人人澡| 99久久精品免费| 51精品秘密在线观看| 中文字幕第一区| 肉色丝袜一区二区| av成人免费在线观看| 日韩一区二区三区观看| 中文字幕亚洲一区二区av在线| 日韩精品乱码av一区二区| 成人自拍视频在线观看| 这里是久久伊人| 中文字幕在线免费不卡| 久久精品国产成人一区二区三区 | 悠悠色在线精品| 久久99精品国产麻豆婷婷洗澡| 97久久久精品综合88久久| 精品国产污污免费网站入口| 亚洲午夜在线观看视频在线| 国产不卡视频一区| 日韩精品一区二区三区三区免费| 中文字幕在线观看不卡视频| 看国产成人h片视频| 欧美欧美欧美欧美| 亚洲男人的天堂网| 懂色av中文一区二区三区 | 奇米色一区二区三区四区| 97精品超碰一区二区三区| 久久一夜天堂av一区二区三区| 亚洲午夜在线电影| 色94色欧美sute亚洲13| 国产精品久久看| 国产精品18久久久久久vr| 日韩欧美精品三级| 青青草国产精品亚洲专区无| 欧美影院一区二区三区| 综合精品久久久| 91丨porny丨国产| 国产精品萝li| 国产.欧美.日韩| 国产婷婷一区二区| 国产一区二区三区久久久| 精品久久久久香蕉网| 久久精品噜噜噜成人av农村| 91精品国产手机| 麻豆精品一二三| 久久久久久免费毛片精品| 久久99精品一区二区三区三区|