brlapi_driverspecific(3)

πŸ’– brlapi_driverspecific β€” Driver-Specific modes πŸ’–

okay bestie, pull up a chair, because this is the brlapi_driverspecific(3) page from the Library Functions Manual and it's lowkey one of the most "handle with care, queen" pages in the whole BrlAPI library. we're talking Raw and Suspend Modes, the mechanism where you take the wheel and brltty politely steps aside. ✨


πŸŽ€ NAME πŸŽ€

brlapi_driverspecific β€” Driver-Specific modes

  • Raw and Suspend Modes mechanism. that's the whole vibe. πŸ¦‹

✨ 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 🌸

so, bestie: if your application wants to directly talk to the braille terminal, it should use Raw Mode. it's giving main character energy. in this special mode, the driver hands the whole control of the terminal over to you β€” meaning brltty doesn't work any more. like, it's not driving. you're driving. πŸš—πŸ’¨

for this, it simply has to call brlapi_enterRawMode(), then brlapi_sendRaw() and brlapi_recvRaw(), and finally give control back thanks to brlapi_leaveRawMode(). that's the whole lil ritual. πŸ•―οΈ

⚠️ special care of the terminal should be taken, since one might completely trash the terminal's data, or even lock it! not dramatic, fr fr. the application should always check for the terminal's type thanks to brlapi_getDriverName(). do not skip the vibe check. πŸ’€

the client can also make brltty close the driver by using brlapi_suspendDriver(), and resume it again with brlapi_resumeDriver(). but 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)

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi__leaveRawMode (brlapi_handle_t * handle)

References BRLAPI_STDCALL.


ssize_t BRLAPI_STDCALL brlapi__recvRaw (brlapi_handle_t * handle, void * buffer, size_t size)

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi__resumeDriver (brlapi_handle_t * handle)

References BRLAPI_STDCALL.


ssize_t BRLAPI_STDCALL brlapi__sendRaw (brlapi_handle_t * handle, const void * buffer, size_t size)

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi__suspendDriver (brlapi_handle_t * handle, const char * driver)

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi_enterRawMode (const char * driver)

Switch to Raw mode πŸ”₯

TODO: document which functions work in raw mode.

(yes bestie, that TODO is literally in the original. we don't make the rules, we just report them. πŸ™ˆ)

Parameters

  • driver β€” Specifies the name of the driver for which the raw communication will be established.

Returns

0 on success, -1 on error

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi_leaveRawMode (void )

Leave Raw mode πŸšͺ

Returns

0 on success, -1 on error

References BRLAPI_STDCALL.


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.

References BRLAPI_STDCALL.


int BRLAPI_STDCALL brlapi_resumeDriver (void )

Resume braille driver ▢️

Returns

-1 on error

References BRLAPI_STDCALL.


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

References BRLAPI_STDCALL.


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

References BRLAPI_STDCALL.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for BrlAPI from the source code. it's giving "the robot wrote my essay and honestly it ate". πŸ€–βœ¨


and that's the whole page, bestie! this one's from the BrlAPI crew, Version 0.8, and you're reading brlapi_driverspecific(3). now go forth, take control of that terminal, and please check the driver name first. periodt. πŸ’œ

πŸ“¦ where this page comes from