RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

HAL_IICTransfer

Hardware Abstraction Layer
HAL entry points from RISC OS
» HAL_IICTransfer

HAL_IICTransfer

(HAL entry #36)
int HAL_IICTransfer(int bus, unsigned int n, iic_transfer transfer[static n])
Entry
bus Bus number to operate on
n Number of iic_transfers
transfer[] iic_transfer list
Exit
- Return code

Use

This is an internal call for OS use only and should not be used by user software. User software that wishes to perform IIC transfers should use the OS_IICOp SWI.

Initiates an IIC transfer. The transfer shall progress in the background if bit 4 of HAL_IICType is set, in which case the normal return should be IICSTATUS_INPROGRESS. The OS will call HAL_IICMonitorTransfer each time an interrupt occurs – this will allow the HAL to progress through the transfer if it’s not totally automatic. If the transfer happens in the foreground, return values are as for HAL_IICMonitorTransfer.

If an IIC transfer is currently in progress, the call may return BUSY and the caller should retry later – although if background transfers are supported it may queue the transfer and return INPROGRESS. If another master is driving the bus, it should silently wait until the bus is free (in the background or foreground as appropriate). If we lose arbitration, the transfer should be retried when the bus becomes free.

transfer[] is an array of n transfer descriptors. Each descriptor describes part of the transfer. See the iic_transfer documentation for more details.

If background transfers are in use, the transfer[] array and the data blocks must remain available in unpaged memory for the duration of the transfer.

HAL_IICTransfer is re-entrant, but may return IICSTATUS_BUSY if re-entered.

See also

  • HAL IIC API
  • OS_IICOp
Information source: Kernel.Docs.HAL.MoreEnts in CVS
Revised on February 9, 2012 13:35:58 by Jeffrey Lee (213) (195.72.173.130)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: HAL entry points from RISC OS, HAL IIC return codes, iic_transfer, HAL entry points by number, HAL IIC API, HAL_IICTransfer

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys