Raw Mode
Raw Mode mechanism.
More...
Detailed Description
If the application wants to directly talk to the braille terminal, it should use Raw Mode. In this special mode, the driver gives the whole control of the terminal to it: brltty doesn't work any more.
For this, it simply has to call brlapi_getRaw(), then brlapi_sendRaw() and brlapi_recvRaw(), and finally give control back thanks to brlapi_leaveRaw()
Special care of the terminal should be taken, since one might completely trash the terminal's data, or even lock it ! The application should always check for terminal's type thanks to brlapi_getDriverId().
Function Documentation
int brlapi_getRaw |
( |
void |
|
) |
|
|
|
Switch to Raw mode - Returns:
- 0 on success, -1 on error
|
int brlapi_leaveRaw |
( |
void |
|
) |
|
|
|
Leave Raw mode - Returns:
- 0 on success, -1 on error
|
int brlapi_recvRaw |
( |
unsigned char * |
buf, |
|
|
size_t |
size |
|
) |
|
|
|
Get a Raw packet
- Parameters:
-
| buf | points on a buffer where the function will store the received packet; |
| size | holds the buffer size. |
- Returns:
- its size, -1 on error, or -2 on EOF
|
int brlapi_sendRaw |
( |
const unsigned char * |
buf, |
|
|
size_t |
size |
|
) |
|
|
|
Send a Raw Packet
- Parameters:
-
| buf | points on the packet; |
| size | holds the packet size. |
- Returns:
- 0 on success, -1 on error
|
Generated on Thu Oct 28 10:47:09 2004 for BrlAPI by
1.3.9.1