datasheetbank_Logo
数据手册搜索引擎和 Datasheet免费下载 PDF

AN672 查看數據表(PDF) - Silicon Laboratories

零件编号
产品描述 (功能)
生产厂家
AN672
Silabs
Silicon Laboratories 
AN672 Datasheet PDF : 30 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
AN672
8. I/O Component
COMPONENT: si32IoComponent
REQUIRES: si32BaseComponent, si32ObjectComponent
PROVIDES: si32IoObject, si32PortalObject, si32TimerObject
The si32IoComponent contains objects that abstract the behavior of hardware. Derived objects in
si32McuComponent implement hardware specific concrete instances of these objects.
8.1. si32PortalObject
In general, there are several types of streaming I/O operations possible:
Non-blocking Synchronous: Reads return immediately with an actual count of 0 or more, up to the
desired count, depending on how much data is available (i.e., hardware receive FIFO). Writes return
immediately with an actual count of 0 or more, up to the desired count, depending on how much space is
available (i.e., hardware transmit FIFO).
Non-blocking Asynchronous: Reads/writes take a callback and return immediately. The callback may be
invoked before the read/write call returns. The callback always indicates completion, and the actual count
is always the desired count unless there was an error or the request was aborted.
Blocking Synchronous: Reads/writes do not return until the full desired count has been moved or an
error occurs.
Blocking Asynchronous: Essentially the same as non-blocking asynchronous, except that it is possible
for reads/writes to block before returning, even after the callback has been invoked.
The si32Library portal objects implement un-buffered, non-blocking, synchronous and asynchronous operations.
They are designed to be as simple as possible in that they do not require other library objects or components. In
other words, si32UsartAPortalObject is derived from si32PortalObject but does not depend on other objects such
as timers, queues, buffers, pseudo-threads, or run-loops. This means that portals do not implement timeouts, they
do not implement transmit/receive queues, they do not support multiple sessions, and they do not offer blocking
operations. Additional entities are required in order to support those functionalities and are outside of the scope of
portals. Note that portals do implement operations to abort reads/writes in progress, enabling timeout/error
handlers to regain control of the underlying hardware.
Asynchronous operations on portal objects typically invoke the callback from interrupt dispatch level. The callback
function must restrict its behavior to only perform interrupt- (and possibly thread-) safe operations. Ensuring correct
behavior of callbacks is outside of the scope of the portal objects.
Figure 12 shows the si32PortalObject diagram.
si32RootObject
si32PortalObject
SI32_XXX_X_Type
Figure 12. si32PortalObject Diagram
Rev. 0.1
17

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]