Lines Matching refs:length
26 uint8_t checksum(__attribute__((unused)) handle_t *handle, uint8_t *bytes, int length) in checksum() argument
31 if (length == 1) { in checksum()
33 } else if (length > 1) { in checksum()
34 for (csum=0,i=0; i<length; i++) in checksum()
120 uint8_t read_memory(handle_t *handle, uint32_t addr, uint32_t length, uint8_t *buffer) in read_memory() argument
125 while (ret == CMD_ACK && length > offset) { in read_memory()
132 if (length-offset >= 256) { in read_memory()
140 write_len(handle, length-offset); in read_memory()
143 handle->read_data(handle, &buffer[offset], length - offset); in read_memory()
144 offset = length; in read_memory()
155 uint8_t write_memory(handle_t *handle, uint32_t addr, uint32_t length, uint8_t *buffer) in write_memory() argument
160 while (ret == CMD_ACK && length > offset) { in write_memory()
167 if (length-offset >= 256) { in write_memory()
171 write_len_data(handle, length-offset, &buffer[offset]); in write_memory()
172 offset = length; in write_memory()