brlapi_driverspecific - Driver-Specific modes
Contents
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_enterRawMode(), then brlapi_sendRaw() and brlapi_recvRaw(), and
finally give control back thanks to brlapi_leaveRawMode().
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_getDriverName().
The client can also make brltty close the driver by using brlapi_suspendDriver(), and resume it again
with brlapi_resumeDriver(). This should not be used if possible: raw mode should be sufficient for any
use. If not, please ask for features :)
Function Documentation
intBRLAPI_STDCALLbrlapi__enterRawMode(brlapi_handle_t*handle,constchar*driver)intBRLAPI_STDCALLbrlapi__leaveRawMode(brlapi_handle_t*handle)ssize_tBRLAPI_STDCALLbrlapi__recvRaw(brlapi_handle_t*handle,void*buffer,size_tsize)intBRLAPI_STDCALLbrlapi__resumeDriver(brlapi_handle_t*handle)ssize_tBRLAPI_STDCALLbrlapi__sendRaw(brlapi_handle_t*handle,constvoid*buffer,size_tsize)intBRLAPI_STDCALLbrlapi__suspendDriver(brlapi_handle_t*handle,constchar*driver)intBRLAPI_STDCALLbrlapi_enterRawMode(constchar*driver)
Switch to Raw mode
TODO: document which functions work in raw mode.
Parametersdriver Specifies the name of the driver for which the raw communication will be established.
Returns
0 on success, -1 on error
intBRLAPI_STDCALLbrlapi_leaveRawMode(void)
Leave Raw mode
Returns
0 on success, -1 on error
ssize_tBRLAPI_STDCALLbrlapi_recvRaw(void*buffer,size_tsize)
Get Raw data
Parametersbuffer points on a buffer where the function will store the received data;
size holds the buffer size.
Returns
its size, -1 on error, or on interruption by a signal or a parameter change notification, in which
case brlapi_errno will be BRLAPI_ERROR_LIBCERR and errno will be EINTR.
intBRLAPI_STDCALLbrlapi_resumeDriver(void)
Resume braille driver
Returns
-1 on error
ssize_tBRLAPI_STDCALLbrlapi_sendRaw(constvoid*buffer,size_tsize)
Send Raw data
Parametersbuffer points on the data;
size holds the packet size.
Returns
size on success, -1 on error
intBRLAPI_STDCALLbrlapi_suspendDriver(constchar*driver)
Suspend braille driver
Parametersdriver Specifies the name of the driver which will be suspended.
Returns
-1 on error
Name
brlapi_driverspecific - Driver-Specific modes
- Raw and Suspend Modes mechanism.
Synopsis
Functions
int BRLAPI_STDCALLbrlapi_enterRawMode (const char *driver)
int BRLAPI_STDCALLbrlapi__enterRawMode (brlapi_handle_t *handle, const char *driver)
int BRLAPI_STDCALLbrlapi_leaveRawMode (void)
int BRLAPI_STDCALLbrlapi__leaveRawMode (brlapi_handle_t *handle)
ssize_t BRLAPI_STDCALLbrlapi_sendRaw (const void *buffer, size_t size)
ssize_t BRLAPI_STDCALLbrlapi__sendRaw (brlapi_handle_t *handle, const void *buffer, size_t size)
ssize_t BRLAPI_STDCALLbrlapi_recvRaw (void *buffer, size_t size)
ssize_t BRLAPI_STDCALLbrlapi__recvRaw (brlapi_handle_t *handle, void *buffer, size_t size)
int BRLAPI_STDCALLbrlapi_suspendDriver (const char *driver)
int BRLAPI_STDCALLbrlapi__suspendDriver (brlapi_handle_t *handle, const char *driver)
int BRLAPI_STDCALLbrlapi_resumeDriver (void)
int BRLAPI_STDCALLbrlapi__resumeDriver (brlapi_handle_t *handle)
