10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>PinTestIsItBus -- Is a pin performing its bus functionDescription:Prototype:Inputs:Returns:Notes:This function allows you program to ascertain whether a pin is currently performing its busfunction. This function is only relevant to pins which have bus functions.short PinTestIsItBus (short pin);pin is the pin number to act upon.Returns zero if the pin is configured for its I/O function and nonzero for its bus functionAll arguments to the macro functions must be compile-time literalsPinToggle -- Configure I/O pin as output and toggle current levelDescription:Prototype:Inputs:Notes:Directly toggle one of the I/O ports.void PinToggle(short pin);pin is the pin number to act upon1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinWrite -- Configure I/O pin as output and write levelDescription:Prototype:Inputs:Notes:Sets one of the I/O ports with the specified value.void PinWrite(short pin, short value);pin is the pin number to act onvalue is the value (0 or 1) that you wish to write to the pin.1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PIOBusFunct -- Make an I/O pin perform its alternate function (varies)Description:Prototype:Inputs:Returns:This function first configures an I/O line to perform its alternate function which will vary witheach pin, and only applies interrupt request (IRQn) and QSM (port Q) lines. The pin argumentcan be specified as numerical value between 1 and 50 corresponding to the <strong>CF2</strong> pin out onconnectorshort PIOBusFunct(short pin);pin is the pin number to act onReturns the current level (after mirroring) or -1 if there's an errorPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.32 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!