Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Raw Mode

Raw Mode mechanism. More...

Functions

int brlapi_getRaw (void)
int brlapi_leaveRaw (void)
ssize_t brlapi_sendRaw (const unsigned char *buf, size_t size)
ssize_t brlapi_recvRaw (unsigned char *buf, size_t size)

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

ssize_t 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

ssize_t 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:
size on success, -1 on error


Generated on Tue Jul 13 07:08:03 2004 for BrlAPI by doxygen1.2.18