Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

spidigio.h File Reference

Digital Port SPI Definitions. More...

#include <sys/device.h>
#include <sys/timer.h>

Go to the source code of this file.

Functions

void SpiDigitalInit (u_char *inputs, u_char *outputs)
 Initialize the digital I/O interface.

u_long SpiDigitalGet (u_char num)
 Query digital inputs and outputs.

void SpiDigitalSet (u_char num, u_long bits)
 Set digital outputs.


Detailed Description

Digital Port SPI Definitions.


Function Documentation

u_long SpiDigitalGet u_char    num
 

Query digital inputs and outputs.

If both inputs and outputs are installed, typically the inputs are represented by the most signigficant bits.

SpiDigitalInit() must have been called by the application before calling this function.

Parameters:
num  Number of bits to query, either 8, 16, 24 or 32.
Returns:
Binary value of the requested inputs.

void SpiDigitalInit u_char   inputs,
u_char   outputs
 

Initialize the digital I/O interface.

Automatically detects the number of digital inputs and outputs.

Parameters:
inputs  Pointer to an 8-bit value, where the number of detected inputs will be stored.
outputs  Pointer to an 8-bit value, where the number of detected outputs will be stored.

void SpiDigitalSet u_char    num,
u_long    bits
 

Set digital outputs.

Although possible, it makes no sense to set digital inputs.

SpiDigitalInit() must have been called by the application before calling this function.

Parameters:
num  Number of bits to set, either 8, 16, 24 or 32.
bits  The bit value to be set


Generated on Thu Jan 30 22:30:55 2003 for EduNet by doxygen1.2.18