MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / _write_fd

Method _write_fd

libraries/AP_HAL_Linux/UARTDriver.cpp:303–317  ·  view source on GitHub ↗

try writing n bytes, handling an unresponsive port */

Source from the content-addressed store, hash-verified

301 try writing n bytes, handling an unresponsive port
302 */
303int UARTDriver::_write_fd(const uint8_t *buf, uint16_t n)
304{
305 /*
306 allow for delayed connection. This allows ArduPilot to start
307 before a network interface is available.
308 */
309 if (!_connected) {
310 _connected = _device->open();
311 }
312 if (!_connected) {
313 return 0;
314 }
315
316 return _device->write(buf, n);
317}
318
319/*
320 try reading n bytes, handling an unresponsive port

Callers

nothing calls this directly

Calls 2

openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected