Home
last modified time | relevance | path

Searched refs:fh (Results 1 – 13 of 13) sorted by relevance

/hardware/bsp/intel/peripheral/libmraa/src/x86/
Dx86.c48 FILE* fh = fopen("/sys/devices/virtual/dmi/id/board_name", "r"); in mraa_x86_platform() local
49 if (fh != NULL) { in mraa_x86_platform()
50 if (getline(&line, &len, fh) != -1) { in mraa_x86_platform()
87 fclose(fh); in mraa_x86_platform()
89 fh = fopen("/proc/cmdline", "r"); in mraa_x86_platform()
90 if (fh != NULL) { in mraa_x86_platform()
91 if (getline(&line, &len, fh) != -1) { in mraa_x86_platform()
98 fclose(fh); in mraa_x86_platform()
/hardware/bsp/intel/peripheral/libmraa/src/i2c/
Di2c.c59 mraa_i2c_smbus_access(int fh, uint8_t read_write, uint8_t command, int size, i2c_smbus_data_t* data) in mraa_i2c_smbus_access() argument
68 return ioctl(fh, I2C_SMBUS, &args); in mraa_i2c_smbus_access()
101 if ((dev->fh = open(filepath, O_RDWR)) < 1) { in mraa_i2c_init_internal()
107 if (ioctl(dev->fh, I2C_FUNCS, &dev->funcs) < 0) { in mraa_i2c_init_internal()
210 bytes_read = read(dev->fh, data, length); in mraa_i2c_read()
225 if (mraa_i2c_smbus_access(dev->fh, I2C_SMBUS_READ, I2C_NOCMD, I2C_SMBUS_BYTE, &d) < 0) { in mraa_i2c_read_byte()
238 if (mraa_i2c_smbus_access(dev->fh, I2C_SMBUS_READ, command, I2C_SMBUS_BYTE_DATA, &d) < 0) { in mraa_i2c_read_byte_data()
251 if (mraa_i2c_smbus_access(dev->fh, I2C_SMBUS_READ, command, I2C_SMBUS_WORD_DATA, &d) < 0) { in mraa_i2c_read_word_data()
278 return ioctl(dev->fh, I2C_RDWR, &d) < 0 ? -1 : length; in mraa_i2c_read_bytes_data()
301 return mraa_i2c_smbus_access(dev->fh, I2C_SMBUS_WRITE, command, I2C_SMBUS_I2C_BLOCK_DATA, &d); in mraa_i2c_write()
[all …]
/hardware/bsp/intel/peripheral/libmraa/src/arm/
Darm.c42 FILE* fh = fopen("/proc/cpuinfo", "r"); in mraa_arm_platform() local
44 if (fh != NULL) { in mraa_arm_platform()
45 while (getline(&line, &len, fh) != -1) { in mraa_arm_platform()
74 fclose(fh); in mraa_arm_platform()
Dbeaglebone.c197 FILE* fh; in mraa_beaglebone_uart_init_pre() local
198 fh = fopen(capepath, "w"); in mraa_beaglebone_uart_init_pre()
200 if (fh == NULL) { in mraa_beaglebone_uart_init_pre()
204 if (fprintf(fh, UART_OVERLAY(index + 1)) < 0) { in mraa_beaglebone_uart_init_pre()
207 fclose(fh); in mraa_beaglebone_uart_init_pre()
247 FILE* fh; in mraa_beaglebone_spi_init_pre() local
248 fh = fopen(capepath, "w"); in mraa_beaglebone_spi_init_pre()
250 if (fh == NULL) { in mraa_beaglebone_spi_init_pre()
254 if (fprintf(fh, SPI_OVERLAY(index)) < 0) { in mraa_beaglebone_spi_init_pre()
259 fclose(fh); in mraa_beaglebone_spi_init_pre()
[all …]
Draspberry_pi.c220 FILE* fh = fopen("/proc/cpuinfo", "r"); in mraa_raspberry_pi() local
221 if (fh != NULL) { in mraa_raspberry_pi()
222 while (getline(&line, &len, fh) != -1) { in mraa_raspberry_pi()
260 fclose(fh); in mraa_raspberry_pi()
/hardware/qcom/msm8996/original-kernel-headers/linux/
Dfuse.h411 uint64_t fh; member
454 uint64_t fh; member
483 uint64_t fh; member
492 uint64_t fh; member
499 uint64_t fh; member
506 uint64_t fh; member
518 uint64_t fh; member
539 uint64_t fh; member
560 uint64_t fh; member
634 uint64_t fh; member
[all …]
/hardware/qcom/msm8994/kernel-headers/linux/
Dfuse.h226 uint64_t fh; member
262 uint64_t fh; member
295 uint64_t fh; member
301 uint64_t fh; member
309 uint64_t fh; member
316 uint64_t fh; member
329 uint64_t fh; member
350 uint64_t fh; member
371 uint64_t fh; member
444 uint64_t fh; member
[all …]
/hardware/qcom/msm8994/original-kernel-headers/linux/
Dfuse.h399 uint64_t fh; member
436 uint64_t fh; member
465 uint64_t fh; member
471 uint64_t fh; member
478 uint64_t fh; member
485 uint64_t fh; member
497 uint64_t fh; member
518 uint64_t fh; member
539 uint64_t fh; member
608 uint64_t fh; member
[all …]
/hardware/qcom/msm8996/kernel-headers/linux/
Dfuse.h231 uint64_t fh; member
274 uint64_t fh; member
306 uint64_t fh; member
316 uint64_t fh; member
324 uint64_t fh; member
331 uint64_t fh; member
344 uint64_t fh; member
365 uint64_t fh; member
386 uint64_t fh; member
464 uint64_t fh; member
[all …]
/hardware/bsp/intel/peripheral/libmraa/src/
Dmraa.c605 FILE* fh = fopen(file, "r"); in mraa_file_contains() local
606 if (fh == NULL) { in mraa_file_contains()
611 while ((getline(&line, &len, fh) != -1) && (found == 0)) { in mraa_file_contains()
617 fclose(fh); in mraa_file_contains()
640 FILE* fh = fopen(file, "r"); in mraa_file_contains_both() local
641 if (fh == NULL) { in mraa_file_contains_both()
646 while ((getline(&line, &len, fh) != -1) && (found == 0)) { in mraa_file_contains_both()
652 fclose(fh); in mraa_file_contains_both()
/hardware/qcom/camera/QCamera2/HAL/test/
Dqcamera_test.cpp432 FILE *fh = fopen(path.string(), "r+"); in encodeJPEG() local
433 if ( !fh ) { in encodeJPEG()
438 fseek(fh, 0, SEEK_END); in encodeJPEG()
439 size_t len = (size_t)ftell(fh); in encodeJPEG()
440 rewind(fh); in encodeJPEG()
444 fclose(fh); in encodeJPEG()
454 size_t readSize = fread(buff, 1, len, fh); in encodeJPEG()
468 rewind(fh); in encodeJPEG()
471 size_t writeSize = fwrite(&temp, sizeof(unsigned char), 1, fh); in encodeJPEG()
476 fwrite(&temp, sizeof(unsigned char), 1, fh); in encodeJPEG()
[all …]
/hardware/bsp/intel/peripheral/libmraa/include/
Dmraa_internal_types.h72 int fh; /**< the file handle to the /dev/i2c-* device */ member
/hardware/bsp/intel/peripheral/libmraa/src/usb/
Dftdi_ft4222.c345 dev->fh = -1; // We don't use file descriptors in mraa_ftdi_ft4222_i2c_init_bus_replace()