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

Method _write

libraries/AP_HAL_ChibiOS/UARTDriver.cpp:775–788  ·  view source on GitHub ↗

write a block of bytes to the port */

Source from the content-addressed store, hash-verified

773
774/* write a block of bytes to the port */
775size_t UARTDriver::_write(const uint8_t *buffer, size_t size)
776{
777 if (!_tx_initialised) {
778 return 0;
779 }
780
781 WITH_SEMAPHORE(_write_mutex);
782
783 size_t ret = _writebuf.write(buffer, size);
784 if (unbuffered_writes) {
785 chEvtSignal(uart_thread_ctx, EVT_TRANSMIT_DATA_READY);
786 }
787 return ret;
788}
789
790/*
791 wait for data to arrive, or a timeout. Return true if data has

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected