/device/google/contexthub/util/stm32_flash/ |
D | flash.c | 42 static inline size_t pad(ssize_t length) in pad() argument 44 return (length + 3) & ~3; in pad() 47 static inline size_t tot_len(ssize_t length) in tot_len() argument 50 return sizeof(uint32_t) + pad(length) + sizeof(uint32_t); in tot_len() 86 ssize_t length = 0; in main() local 128 length = strtol(optarg, NULL, 0); in main() 227 if (length == 0 || length > buf.st_size) in main() 228 length = buf.st_size; in main() 230 if (fread(&buffer[sizeof(uint32_t)], 1, length, file) < (size_t)length) { in main() 237 printf("Writing %zd bytes from %s to 0x%08x\n", length, in main() [all …]
|
D | uart.c | 29 uint8_t uart_write_data(handle_t *handle, uint8_t *buffer, int length) in uart_write_data() argument 33 buffer[length] = checksum(handle, buffer, length); in uart_write_data() 35 if (write(uart_handle->fd, buffer, length + 1) == (length + 1)) in uart_write_data() 45 int length = 2 * sizeof(uint8_t); in uart_write_cmd() local 48 length--; in uart_write_cmd() 50 if (write(uart_handle->fd, buffer, length) == length) in uart_write_cmd() 56 uint8_t uart_read_data(handle_t *handle, uint8_t *data, int length) in uart_read_data() argument 61 while (length > 0) { in uart_read_data() 62 ret = read(uart_handle->fd, data, length); in uart_read_data() 66 length -= ret; in uart_read_data()
|
D | stm32_bl.c | 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() 134 uint8_t read_memory(handle_t *handle, uint32_t addr, uint32_t length, uint8_t *buffer) in read_memory() argument 139 while (ret == CMD_ACK && length > offset) { in read_memory() 146 if (length-offset >= 256) { in read_memory() 154 write_len(handle, length-offset); in read_memory() 157 handle->read_data(handle, &buffer[offset], length - offset); in read_memory() 158 offset = length; in read_memory() [all …]
|
D | i2c.c | 26 uint8_t i2c_write_data(handle_t *handle, uint8_t *buffer, int length) in i2c_write_data() argument 30 buffer[length] = checksum(handle, buffer, length); in i2c_write_data() 32 if (write(i2c_handle->fd, buffer, length+1) == (length+1)) in i2c_write_data() 48 uint8_t i2c_read_data(handle_t *handle, uint8_t *data, int length) in i2c_read_data() argument 52 if (read(i2c_handle->fd, data, length) == length) in i2c_read_data()
|
D | stm32_bl.h | 38 uint8_t (*write_data)(struct handle *, uint8_t *buffer, int length); 40 uint8_t (*read_data)(struct handle *, uint8_t *buffer, int length); 44 uint8_t checksum(handle_t *handle, uint8_t *bytes, int length); 46 uint8_t read_memory(handle_t *handle, uint32_t addr, uint32_t length, uint8_t *buffer); 47 uint8_t write_memory(handle_t *handle, uint32_t addr, uint32_t length, uint8_t *buffer);
|
D | spi.c | 24 uint8_t spi_write_data(handle_t *handle, uint8_t *buffer, int length) in spi_write_data() argument 29 .len = length + 1, in spi_write_data() 35 buffer[length] = checksum(handle, buffer, length); in spi_write_data() 38 return buffer[length]; in spi_write_data() 66 uint8_t spi_read_data(handle_t *handle, uint8_t *data, int length) in spi_read_data() argument 81 .len = length, in spi_read_data()
|
/device/google/contexthub/firmware/lib/libc/ |
D | bcopy.c | 62 (void *dst0, const void *src0, size_t length) in memcpy() argument 67 bcopy(const void *src0, void *dst0, size_t length) in memcpy() 74 if (length == 0 || dst == src) /* nothing to do */ in memcpy() 93 if ((t ^ (uintptr_t)dst) & wmask || length < wsize) in memcpy() 94 t = length; in memcpy() 97 length -= t; in memcpy() 103 t = length / wsize; in memcpy() 105 t = length & wmask; in memcpy() 113 src += length; in memcpy() 114 dst += length; in memcpy() [all …]
|
D | memset.c | 51 bzero(void *dst0, size_t length) in bzero() argument 60 memset(void *dst0, int c0, size_t length) in bzero() 83 if (length < 3 * wsize) { in bzero() 84 while (length != 0) { in bzero() 86 --length; in bzero() 105 length -= t; in bzero() 112 t = length / wsize; in bzero() 119 t = length & wmask; in bzero()
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/sys/xt-shmem/ |
D | xf-sys.h | 54 #define XF_PROXY_INVALIDATE(buf, length) \ argument 55 ({ if ((length)) { xthal_dcache_region_invalidate((buf), (length)); barrier(); } buf; }) 58 #define XF_PROXY_FLUSH(buf, length) \ argument 59 …({ if ((length)) { barrier(); xthal_dcache_region_writeback((buf), (length)); XF_PROXY_BARRIER(); …
|
/device/linaro/hikey/hifi/xaf/host-apf/proxy/ |
D | xf-proxy.c | 54 m.id = msg->id, m.opcode = msg->opcode, m.length = msg->length; in xf_proxy_cmd_exec() 66 msg->id = m.id, msg->opcode = m.opcode, msg->length = m.length; in xf_proxy_cmd_exec() 71 …E(EXEC, _b("proxy[%p]: command done: [%08x:%p:%u]"), proxy, msg->opcode, msg->buffer, msg->length); in xf_proxy_cmd_exec() 85 msg.length = m->length; 147 msg.length = strlen(id) + 1; in xf_client_register() 178 msg.length = 0; in xf_client_unregister() 192 static inline int xf_proxy_buffer_alloc(xf_proxy_t *proxy, u32 length, void **buffer) in xf_proxy_buffer_alloc() argument 200 msg.length = length; in xf_proxy_buffer_alloc() 215 TRACE(MEM, _b("proxy-%u: allocated [%p:%u]"), core, *buffer, length); in xf_proxy_buffer_alloc() 221 static inline int xf_proxy_buffer_free(xf_proxy_t *proxy, void *buffer, u32 length) in xf_proxy_buffer_free() argument [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/core/ |
D | xf-io.c | 70 port->length = size; in xf_input_port_init() 98 else if (m->length == 0) in xf_input_port_put() 111 TRACE(INPUT, _b("input-port[%p]: buffer received - %u bytes"), port, m->length); in xf_input_port_put() 118 port->access = m->buffer, port->remaining = m->length; in xf_input_port_put() 149 port->access = m->buffer, port->remaining = m->length; in xf_input_port_complete() 183 n = (s32)(port->length - filled); in xf_input_port_fill() 251 if ((k = port->length - filled) > 0) in xf_input_port_pad() 256 port->filled = port->length; in xf_input_port_pad() 366 (port->buffer ? xf_mem_free(port->buffer, port->length, core, 0), port->buffer = NULL : 0); in xf_input_port_destroy() 385 port->length = size; in xf_output_port_init() [all …]
|
D | xf-shmem.c | 188 m->length = command->length; in xf_shmem_process_input() 190 TRACE(CMD, _b("C[%x]:(%x,%u,%p)"), m->id, m->opcode, m->length, m->buffer); in xf_shmem_process_input() 193 (XF_OPCODE_CDATA(m->opcode) ? XF_PROXY_INVALIDATE(m->buffer, m->length) : 0); in xf_shmem_process_input() 243 (XF_OPCODE_RDATA(m->opcode) ? XF_PROXY_FLUSH(m->buffer, m->length) : 0); in xf_shmem_process_output() 251 response->length = m->length; in xf_shmem_process_output() 259 if((m->length != 0) && (m->length != 20)) in xf_shmem_process_output() 261 prof.g_output_bytes += (unsigned long)m->length; in xf_shmem_process_output() 263 else if (m->length == 20) in xf_shmem_process_output() 276 TRACE(RSP, _b("R[%x]:(%x,%u,%p)"), m->id, m->opcode, m->length, m->buffer); in xf_shmem_process_output()
|
/device/google/bonito/json-c/ |
D | arraylist.c | 33 arr->length = 0; in array_list_new() 46 for(i = 0; i < arr->length; i++) in array_list_free() 55 if(i >= arr->length) return NULL; in array_list_get_idx() 81 if(arr->length <= idx) arr->length = idx + 1; in array_list_put_idx() 88 return array_list_put_idx(arr, arr->length, data); in array_list_add() 94 qsort(arr->array, arr->length, sizeof(arr->array[0]), in array_list_sort() 101 return arr->length; in array_list_length()
|
/device/google/coral/json-c/ |
D | arraylist.c | 33 arr->length = 0; in array_list_new() 46 for(i = 0; i < arr->length; i++) in array_list_free() 55 if(i >= arr->length) return NULL; in array_list_get_idx() 81 if(arr->length <= idx) arr->length = idx + 1; in array_list_put_idx() 88 return array_list_put_idx(arr, arr->length, data); in array_list_add() 94 qsort(arr->array, arr->length, sizeof(arr->array[0]), in array_list_sort() 101 return arr->length; in array_list_length()
|
/device/google/crosshatch/json-c/ |
D | arraylist.c | 33 arr->length = 0; in array_list_new() 46 for(i = 0; i < arr->length; i++) in array_list_free() 55 if(i >= arr->length) return NULL; in array_list_get_idx() 81 if(arr->length <= idx) arr->length = idx + 1; in array_list_put_idx() 88 return array_list_put_idx(arr, arr->length, data); in array_list_add() 94 qsort(arr->array, arr->length, sizeof(arr->array[0]), in array_list_sort() 101 return arr->length; in array_list_length()
|
/device/google/cuttlefish/host/frontend/gcastv2/signaling_server/assets/js/ |
D | logcat.js | 51 for (i = 0; i < array.length; ++i) { 59 let arrayBuffer = new ArrayBuffer(24 + payload.length); 64 setU32LE(array, 12, payload.length); 98 let arr = new Uint8Array(arr1.length + arr2.length); 100 arr.set(arr2, arr1.length); 108 while (array.length > 0) { 109 if (array.length < 24) { 125 if (array.length < 24 + payloadLength) { 169 array = array.subarray(24 + payloadLength, array.length);
|
/device/google/cuttlefish/common/frontend/socket_vsock_proxy/ |
D | main.cpp | 56 ssize_t SendAll(const char* packet, ssize_t length) { in SendAll() argument 58 while (written < length) { in SendAll() 64 length - written, MSG_NOSIGNAL); in SendAll() 90 ssize_t Recv(char* packet, ssize_t length) { in Recv() argument 91 auto size = socket_->Read(packet, length); in Recv() 108 ssize_t length = socket_receiver.Recv(packet, kMaxPacketSize); in SocketToVsock() local 109 if (length == 0 || vsock_sender.SendAll(packet, length) < 0) { in SocketToVsock() 121 ssize_t length = vsock_receiver.Recv(packet, kMaxPacketSize); in VsockToSocket() local 122 if (length == 0) { in VsockToSocket() 125 if (socket_sender.SendAll(packet, length) < 0) { in VsockToSocket()
|
/device/google/cuttlefish/common/libs/net/ |
D | netlink_request.cpp | 38 void* NetlinkRequest::AppendRaw(const void* data, size_t length) { in AppendRaw() argument 39 auto* output = static_cast<char*>(ReserveRaw(length)); in AppendRaw() 41 std::copy(input, input + length, output); in AppendRaw() 45 void* NetlinkRequest::ReserveRaw(size_t length) { in ReserveRaw() argument 47 request_.resize(original_size + RTA_ALIGN(length), '\0'); in ReserveRaw() 78 AppendTag(type, value.c_str(), value.length() + 1); in AddString() 103 int length = request_.size(); in PushList() local 105 lists_.push_back(std::make_pair(list, length)); in PushList()
|
/device/generic/opengl-transport/host/libs/virglrenderer/GLESv3_dec/ |
D | gles3.attrib | 71 dir length out 72 len length (sizeof(GLsizei)) 73 var_flag length nullAllowed 86 dir length out 87 len length (sizeof(GLsizei)) 88 var_flag length nullAllowed 130 dir length out 131 len length sizeof(GLsizei) 132 var_flag length nullAllowed 143 dir length out [all …]
|
/device/google/contexthub/util/nanotool/ |
D | nanopacket.cpp | 44 uint32_t Crc32(const uint8_t *buffer, int length) { in Crc32() argument 49 for (i = 0; i < (length >> 2); i++) { in Crc32() 54 if (length & 0x3) { in Crc32() 57 for (i*=4; i<length; i++) { in Crc32() 145 NanoPacket::ParseResult NanoPacket::Parse(uint8_t *buffer, size_t length, in Parse() argument 147 for (size_t i = 0; i < length; i++) { in Parse() 165 uint8_t length = buffer[i]; in Parse() local 166 if (length > 0) { in Parse() 191 *bytes_parsed = length; in Parse()
|
/device/google/contexthub/firmware/os/core/ |
D | bl.c | 76 uint32_t length; member 128 static bool blProgramFlash(uint8_t *dst, const uint8_t *src, uint32_t length, uint32_t key1, uint32… in blProgramFlash() argument 134 if (((length == 0)) || in blProgramFlash() 135 ((0xFFFFFFFF - (uint32_t)dst) < (length - 1)) || in blProgramFlash() 137 ((dst + length) > (mBlFlashTable[sector_cnt-1].address + in blProgramFlash() 138 mBlFlashTable[sector_cnt-1].length))) { in blProgramFlash() 145 dst < (mBlFlashTable[i].address + mBlFlashTable[i].length)) { in blProgramFlash() 155 while (j < length && i < sector_cnt) { in blProgramFlash() 156 if (offset == mBlFlashTable[i].length) { in blProgramFlash() 170 if (!blPlatProgramFlash(dst, src, length, key1, key2)) in blProgramFlash() [all …]
|
D | timer.c | 65 void timDelay(uint32_t length) in timDelay() argument 69 while (curTime + length > timGetTime()) in timDelay() 173 static uint32_t timTimerSetEx(uint64_t length, uint32_t jitterPpm, uint32_t driftPpm, TaggedPtr inf… in timTimerSetEx() argument 192 t->expires = curTime + length; in timTimerSetEx() 193 t->period = oneShot ? 0 : length; in timTimerSetEx() 211 uint32_t timTimerSet(uint64_t length, uint32_t jitterPpm, uint32_t driftPpm, TimTimerCbkF cbk, void… in timTimerSet() argument 213 …return timTimerSetEx(length, jitterPpm, driftPpm, taggedPtrMakeFromPtr(cbk), data, oneShot, false); in timTimerSet() 216 uint32_t timTimerSetAsApp(uint64_t length, uint32_t jitterPpm, uint32_t driftPpm, uint32_t tid, voi… in timTimerSetAsApp() argument 218 … return timTimerSetEx(length, jitterPpm, driftPpm, taggedPtrMakeFromUint(0), data, oneShot, false); in timTimerSetAsApp() 221 uint32_t timTimerSetNew(uint64_t length, const void* data, bool oneShot) in timTimerSetNew() argument [all …]
|
/device/google/contexthub/firmware/os/inc/ |
D | timer.h | 41 void timDelay(uint32_t length); 43 uint32_t timTimerSet(uint64_t length, uint32_t jitterPpm, uint32_t driftPpm, TimTimerCbkF cbk, void… 44 uint32_t timTimerSetAsApp(uint64_t length, uint32_t jitterPpm, uint32_t driftPpm, uint32_t tid, voi… 45 uint32_t timTimerSetNew(uint64_t length, const void* data, bool oneShot);
|
/device/linaro/hikey/bluetooth/ |
D | hci_protocol.cc | 47 size_t HciProtocol::WriteSafely(int fd, const uint8_t* data, size_t length) { in WriteSafely() argument 49 while (length > 0) { in WriteSafely() 51 TEMP_FAILURE_RETRY(write(fd, data + transmitted_length, length)); in WriteSafely() 65 length -= ret; in WriteSafely()
|
/device/generic/goldfish/dhcp/common/ |
D | message.cpp | 210 uint8_t length = 0; in type() local 211 const uint8_t* opt = getOption(OPT_MESSAGE_TYPE, &length); in type() 212 if (opt && length == 1) { in type() 219 uint8_t length = 0; in serverId() local 220 const uint8_t* opt = getOption(OPT_SERVER_ID, &length); in serverId() 221 if (opt && length == 4) { in serverId() 228 uint8_t length = 0; in requestedIp() local 229 const uint8_t* opt = getOption(OPT_REQUESTED_IP, &length); in requestedIp() 230 if (opt && length == 4) { in requestedIp() 286 uint8_t* length) const { in getOption() [all …]
|