mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-19 23:28:32 -04:00
fbefe32017
Adds a method called `reserve()`, that will take a ByteBuffer::IoVec array of at least two elements, and return the number of elements filled out. 0 will be returned if `len` is over the total space of the buffer; 1 will be returned if there's enough contiguous bytes in the buffer; 2 will be returned if there are two non-contiguous blocks of memory. This method is suitable to be used with POSIX system calls such as readv(), and is an optimization to not require temporary memory copies while reading from a file descriptor. Also modify the write() method to use reserve(), so that similar checks are performed only in one place. |
||
---|---|---|
.. | ||
examples | ||
utility | ||
AnalogIn.h | ||
AP_HAL_Boards.h | ||
AP_HAL_Macros.h | ||
AP_HAL_Main.h | ||
AP_HAL_Namespace.h | ||
AP_HAL.h | ||
Device.h | ||
GPIO.h | ||
HAL.cpp | ||
HAL.h | ||
I2CDevice.h | ||
I2CDriver.h | ||
OpticalFlow.h | ||
RCInput.h | ||
RCOutput.h | ||
Scheduler.h | ||
Semaphores.h | ||
SPIDevice.h | ||
SPIDriver.h | ||
Storage.h | ||
system.h | ||
UARTDriver.cpp | ||
UARTDriver.h | ||
Util.cpp | ||
Util.h |