iomodule
Xilinx SDK Drivers API Documentation
xiomodule.h File Reference

Data Structures

struct  XIOModule_Config
 This typedef contains configuration information for the device. More...
 
struct  XIOModule_Uart_Stats
 Statistics for the UART. More...
 
struct  XIOModule_Buffer
 The following data type is used to manage the buffers that are handled when sending and receiving UART data in the interrupt mode. More...
 
struct  XIOModule_Timer_Stats
 Programmable Interval Timer statistics. More...
 
struct  XIOModule
 The XIOModule driver instance data. More...
 

Macros

Configuration options

These options are used in XIOModule_SetOptions() to configure the device.

#define XTC_INT_MODE_OPTION   0
 Used to configure the Programmable Interval Timer. More...
 
#define XTC_AUTO_RELOAD_OPTION   0x00000002UL
 
#define XIN_SVC_SGL_ISR_OPTION   1UL
 Used to configure the Interrupt Controller. More...
 
#define XIN_SVC_ALL_ISRS_OPTION   2UL
 
Hardware configuration mnemonics

These mnemonics are used when accessing hardware configuration parameters.

#define XTC_PRESCALER_NONE   0
 Mnemonics for the Programmable Interval Timer hardware configuration. More...
 
#define XTC_PRESCALER_FIT1   1
 
#define XTC_PRESCALER_FIT2   2
 
#define XTC_PRESCALER_FIT3   3
 
#define XTC_PRESCALER_FIT4   4
 
#define XTC_PRESCALER_PIT1   5
 
#define XTC_PRESCALER_PIT2   6
 
#define XTC_PRESCALER_PIT3   7
 
#define XTC_PRESCALER_PIT4   8
 
#define XTC_PRESCALER_EXTERNAL   9
 

Typedefs

typedef void(* XIOModule_Handler )(void *CallBackRef, unsigned int ByteCount)
 Callback function. More...
 
typedef void(* XIOModule_Timer_Handler )(void *CallBackRef, u8 TimerNumber)
 Signature for the timer callback function. More...
 

Functions

int XIOModule_Initialize (XIOModule *InstancePtr, u16 DeviceId)
 Initialize a specific interrupt controller instance/driver. More...
 
int XIOModule_Timer_Initialize (XIOModule *InstancePtr, u16 DeviceId)
 Initializes a specific timer instance/driver. More...
 
int XIOModule_Start (XIOModule *InstancePtr)
 Starts the IO Module. More...
 
void XIOModule_Stop (XIOModule *InstancePtr)
 Stops the interrupt controller by disabling the output from the controller so that no interrupts will be caused by the interrupt controller. More...
 
int XIOModule_Connect (XIOModule *InstancePtr, u8 Id, XInterruptHandler Handler, void *CallBackRef)
 Makes the connection between the Id of the interrupt source and the associated handler that is to run when the interrupt is recognized. More...
 
void XIOModule_Disconnect (XIOModule *InstancePtr, u8 Id)
 Updates the interrupt table with the Null Handler and NULL arguments at the location pointed at by the Id. More...
 
void XIOModule_Enable (XIOModule *InstancePtr, u8 Id)
 Enables the interrupt source provided as the argument Id. More...
 
void XIOModule_Disable (XIOModule *InstancePtr, u8 Id)
 Disables the interrupt source provided as the argument Id such that the interrupt controller will not cause interrupts for the specified Id. More...
 
void XIOModule_Acknowledge (XIOModule *InstancePtr, u8 Id)
 Acknowledges the interrupt source provided as the argument Id. More...
 
XIOModule_ConfigXIOModule_LookupConfig (u16 DeviceId)
 Looks up the device configuration based on the unique device ID. More...
 
int XIOModule_ConnectFastHandler (XIOModule *InstancePtr, u8 Id, XFastInterruptHandler Handler)
 Makes the connection between the Id of the interrupt source and the associated handler that is to run when the interrupt is recognized. More...
 
void XIOModule_SetNormalIntrMode (XIOModule *InstancePtr, u8 Id)
 Sets the normal interrupt mode for the specified interrupt in the Interrupt Mode Register, by resetting the vector to (BaseVector & 0xFFFFFF80) | 0x10 and selecting normal mode. More...
 
u32 XIOModule_DiscreteRead (XIOModule *InstancePtr, unsigned Channel)
 Read state of discretes for the specified GPI channel. More...
 
void XIOModule_DiscreteWrite (XIOModule *InstancePtr, unsigned Channel, u32 Data)
 Write to discretes register for the specified GPO channel. More...
 
void XIOModule_DiscreteSet (XIOModule *InstancePtr, unsigned Channel, u32 Mask)
 Set output discrete(s) to logic 1 for the specified GPO channel. More...
 
void XIOModule_DiscreteClear (XIOModule *InstancePtr, unsigned Channel, u32 Mask)
 Set output discrete(s) to logic 0 for the specified GPO channel. More...
 
int XIOModule_CfgInitialize (XIOModule *InstancePtr, XIOModule_Config *Config, u32 EffectiveAddr)
 Initialize a XIOModule instance. More...
 
