E:/Projects/AvrLib/dev/xserial.c File Reference

#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdlib.h>
#include "system.h"
#include "xserial.h"
#include "task.h"
#include "cio.h"

Include dependency graph for xserial.c:

Go to the source code of this file.

Functions

static void InitXPort (xSERIAL *pS, unsigned short nTSize, unsigned short nRSize, unsigned short nPort, long nBaudRate)
static int ROpen (IOCB *pIOCB)
static int RGetC (IOCB *pIOCB)
static int RPutC (IOCB *pIOCB, int c)
static int RWrite (IOCB *pIOCB, char *b, int l)
static int RStatus (IOCB *pIOCB, int m)
static unsigned short xCalculateBaudRate (long nBR)
int xRInit (void)
static void RxIsr (xSERIAL *pI)
static void TxIsr (xSERIAL *pI)
static void TxDoneIsr (xSERIAL *pI)
void INT6_vect (void)

Variables

static xSERIALgXSerial [RS232_N_PORTS]
static H_JVEC RJump
static xRREG SAdr
static char * PNames [2]
static char * TNames [2]
static void(* irqfunc [3])(xSERIAL *pI)


Function Documentation

static void InitXPort ( xSERIAL pS,
unsigned short  nTSize,
unsigned short  nRSize,
unsigned short  nPort,
long  nBaudRate 
) [static]

void INT6_vect ( void   ) 

static int RGetC ( IOCB pIOCB  )  [static]

static int ROpen ( IOCB pIOCB  )  [static]

static int RPutC ( IOCB pIOCB,
int  c 
) [static]

static int RStatus ( IOCB pIOCB,
int  m 
) [static]

Definition at line 113 of file xserial.c.

References IOREC::nChar, _iocb::p, RS232_STAT_NREC, RS232_STAT_TMT, xSERIAL::Rx, and xSERIAL::Tx.

static int RWrite ( IOCB pIOCB,
char *  b,
int  l 
) [static]

Definition at line 101 of file xserial.c.

References _iocb::p, PendSemaphore(), PostSemaphore(), IOREC::pSem, RPutC(), and xSERIAL::Tx.

static void RxIsr ( xSERIAL pI  )  [static]

static void TxDoneIsr ( xSERIAL pI  )  [static]

Definition at line 226 of file xserial.c.

static void TxIsr ( xSERIAL pI  )  [static]

static unsigned short xCalculateBaudRate ( long  nBR  )  [static]

Definition at line 131 of file xserial.c.

Referenced by InitXPort().

int xRInit ( void   ) 

Definition at line 178 of file xserial.c.

References BIT, and CioAddHandler().


Variable Documentation

xSERIAL* gXSerial[RS232_N_PORTS] [static]

Definition at line 26 of file xserial.c.

void(* irqfunc[3])(xSERIAL *pI) [static]

Initial value:

Referenced by INT6_vect().

char* PNames[2] [static]

Initial value:

 {
        "RX0",
        "RX1"
}

Definition at line 139 of file xserial.c.

H_JVEC RJump [static]

Initial value:

 {
        ROpen,          
        0,                      
        RGetC,          
        0,                      
        RPutC,          
        RWrite,         
        RStatus,        
        0,              
        RInit           
}

Definition at line 28 of file xserial.c.

xRREG SAdr [static]

Initial value:

 {
        (unsigned char *)0xf050,
        (unsigned char *)0xf055,
        (unsigned char *)0xf056,
        (unsigned char *)0xf057,
        (unsigned char *)0xf051,
        (unsigned char *)0xf052,
        (unsigned short *)0xf053
}

Definition at line 41 of file xserial.c.

char* TNames[2] [static]

Initial value:

 {
        "TX0",
        "TX1"
}

Definition at line 144 of file xserial.c.


Generated on Sun Aug 31 13:30:08 2008 for FrankenRTOS by  doxygen 1.5.6