1Driver-Specific modes(3) BrlAPI Driver-Specific modes(3)
2
3
4
6 Driver-Specific modes - Raw and Suspend Modes mechanism.
7
8
9 Functions
10 int BRLAPI_STDCALL brlapi_enterRawMode (const char *driver)
11 int BRLAPI_STDCALL brlapi__enterRawMode (brlapi_handle_t *handle, const
12 char *driver)
13 int BRLAPI_STDCALL brlapi_leaveRawMode (void)
14 int BRLAPI_STDCALL brlapi__leaveRawMode (brlapi_handle_t *handle)
15 ssize_t BRLAPI_STDCALL brlapi_sendRaw (const void *buffer, size_t size)
16 ssize_t BRLAPI_STDCALL brlapi__sendRaw (brlapi_handle_t *handle, const
17 void *buffer, size_t size)
18 ssize_t BRLAPI_STDCALL brlapi_recvRaw (void *buffer, size_t size)
19 ssize_t BRLAPI_STDCALL brlapi__recvRaw (brlapi_handle_t *handle, void
20 *buffer, size_t size)
21 int BRLAPI_STDCALL brlapi_suspendDriver (const char *driver)
22 int BRLAPI_STDCALL brlapi__suspendDriver (brlapi_handle_t *handle,
23 const char *driver)
24 int BRLAPI_STDCALL brlapi_resumeDriver (void)
25 int BRLAPI_STDCALL brlapi__resumeDriver (brlapi_handle_t *handle)
26
28 If the application wants to directly talk to the braille terminal, it
29 should use Raw Mode. In this special mode, the driver gives the whole
30 control of the terminal to it: brltty doesn't work any more.
31
32 For this, it simply has to call brlapi_enterRawMode(), then
33 brlapi_sendRaw() and brlapi_recvRaw(), and finally give control back
34 thanks to brlapi_leaveRawMode().
35
36 Special care of the terminal should be taken, since one might
37 completely trash the terminal's data, or even lock it! The application
38 should always check for terminal's type thanks to
39 brlapi_getDriverName().
40
41 The client can also make brltty close the driver by using
42 brlapi_suspendDriver(), and resume it again with brlapi_resumeDriver().
43 This should not be used if possible: raw mode should be sufficient for
44 any use. If not, please ask for features :)
45
47 int BRLAPI_STDCALL brlapi__enterRawMode (brlapi_handle_t * handle, const
48 char * driver)
49 int BRLAPI_STDCALL brlapi__leaveRawMode (brlapi_handle_t * handle)
50 ssize_t BRLAPI_STDCALL brlapi__recvRaw (brlapi_handle_t * handle, void *
51 buffer, size_t size)
52 int BRLAPI_STDCALL brlapi__resumeDriver (brlapi_handle_t * handle)
53 ssize_t BRLAPI_STDCALL brlapi__sendRaw (brlapi_handle_t * handle, const
54 void * buffer, size_t size)
55 int BRLAPI_STDCALL brlapi__suspendDriver (brlapi_handle_t * handle, const
56 char * driver)
57 int BRLAPI_STDCALL brlapi_enterRawMode (const char * driver)
58 Switch to Raw mode
59
60 Parameters:
61 driver Specifies the name of the driver for which the raw
62 communication will be established.
63
64 Returns:
65 0 on success, -1 on error
66
67 int BRLAPI_STDCALL brlapi_leaveRawMode (void)
68 Leave Raw mode
69
70 Returns:
71 0 on success, -1 on error
72
73 ssize_t BRLAPI_STDCALL brlapi_recvRaw (void * buffer, size_t size)
74 Get Raw data
75
76 Parameters:
77 buffer points on a buffer where the function will store the
78 received data;
79 size holds the buffer size.
80
81 Returns:
82 its size, -1 on error or signal interruption
83
84 int BRLAPI_STDCALL brlapi_resumeDriver (void)
85 Resume braille driver
86
87 Returns:
88 -1 on error
89
90 ssize_t BRLAPI_STDCALL brlapi_sendRaw (const void * buffer, size_t size)
91 Send Raw data
92
93 Parameters:
94 buffer points on the data;
95 size holds the packet size.
96
97 Returns:
98 size on success, -1 on error
99
100 int BRLAPI_STDCALL brlapi_suspendDriver (const char * driver)
101 Suspend braille driver
102
103 Parameters:
104 driver Specifies the name of the driver which will be suspended.
105
106 Returns:
107 -1 on error
108
109Version 1.0 4 Jun 2007 Driver-Specific modes(3)