90 |
|
delete device; |
91 |
|
} |
92 |
|
|
93 |
< |
virtual int16 Open(uint16 config); |
94 |
< |
virtual int16 PrimeIn(uint32 pb, uint32 dce); |
95 |
< |
virtual int16 PrimeOut(uint32 pb, uint32 dce); |
96 |
< |
virtual int16 Control(uint32 pb, uint32 dce, uint16 code); |
97 |
< |
virtual int16 Status(uint32 pb, uint32 dce, uint16 code); |
98 |
< |
virtual int16 Close(void); |
93 |
> |
virtual int16 open(uint16 config); |
94 |
> |
virtual int16 prime_in(uint32 pb, uint32 dce); |
95 |
> |
virtual int16 prime_out(uint32 pb, uint32 dce); |
96 |
> |
virtual int16 control(uint32 pb, uint32 dce, uint16 code); |
97 |
> |
virtual int16 status(uint32 pb, uint32 dce, uint16 code); |
98 |
> |
virtual int16 close(void); |
99 |
|
|
100 |
|
private: |
101 |
|
bool configure(uint16 config); |
154 |
|
* Open serial port |
155 |
|
*/ |
156 |
|
|
157 |
< |
int16 BeSERDPort::Open(uint16 config) |
157 |
> |
int16 BeSERDPort::open(uint16 config) |
158 |
|
{ |
159 |
|
// Don't open NULL name devices |
160 |
|
if (device_name == NULL) |
204 |
|
* Read data from port |
205 |
|
*/ |
206 |
|
|
207 |
< |
int16 BeSERDPort::PrimeIn(uint32 pb, uint32 dce) |
207 |
> |
int16 BeSERDPort::prime_in(uint32 pb, uint32 dce) |
208 |
|
{ |
209 |
|
// Send input command to input_thread |
210 |
|
read_done = false; |
221 |
|
* Write data to port |
222 |
|
*/ |
223 |
|
|
224 |
< |
int16 BeSERDPort::PrimeOut(uint32 pb, uint32 dce) |
224 |
> |
int16 BeSERDPort::prime_out(uint32 pb, uint32 dce) |
225 |
|
{ |
226 |
|
// Send output command to output_thread |
227 |
|
write_done = false; |
238 |
|
* Control calls |
239 |
|
*/ |
240 |
|
|
241 |
< |
int16 BeSERDPort::Control(uint32 pb, uint32 dce, uint16 code) |
241 |
> |
int16 BeSERDPort::control(uint32 pb, uint32 dce, uint16 code) |
242 |
|
{ |
243 |
|
switch (code) { |
244 |
|
case 1: // KillIO |
433 |
|
* Status calls |
434 |
|
*/ |
435 |
|
|
436 |
< |
int16 BeSERDPort::Status(uint32 pb, uint32 dce, uint16 code) |
436 |
> |
int16 BeSERDPort::status(uint32 pb, uint32 dce, uint16 code) |
437 |
|
{ |
438 |
|
switch (code) { |
439 |
|
case kSERDInputCount: |
485 |
|
* Close serial port |
486 |
|
*/ |
487 |
|
|
488 |
< |
int16 BeSERDPort::Close() |
488 |
> |
int16 BeSERDPort::close() |
489 |
|
{ |
490 |
|
// Kill threads |
491 |
|
status_t l; |