ARM9教程DSP教程FPGA教程CPLD教程12A软硬件设计0229
/*****************************************************************************\ |*
|* COPYRIGHT: Copyright (c) 2004, PurPer |*
|* DESCRIPTION: SRL0 device driver |*
\*****************************************************************************/
#ifndef _WB_SRL0_H #define _WB_SRL0_H
//.............................................................................. // Initialization routine. Must be called to setup the SRL0 controller // This version of the device driver always uses 8 data bits, no parity, // one stop bit, although other modes can be set by directly accessing the // SRL0 core.
void srl0_init ( unsigned int base, unsigned int baudrate );
//.............................................................................. // These functions go straight to the controller. They do not queue // or use interrupts.
unsigned char srl0_get_byte ( unsigned int base ); unsigned char srl0_get_byte_blocking ( unsigned int base );
void srl0_put_byte ( unsigned int base, unsigned char val ); void srl0_put_byte_blocking ( unsigned int base, unsigned char val );
//.............................................................................. // Receive / transmit buffers.
// These are used when interrupt driven serial communications are used. // Application code should declare the buffers, set the buffer_size