void XIOModule_ResetFifos (XIOModule *InstancePtr)
 This function does nothing, since the UART doesn't have any FIFOs. More...
 
unsigned int XIOModule_Send (XIOModule *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)
 This functions sends the specified buffer of data using the UART in either polled or interrupt driven modes. More...
 
unsigned int XIOModule_Recv (XIOModule *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes)
 This function will attempt to receive a specified number of bytes of data from the UART and store it into the specified buffer. More...
 
int XIOModule_IsSending (XIOModule *InstancePtr)
 This function determines if the specified UART is sending data. More...
 
void XIOModule_GetStats (XIOModule *InstancePtr, XIOModule_Uart_Stats *StatsPtr)
 Returns a snapshot of the current statistics in the structure specified. More...
 
void XIOModule_ClearStats (XIOModule *InstancePtr)
 This function zeros the statistics for the given instance. More...
 
void XIOModule_InterruptHandler (XIOModule *InstancePtr)
 Interrupt handler for the driver used when there can be no argument passed to the handler. More...
 
void XIOModule_Uart_EnableInterrupt (XIOModule *InstancePtr)
 This function enables the UART interrupts such that an interrupt will occur when data is received or data has been transmitted. More...
 
void XIOModule_Uart_DisableInterrupt (XIOModule *InstancePtr)
 This function disables the UART interrupt. More...
 
void XIOModule_SetRecvHandler (XIOModule *InstancePtr, XIOModule_Handler FuncPtr, void *CallBackRef)
 This function sets the handler that will be called when an event (interrupt) occurs in the driver for the UART. More...
 
void XIOModule_SetSendHandler (XIOModule *InstancePtr, XIOModule_Handler FuncPtr, void *CallBackRef)
 This function sets the handler that will be called when an event (interrupt) occurs in the driver for the UART. More...
 
void XIOModule_Uart_InterruptHandler (XIOModule *InstancePtr)
 This function is the interrupt handler for the UART. More...
 
int XIOModule_SetOptions (XIOModule *InstancePtr, u32 Options)
 Set the options for the interrupt controller driver. More...
 
u32 XIOModule_GetOptions (XIOModule *InstancePtr)
 Return the currently set options. More...
 
void XIOModule_Timer_Start (XIOModule *InstancePtr, u8 TimerNumber)
 Starts the specified timer counter of the device such that it starts running. More...
 
void XIOModule_Timer_Stop (XIOModule *InstancePtr, u8 TimerNumber)
 Stops the timer by disabling it. More...
 
u32 XIOModule_GetValue (XIOModule *InstancePtr, u8 TimerNumber)
 Get the current value of the specified timer counter. More...
 
void XIOModule_SetResetValue (XIOModule *InstancePtr, u8 TimerNumber, u32 ResetValue)
 Set the reset value for the specified timer counter. More...
 
u32 XIOModule_GetCaptureValue (XIOModule *InstancePtr, u8 TimerNumber)
 Returns the timer counter value that was captured the last time the external capture input was asserted. More...
 
int XIOModule_IsExpired (XIOModule *InstancePtr, u8 TimerNumber)
 Checks if the specified timer counter of the device has expired. More...
 
void XIOModule_Reset (XIOModule *InstancePtr, u8 TimerNumber)
 Resets the specified timer counter of the device. More...
 
void XIOModule_Timer_SetOptions (XIOModule *InstancePtr, u8 TimerNumber, u32 Options)
 Enables the specified options for the specified timer . More...
 
int XIOModule_Timer_SelfTest (XIOModule *InstancePtr, u8 TimerNumber)
 Runs a self-test on the timer driver/device. More...
 
void XIOModule_SetHandler (XIOModule *InstancePtr, XIOModule_Timer_Handler FuncPtr, void *CallBackRef)
 Sets the timer callback function, which the driver calls when the specified timer times out. More...
 
void XIOModule_Timer_InterruptHandler (void *InstancePtr)
 Interrupt Service Routine (ISR) for the driver. More...
 
u32 XIOModule_IoReadWord (XIOModule *InstancePtr, u32 ByteOffset)
 Read 32-bit word from the IO Bus memory mapped IO. More...
 
u16 XIOModule_IoReadHalfword (XIOModule *InstancePtr, u32 ByteOffset)
 Read 16-bit halfword from the IO Bus memory mapped IO. More...
 
u8 XIOModule_IoReadByte (XIOModule *InstancePtr, u32 ByteOffset)
 Read byte from the IO Bus memory mapped IO. More...
 
void XIOModule_IoWriteWord (XIOModule *InstancePtr, u32 ByteOffset, u32 Data)
 Write 32-bit word to the IO Bus memory mapped IO. More...
 
void XIOModule_IoWriteHalfword (XIOModule *InstancePtr, u32 ByteOffset, u16 Data)
 Write 16-bit word to the IO Bus memory mapped IO. More...
 
void XIOModule_IoWriteByte (XIOModule *InstancePtr, u32 ByteOffset, u8 Data)
 Write 8-bit word to the IO Bus memory mapped IO. More...