---
name: "brlapi_driverspecific"
section: "3"
platform: "linux"
package: "libbrlapi-dev"
version: "6.7-3.1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/brlapi_driverspecific"
---

# brlapi\_driverspecific(3)

Driver-Specific modes - Raw and Suspend Modes mechanism.

## NAME

brlapi\_driverspecific - Driver-Specific modes

 \- Raw and Suspend Modes mechanism.

## SYNOPSIS

### Functions

int **BRLAPI\_STDCALL** **brlapi\_enterRawMode** (const char \*driver)\
 int **BRLAPI\_STDCALL** **brlapi\_\_enterRawMode** (**brlapi\_handle\_t** \*handle, const char \*driver)\
 int **BRLAPI\_STDCALL** **brlapi\_leaveRawMode** (void)\
 int **BRLAPI\_STDCALL** **brlapi\_\_leaveRawMode** (**brlapi\_handle\_t** \*handle)\
 ssize\_t **BRLAPI\_STDCALL** **brlapi\_sendRaw** (const void \*buffer, size\_t size)\
 ssize\_t **BRLAPI\_STDCALL** **brlapi\_\_sendRaw** (**brlapi\_handle\_t** \*handle, const void \*buffer, size\_t size)\
 ssize\_t **BRLAPI\_STDCALL** **brlapi\_recvRaw** (void \*buffer, size\_t size)\
 ssize\_t **BRLAPI\_STDCALL** **brlapi\_\_recvRaw** (**brlapi\_handle\_t** \*handle, void \*buffer, size\_t size)\
 int **BRLAPI\_STDCALL** **brlapi\_suspendDriver** (const char \*driver)\
 int **BRLAPI\_STDCALL** **brlapi\_\_suspendDriver** (**brlapi\_handle\_t** \*handle, const char \*driver)\
 int **BRLAPI\_STDCALL** **brlapi\_resumeDriver** (void)\
 int **BRLAPI\_STDCALL** **brlapi\_\_resumeDriver** (**brlapi\_handle\_t** \*handle)\

## 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

### int BRLAPI\_STDCALL brlapi\_\_enterRawMode (brlapi\_handle\_t \* handle, const char \* driver)

### int BRLAPI\_STDCALL brlapi\_\_leaveRawMode (brlapi\_handle\_t \* handle)

### ssize\_t BRLAPI\_STDCALL brlapi\_\_recvRaw (brlapi\_handle\_t \* handle, void \* buffer, size\_t size)

### int BRLAPI\_STDCALL brlapi\_\_resumeDriver (brlapi\_handle\_t \* handle)

### ssize\_t BRLAPI\_STDCALL brlapi\_\_sendRaw (brlapi\_handle\_t \* handle, const void \* buffer, size\_t size)

### int BRLAPI\_STDCALL brlapi\_\_suspendDriver (brlapi\_handle\_t \* handle, const char \* driver)

### int BRLAPI\_STDCALL brlapi\_enterRawMode (const char \* driver)

Switch to Raw mode

TODO: document which functions work in raw mode.

**Parameters**

*driver* Specifies the name of the driver for which the raw communication will be established.

**Returns**

0 on success, -1 on error

### int BRLAPI\_STDCALL brlapi\_leaveRawMode (void)

Leave Raw mode

**Returns**

0 on success, -1 on error

### ssize\_t BRLAPI\_STDCALL brlapi\_recvRaw (void \* buffer, size\_t size)

Get Raw data

**Parameters**

*buffer* 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.

### int BRLAPI\_STDCALL brlapi\_resumeDriver (void)

Resume braille driver

**Returns**

\-1 on error

### ssize\_t BRLAPI\_STDCALL brlapi\_sendRaw (const void \* buffer, size\_t size)

Send Raw data

**Parameters**

*buffer* points on the data; \
 *size* holds the packet size.

**Returns**

size on success, -1 on error

### int BRLAPI\_STDCALL brlapi\_suspendDriver (const char \* driver)

Suspend braille driver

**Parameters**

*driver* Specifies the name of the driver which will be suspended.

**Returns**

\-1 on error

## Author

Generated automatically by Doxygen for BrlAPI from the source code.
