Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 33) sorted by relevance

12

/device/google/dragon/lights/
Dlights.c74 int fd, bytes, amt, ret = 0; in write_brightness() local
76 bytes = snprintf(path, sizeof(path), "%s/brightness", in write_brightness()
78 if (bytes < 0 || (size_t)bytes >= sizeof(path)) { in write_brightness()
80 "failed to create brightness path %d\n", bytes); in write_brightness()
91 bytes = snprintf(buffer, sizeof(buffer), "%d\n", brightness); in write_brightness()
92 if (bytes < 0 || (size_t)bytes >= sizeof(buffer)) { in write_brightness()
95 brightness, bytes); in write_brightness()
99 amt = write(fd, buffer, bytes); in write_brightness()
100 if (amt != bytes) { in write_brightness()
103 bytes); in write_brightness()
[all …]
/device/google/contexthub/firmware/src/drivers/ams_tmd2772/
Dams_tmd2772.c143 uint8_t bytes[16]; member
249 mData.txrxBuf.bytes[0] = AMS_TMD2772_REG_ENABLE; in setMode()
250 mData.txrxBuf.bytes[1] = POWER_ON_BIT | WAIT_ENABLE_BIT | in setMode()
252 mData.txrxBuf.bytes[2] = AMS_TMD2772_ATIME_SETTING; in setMode()
253 mData.txrxBuf.bytes[3] = AMS_TMD2772_PTIME_SETTING; in setMode()
254 …mData.txrxBuf.bytes[4] = alsOn ? AMS_TMD2772_WTIME_SETTING_ALS_ON : AMS_TMD2772_WTIME_SETTING_ALS_… in setMode()
255 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, mData.txrxBuf.bytes, 5, in setMode()
425 mData.txrxBuf.bytes[0] = AMS_TMD2772_REG_ENABLE; in handle_calibration_event()
426 mData.txrxBuf.bytes[1] = POWER_ON_BIT | PROX_ENABLE_BIT; in handle_calibration_event()
427 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, mData.txrxBuf.bytes, 2, in handle_calibration_event()
[all …]
/device/google/contexthub/util/nanotool/
Dandroidcontexthub.cpp59 const uint8_t *bytes = (const uint8_t *) data; in AppendBytes() local
61 buffer.push_back(bytes[i]); in AppendBytes()
66 sp<JSONObject> json, std::vector<uint8_t>& bytes) { in CopyInt32Array() argument
72 AppendBytes(&val, sizeof(uint32_t), bytes); in CopyInt32Array()
81 std::vector<uint8_t>& bytes) { in GetCalibrationBytes() argument
88 success = CopyInt32Array(key, json, bytes); in GetCalibrationBytes()
96 AppendBytes(&value, sizeof(float), bytes); in GetCalibrationBytes()
104 success = CopyInt32Array(key, json, bytes); in GetCalibrationBytes()
109 AppendBytes(&value, sizeof(int32_t), bytes); in GetCalibrationBytes()
255 bool AndroidContextHub::FlashSensorHub(const std::vector<uint8_t>& bytes) { in FlashSensorHub() argument
[all …]
Dandroidcontexthub.h47 bool FlashSensorHub(const std::vector<uint8_t>& bytes) override;
/device/huawei/angler/vr/
Dvr.c84 int bytes = snprintf(buffer, sizeof(buffer), "%d", input); in write_int() local
86 if (bytes < 0 || (size_t) bytes >= sizeof(buffer)) { in write_int()
91 return write_string(buffer, (size_t) bytes, outFile); in write_int()
/device/lge/bullhead/liblight/
Dlights.c67 int bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); in write_int() local
68 int amt = write(fd, buffer, bytes); in write_int()
88 int bytes = snprintf(buffer, sizeof(buffer), "%d %d\n", on, off); in write_on_off() local
89 int amt = write(fd, buffer, bytes); in write_on_off()
/device/generic/goldfish/audio/
Daudio_hw.c184 size_t bytes) in out_write() argument
191 bytes = write(adev->fd, buffer, bytes); in out_write()
194 return bytes; in out_write()
336 size_t bytes) in in_read() argument
343 bytes = read(adev->fd, buffer, bytes); in in_read()
344 if (adev->mic_mute && (bytes > 0)) { in in_read()
345 memset(buffer, 0, bytes); in in_read()
349 return bytes; in in_read()
/device/asus/fugu/libaudio/
DAudioStreamIn.cpp254 ssize_t AudioStreamIn::read(void* buffer, size_t bytes) in read() argument
272 int ret = readFrames_l(buffer, bytes / getFrameSize()); in read()
277 memset(buffer, 0, bytes); in read()
284 usleep(bytes * 1000000 / getFrameSize() / mRequestedSampleRate); in read()
289 memset(buffer, 0, bytes); in read()
293 return bytes; in read()
DAudioStreamOut.h69 ssize_t write(const void* buffer, size_t bytes);
141 ssize_t writeInternal(const void* buffer, size_t bytes);
DAudioStreamOut.cpp574 ssize_t AudioStreamOut::write(const void* buffer, size_t bytes) in write() argument
581 bytes, data[0], data[1], data[2], data[3], in write()
651 (*I)->processOneChunk((uint8_t *)buffer, bytes, hasActiveOutputs, mInputFormat); in write()
657 uint32_t framesWritten = bytes / mInputFrameSize; in write()
668 return static_cast<ssize_t>(bytes); in write()
Daudio_hal_thunks.cpp184 size_t bytes) in out_write() argument
189 return tstream->impl->write(buffer, bytes); in out_write()
336 size_t bytes) in in_read() argument
341 return tstream->impl->read(buffer, bytes); in in_read()
/device/linaro/hikey/audio/
Daudio_hw.c244 size_t bytes) in out_write() argument
250 size_t out_frames = bytes / frame_size; in out_write()
278 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
282 return bytes; in out_write()
397 size_t bytes) in in_read() argument
399 ALOGV("in_read: bytes %zu", bytes); in in_read()
401 usleep((int64_t)bytes * 1000000 / audio_stream_in_frame_size(stream) / in in_read()
403 memset(buffer, 0, bytes); in in_read()
404 return bytes; in in_read()
/device/huawei/angler/liblight/
Dlights.c104 int bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); in write_int() local
105 ssize_t amt = write(fd, buffer, (size_t)bytes); in write_int()
126 int bytes = snprintf(buffer, sizeof(buffer), "%d %d\n", on, off); in write_on_off() local
127 int amt = write(fd, buffer, bytes); in write_on_off()
/device/htc/flounder/sensor_hub/libsensors/
DSensorBase.cpp72 const char *path, const char *value, int bytes) in write_sys_attribute() argument
83 amt = write(fd, value, bytes); in write_sys_attribute()
DSensorBase.h51 char const *path, char const *value, int bytes);
/device/google/contexthub/util/stm32_flash/
Dstm32_bl.c26 uint8_t checksum(__attribute__((unused)) handle_t *handle, uint8_t *bytes, int length) in checksum() argument
32 csum = ~bytes[0]; in checksum()
35 csum ^= bytes[i]; in checksum()
Dstm32_bl.h42 uint8_t checksum(handle_t *handle, uint8_t *bytes, int length);
/device/google/contexthub/firmware/src/cpu/cortexm4f/
Dcpu.c49 uint32_t bytes = 0; in getPersistedData() local
50 void *loc = platGetPersistentRamStore(&bytes); in getPersistedData()
52 …return bytes >= sizeof(struct RamPersistedDataAndDropbox) ? (struct RamPersistedDataAndDropbox*)lo… in getPersistedData()
/device/htc/flounder/lights/
Dlights.c44 int bytes = snprintf(buffer, 20, "%d\n", value); in write_int() local
45 int amt = write(fd, buffer, bytes); in write_int()
/device/google/contexthub/firmware/misc/cpu/cortexm4f/
Dapp.lkr35bytes per reloc and symbols at 16 bytes per symbol. We remove all symbol infos (as we do not need …
36 from there into relocs and app image itself, generating 4 bytes per reloc of "nano reloc data"
/device/google/contexthub/lib/include/nanohub/
Dsha2.h41 void sha2processBytes(struct Sha2state *state, const void *bytes, uint32_t numBytes);
/device/google/contexthub/inc/
Dchre_re.h305 void* chreHeapAlloc(uint32_t bytes);
/device/google/contexthub/firmware/inc/platform/stm32f4xx/
Dplat.h61 void* platGetPersistentRamStore(uint32_t *bytes);
/device/google/contexthub/lib/nanohub/
Dsha2.c121 void sha2processBytes(struct Sha2state *state, const void *bytes, uint32_t numBytes) in sha2processBytes() argument
123 const uint8_t *inBytes = (const uint8_t*)bytes; in sha2processBytes()
/device/google/dragon/audio/hal/
Daudio_hw.c2060 size_t bytes) in out_write() argument
2072 size_t in_frames = bytes / frame_size; in out_write()
2120 memset((void *)buffer, 0, bytes); in out_write()
2124 if (bytes * pcm_device->pcm_profile->config.rate / out->sample_rate + frame_size in out_write()
2127 bytes * pcm_device->pcm_profile->config.rate / out->sample_rate + frame_size; in out_write()
2133 frames_rq = bytes / frame_size; in out_write()
2148 ALOGVV("%s: writing buffer (%zd bytes) to pcm device", __func__, bytes); in out_write()
2154 audio_bytes = bytes; in out_write()
2189 out->written += bytes / frame_size; in out_write()
2201 usleep(bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
[all …]

12