Software Drivers
Main Page | Data Structures | File List | Data Fields | Globals

xuartlite_intr.c File Reference


Detailed Description

This file contains interrupt-related functions for the UART Lite component (XUartLite).

 MODIFICATION HISTORY:

 Ver   Who  Date     Changes
 ----- ---- -------- -----------------------------------------------
 1.00a ecm  08/31/01 First release
 1.00b jhl  02/21/02 Repartitioned the driver for smaller files
 1.02a rpm  02/14/07 Added check for outstanding transmission before
			calling the send callback (avoids extraneous
			callback invocations)
 


Functions

void XUartLite_SetRecvHandler (XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef)
void XUartLite_SetSendHandler (XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef)
void XUartLite_InterruptHandler (XUartLite *InstancePtr)
void XUartLite_DisableInterrupt (XUartLite *InstancePtr)
void XUartLite_EnableInterrupt (XUartLite *InstancePtr)


Function Documentation

void XUartLite_DisableInterrupt XUartLite InstancePtr  ) 
 

This function disables the UART interrupt. After calling this function, data may still be received by the UART but no interrupt will be generated since the hardware device has no way to disable the receiver.

Parameters:
InstancePtr is a pointer to the XUartLite instance.
Returns:
None.
Note:
None.

void XUartLite_EnableInterrupt XUartLite InstancePtr  ) 
 

This function enables the UART interrupt such that an interrupt will occur when data is received or data has been transmitted. The device contains 16 byte receive and transmit FIFOs such that an interrupt is generated anytime there is data in the receive FIFO and when the transmit FIFO transitions from not empty to empty.

Parameters:
InstancePtr is a pointer to the XUartLite instance.
Returns:
None.
Note:
None.

void XUartLite_InterruptHandler XUartLite InstancePtr  ) 
 

This function is the interrupt handler for the UART lite driver. It must be connected to an interrupt system by the user such that it is called when an interrupt for any UART lite occurs. This function does not save or restore the processor context such that the user must ensure this occurs.

Parameters:
InstancePtr contains a pointer to the instance of the UART that the interrupt is for.
Returns:
None.
Note:
None.

void XUartLite_SetRecvHandler XUartLite InstancePtr,
XUartLite_Handler  FuncPtr,
void *  CallBackRef
 

This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.

Parameters:
InstancePtr is a pointer to the XUartLite instance.
FuncPtr is the pointer to the callback function.
CallBackRef is the upper layer callback reference passed back when the callback function is invoked.
Returns:
None.
Note:
There is no assert on the CallBackRef since the driver doesn't know what it is (nor should it)

void XUartLite_SetSendHandler XUartLite InstancePtr,
XUartLite_Handler  FuncPtr,
void *  CallBackRef
 

This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.

Parameters:
InstancePtr is a pointer to the XUartLite instance .
FuncPtr is the pointer to the callback function.
CallBackRef is the upper layer callback reference passed back when the callback function is invoked.
Returns:
None.
Note:
There is no assert on the CallBackRef since the driver doesn't know what it is (nor should it)