|
Atari coding BBS
Re: Zilog Falcon |
Posted by: earx
|
Sep,05.2006-09:03
|
and a little header file with some additional definitions:
--------------------------
#ifndef RT_COM_ZILOG_H
#define RT_COM_ZILOG_H
typedef void (*ZILOG_IRQ_CALLBACK_FN) (unsigned int com_port);
extern void cleanup_module( void );
extern int init_module( void );
/* all the parameters to configure a channel */
/* (a little more for sync modes...) */
struct rt_com_zilog_params
{
int baud;
int parity;
int stopbits; /* set 0 for sync */
int bitspercharacter;
/* extra parameters for sync modes */
int synccaracter;
int syncmode;
int internalclockoutput;
int clockdivisor; /* 1, 16, 32 or 64 */
// int crc;
/* for tests purposes (local loopback mode activated on Zilog) */
int loopbak;
/* activate Rx/Tx FIFOs (ESCC only) */
/* interrupt every 4 characters */
char activ_rx_fifo;
char activ_tx_fifo;
};
extern void rt_com_zilog_set_hunt_mode( unsigned int com );
extern void rt_com_zilog_set_hunt_mode_from_IT( unsigned int com );
extern int rt_com_zilog_clr_in( unsigned int);
extern int rt_com_zilog_clr_out( unsigned int);
extern int rt_com_zilog_read( unsigned int, char *, int );
extern void rt_com_zilog_write( unsigned int com, const char *buffer, int count );
extern int rt_com_zilog_setup_extended( unsigned int com, struct rt_com_zilog_params * params);
extern int rt_com_zilog_setup( unsigned int, int, unsigned int, unsigned int, unsigned int );
extern ZILOG_IRQ_CALLBACK_FN rt_com_zilog_set_callback (unsigned int com, ZILOG_IRQ_CALLBACK_FN fn);
extern ZILOG_IRQ_CALLBACK_FN rt_com_zilog_set_callback_each_car (unsigned int com, ZILOG_IRQ_CALLBACK_FN fn);
extern int rt_com_zilog_wr_modem( unsigned int com, int signal, int value );
/* parity flags */
#define RT_COM_PARITY_EVEN 0x18
#define RT_COM_PARITY_NONE 0x00
#define RT_COM_PARITY_ODD 0x08
/* sync modes */
#define RT_COM_MODE_MONOSYNC 1
#define RT_COM_MODE_BISYNC 2
#define RT_COM_MODE_SDLC 3
/* signals to used in rt_com_zilog_wr_modem() function */
#define RT_COM_DTR 0x01 /* Data Terminal Ready */
#define RT_COM_RTS 0x02 /* Request To Send */
extern int rt_com_zilog_driver_init_error;
#endif /* RT_COM_ZILOG_H */
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|