base:rs232silversurfer.h
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | base:rs232silversurfer.h [2015-04-17 04:33] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== rs232silversurfer.h ====== | ||
+ | < | ||
+ | /* | ||
+ | * rs232silversurfer.h | ||
+ | * | ||
+ | * Groepaz/ | ||
+ | * | ||
+ | * This defines for the SilverSurver (16c550 UART) what Ullrichs rs232 module | ||
+ | * defines for the Swithlink/ | ||
+ | * | ||
+ | * this driver operates in polling mode only atm ! | ||
+ | * | ||
+ | */ | ||
+ | #ifndef _RS232silversurfer_H | ||
+ | #define _RS232silversurfer_H | ||
+ | |||
+ | / | ||
+ | /* | ||
+ | / | ||
+ | |||
+ | /* Baudrate settings */ | ||
+ | #define RS_BAUD_50 | ||
+ | #define RS_BAUD_110 | ||
+ | #define RS_BAUD_134_5 | ||
+ | #define RS_BAUD_300 | ||
+ | #define RS_BAUD_600 | ||
+ | #define RS_BAUD_1200 | ||
+ | #define RS_BAUD_2400 | ||
+ | #define RS_BAUD_4800 | ||
+ | #define RS_BAUD_9600 | ||
+ | #define RS_BAUD_19200 | ||
+ | #define RS_BAUD_38400 | ||
+ | #define RS_BAUD_57600 | ||
+ | #define RS_BAUD_115200 | ||
+ | #define RS_BAUD_230400 | ||
+ | |||
+ | /* Stop bit settings */ | ||
+ | #define RS_STOP_1 | ||
+ | #define RS_STOP_2 | ||
+ | |||
+ | /* Data bit settings */ | ||
+ | #define RS_BITS_5 | ||
+ | #define RS_BITS_6 | ||
+ | #define RS_BITS_7 | ||
+ | #define RS_BITS_8 | ||
+ | |||
+ | /* Parity settings */ | ||
+ | #define RS_PAR_NONE | ||
+ | #define RS_PAR_ODD | ||
+ | #define RS_PAR_EVEN | ||
+ | #define RS_PAR_MARK | ||
+ | #define RS_PAR_SPACE | ||
+ | |||
+ | /* Bit masks to mask out things from the status returned by rs232_status */ | ||
+ | #define RS_STATUS_IRQ | ||
+ | #define RS_STATUS_OVERRUN | ||
+ | #define RS_STATUS_PE | ||
+ | #define RS_STATUS_FE | ||
+ | #define RS_STATUS_DSR | ||
+ | #define RS_STATUS_THRE | ||
+ | #define RS_STATUS_DCD | ||
+ | #define RS_STATUS_RDRF | ||
+ | |||
+ | /* Error codes returned by all functions */ | ||
+ | #define RS_ERR_OK | ||
+ | #define RS_ERR_NOT_INITIALIZED | ||
+ | #define RS_ERR_BAUD_TOO_FAST | ||
+ | #define RS_ERR_BAUD_NOT_AVAIL | ||
+ | #define RS_ERR_NO_DATA | ||
+ | #define RS_ERR_OVERFLOW | ||
+ | |||
+ | / | ||
+ | /* | ||
+ | / | ||
+ | |||
+ | unsigned char __fastcall__ ss232_init (char hacked); | ||
+ | /* Initialize the serial port, install the interrupt handler. The parameter | ||
+ | * has no effect for now and should be set to 0. | ||
+ | */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_params (unsigned char params, unsigned char parity); | ||
+ | /* Set the port parameters. Use a combination of the #defined values above. */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_done (void); | ||
+ | /* Close the port, deinstall the interrupt hander. You MUST call this function | ||
+ | * before terminating the program, otherwise the machine may crash later. If | ||
+ | * in doubt, install an exit handler using atexit(). The function will do | ||
+ | * nothing, if it was already called. | ||
+ | */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_get (char* b); | ||
+ | /* Get a character from the serial port. If no characters are available, the | ||
+ | * function will return RS_ERR_NO_DATA, | ||
+ | */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_put (char b); | ||
+ | /* Send a character via the serial port. There is a transmit buffer, but | ||
+ | * transmitting is not done via interrupt. The function returns | ||
+ | * RS_ERR_OVERFLOW if there is no space left in the transmit buffer. | ||
+ | */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_pause (void); | ||
+ | /* Assert flow control and disable interrupts. */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_unpause (void); | ||
+ | /* Re-enable interrupts and release flow control */ | ||
+ | |||
+ | unsigned char __fastcall__ ss232_status (unsigned char* status, | ||
+ | | ||
+ | /* Return the serial port status. */ | ||
+ | |||
+ | /* End of rs232silversurfer.h */ | ||
+ | #endif | ||
+ | </ |
base/rs232silversurfer.h.txt · Last modified: 2015-04-17 04:33 by 127.0.0.1