Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 52) sorted by relevance

123

/bsp/nxp/imx/imxrt/libraries/drivers/vglite/font/
A Dbuf_reader.c37 if (fd == NULL) in _is_buffered_handle_valid()
43 if ( fd->index > fd->size ) in _is_buffered_handle_valid()
52 if (fd == NULL) in bufferred_fopen()
57 fd->index = 0; in bufferred_fopen()
101 to_copy = (fd->size - fd->index); in bufferred_fread()
102 data_ptr = fd->data_buf + fd->index; in bufferred_fread()
136 fd->index = fd->size - offset; in bufferred_fseek()
141 if ( fd->index > fd->size ) { in bufferred_fseek()
143 fd->index = fd->size; in bufferred_fseek()
183 valid_bytes = fd->size - fd->index; in bufferred_fgets()
[all …]
A Dbuf_reader.h46 int is_buffered_handle_valid(bufferred_reader_t *fd);
47 int bufferred_fopen(bufferred_reader_t *fd, char *buf, int size);
48 int bufferred_ftell(bufferred_reader_t *fd);
53 bufferred_reader_t *fd
56 bufferred_reader_t *fd,
60 int bufferred_fclose(bufferred_reader_t *fd);
61 char *bufferred_fgets(char* buff, int len, bufferred_reader_t *fd);
/bsp/hc32/tests/
A Dtest_usbh.c45 int fd; in usbh_readwrite() local
49 if (fd < 0) in usbh_readwrite()
60 length = write(fd, test_data, sizeof(test_data)); in usbh_readwrite()
64 close(fd); in usbh_readwrite()
68 close(fd); in usbh_readwrite()
70 fd = open(TEST_FN, O_RDONLY, 0); in usbh_readwrite()
71 if (fd < 0) in usbh_readwrite()
77 length = read(fd, buffer, sizeof(buffer)); in usbh_readwrite()
81 close(fd); in usbh_readwrite()
90 close(fd); in usbh_readwrite()
[all …]
/bsp/stm32/stm32mp157a-st-discovery/board/ports/audio/
A Daudio_play.c63 int fd = -1; in wavplay_sample() local
75 fd = open(argv[1], O_WRONLY); in wavplay_sample()
76 if (fd < 0) in wavplay_sample()
128 if (fd >= 0) in wavplay_sample()
129 close(fd); in wavplay_sample()
190 int fd = -1; in wavrecord_sample() local
204 if (fd < 0) in wavrecord_sample()
244 lseek(fd, 0, SEEK_SET); in wavrecord_sample()
246 close(fd); in wavrecord_sample()
252 if (fd >= 0) in wavrecord_sample()
[all …]
/bsp/synwit/swm320-mini/applications/
A Dmain.c341 int fd, size; in spi_flash_elmfat_sample() local
361 if (fd >= 0) in spi_flash_elmfat_sample()
370 if (fd >= 0) in spi_flash_elmfat_sample()
404 int fd, size; in elmfat_sample() local
424 if (fd >= 0) in elmfat_sample()
429 close(fd); in elmfat_sample()
433 if (fd >= 0) in elmfat_sample()
437 close(fd); in elmfat_sample()
455 int fd, size; in sdio_elmfat_sample() local
475 if (fd >= 0) in sdio_elmfat_sample()
[all …]
/bsp/yichip/yc3122-pos/applications/
A Dmain.c68 int fd = open("/user/test.txt", O_WRONLY | O_CREAT); in elmfs_sample() local
71 if (fd >= 0) in elmfs_sample()
74 if (write(fd, str, sizeof(str)) == sizeof(str)) in elmfs_sample()
76 close(fd); in elmfs_sample()
80 fd = open("/user/test.txt", O_RDONLY); in elmfs_sample()
81 if (fd >= 0) in elmfs_sample()
84 size = read(fd, buf, sizeof(buf)); in elmfs_sample()
85 close(fd); in elmfs_sample()
/bsp/mini4020/applications/
A Dapplication.c41 int fd; in rt_init_thread_entry() local
54 fd = open("/fattest.txt", O_RDWR|O_CREAT, 0); in rt_init_thread_entry()
55 if (fd < 0) in rt_init_thread_entry()
61 sz = write(fd,"Hello RT-Thread!",sizeof("Hello RT-Thread!")); in rt_init_thread_entry()
70 lseek(fd, 0, SEEK_SET); in rt_init_thread_entry()
72 sz = read(fd, buffer, sizeof(buffer)); in rt_init_thread_entry()
84 close(fd); in rt_init_thread_entry()
/bsp/ht32/libraries/HT32_STD_5xxxx_FWLib/library/HT32F5xxxx_Driver/src/
A Dsyscalls.c79 int _close(int fd) in _close() argument
84 int _fstat(int fd, struct stat *st) in _fstat() argument
90 int _isatty(int fd) in _isatty() argument
95 int _lseek(int fd, int ptr, int dir) in _lseek() argument
100 int _read(int fd, char *ptr, int len) in _read() argument
105 int _write(int fd, char *ptr, int len) in _write() argument
/bsp/ht32/libraries/HT32_STD_1xxxx_FWLib/library/HT32F1xxxx_Driver/src/
A Dsyscalls.c79 int _close(int fd) in _close() argument
84 int _fstat(int fd, struct stat *st) in _fstat() argument
90 int _isatty(int fd) in _isatty() argument
95 int _lseek(int fd, int ptr, int dir) in _lseek() argument
100 int _read(int fd, char *ptr, int len) in _read() argument
105 int _write(int fd, char *ptr, int len) in _write() argument
/bsp/synwit/swm341-mini/applications/
A Dmain.c504 int fd, size; in elmfat_sample() local
524 if (fd >= 0) in elmfat_sample()
529 close(fd); in elmfat_sample()
533 if (fd >= 0) in elmfat_sample()
537 close(fd); in elmfat_sample()
566 int fd, size; in elmfat_sample() local
586 if (fd >= 0) in elmfat_sample()
595 if (fd >= 0) in elmfat_sample()
617 int fd, size; in elmfat_sample() local
637 if (fd >= 0) in elmfat_sample()
[all …]
/bsp/rv32m1_vega/rv32m1_sdk_riscv/devices/RV32M1/utilities/
A Dfsl_debug_console.c334 int isatty(int fd) in isatty() argument
339 int fstat(int fd, struct stat *st) in fstat() argument
345 int lseek(int fd, off_t ptr, int dir) in lseek() argument
350 int close(int fd) in close() argument
355 int read(int fd, void* ptr, size_t len) in read() argument
358 if (fd != 0) in read()
367 int write(int fd, const void* ptr, size_t len) in write() argument
376 if ((fd != 1) && (fd != 2)) in write()
/bsp/nxp/lpc/lpc55sxx/lpc55s69_nxp_evk/board/ports/fal/
A Dfal_sample.c179 int fd, size; in fal_elmfat_sample() local
213 fd = open("/user/test.txt", O_WRONLY | O_CREAT); in fal_elmfat_sample()
214 if (fd >= 0) in fal_elmfat_sample()
216 if(write(fd, str, sizeof(str)) == sizeof(str)) in fal_elmfat_sample()
219 close(fd); in fal_elmfat_sample()
223 fd = open("/user/test.txt", O_RDONLY); in fal_elmfat_sample()
224 if (fd >= 0) in fal_elmfat_sample()
226 size = read(fd, buf, sizeof(buf)); in fal_elmfat_sample()
228 close(fd); in fal_elmfat_sample()
/bsp/nxp/imx/imx6ull-smart/applications/
A Dinit_em.c28 int fd; in em_init() local
29 fd = open("/services/em.elf", O_RDONLY); in em_init()
30 if (fd >= 0) in em_init()
32 close(fd); in em_init()
/bsp/allwinner/libraries/sunxi-hal/hal/source/sound/component/aw-alsa-utils/
A Darecord_mad.c145 int fd = 0; in capture_then_play() local
185 fd = open(path, O_WRONLY | O_TRUNC); in capture_then_play()
186 if (fd < 0) { in capture_then_play()
192 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666); in capture_then_play()
193 if (fd < 0) { in capture_then_play()
244 if (write(fd, capture_data, len) != len) { in capture_then_play()
264 fsync(fd); in capture_then_play()
265 close(fd); in capture_then_play()
279 if (fd > 0) { in capture_then_play()
280 fsync(fd); in capture_then_play()
[all …]
A Darecord.c196 int ret = 0, fd = 0; in capture_fs_wav() local
236 fd = open(path, O_RDWR | O_CREAT, 0644); in capture_fs_wav()
237 if (fd < 0) { in capture_fs_wav()
241 write(fd, &header, sizeof(header)); in capture_fs_wav()
250 if (save_fs && fd > 0) { in capture_fs_wav()
294 if (save_fs && fd > 0 && ret == 0) { in capture_fs_wav()
305 if (save_fs && fd > 0 && ret == 0) { in capture_fs_wav()
307 lseek(fd, 0, SEEK_SET); in capture_fs_wav()
308 write(fd, &header, sizeof(header)); in capture_fs_wav()
315 if (fd > 0) in capture_fs_wav()
[all …]
A Daduplex.c151 int fd = 0; in playback_fs_wav() local
167 fd = open(path, O_RDONLY); in playback_fs_wav()
168 if (fd < 0) { in playback_fs_wav()
218 r = read(fd, audiobuf, c); in playback_fs_wav()
241 close(fd); in playback_fs_wav()
250 int fd = 0; in capture_fs_wav() local
285 if (fd < 0) { in capture_fs_wav()
289 write(fd, &header, sizeof(header)); in capture_fs_wav()
346 lseek(fd, 0, SEEK_SET); in capture_fs_wav()
353 if (fd > 0) in capture_fs_wav()
[all …]
A Daplay.c52 static int fs_read(int fd, void *buf, size_t count)
57 if ((res = read(fd, buf, count)) == 0)
296 int ret = 0, fd = 0; in play_fs_music() local
305 fd = open(path, O_RDONLY); in play_fs_music()
306 if (fd < 0) { in play_fs_music()
310 r = read(fd, &wav_header, sizeof(wav_header_t)); in play_fs_music()
381 r = read(fd, audiobuf, c); in play_fs_music()
404 close(fd); in play_fs_music()
424 close(fd); in play_fs_music()
/bsp/renesas/ra6m3-hmi-board/board/ports/avi/player/
A Dplayer.c57 read(fd, &head, sizeof(AVI_CHUNK_HEAD)); in read_video_frame()
73 read(fd, buffer, head.size); in read_video_frame()
82 fd = open(filename, O_WRONLY); in video_start_parser()
84 avi_file.BytesRD = read(fd, v_pbuffer, 20480); in video_start_parser()
101 lseek(fd, AVI_file.movi_start, SEEK_SET); in video_start_parser()
105 return fd; in video_start_parser()
393 int fd = -1; in player_entry() local
401 fd = video_start_parser(player, fd, player->video_list[player->song_current - 1]); in player_entry()
454 close(fd); in player_entry()
461 close(fd); in player_entry()
[all …]
/bsp/simulator/drivers/
A Ddfs_win32.c149 int fd; in dfs_win32_open() local
219 if (fd < 0) in dfs_win32_open()
224 file->data = (void *)fd; in dfs_win32_open()
233 _lseek(fd, 0, SEEK_SET); in dfs_win32_open()
270 int fd; in dfs_win32_read() local
273 fd = (int)(file->data); in dfs_win32_read()
274 char_read = _read(fd, buf, len); in dfs_win32_read()
279 file->pos = _lseek(fd, 0, SEEK_CUR); in dfs_win32_read()
285 int fd; in dfs_win32_write() local
288 fd = (int)(file->data); in dfs_win32_write()
[all …]
/bsp/gd32/risc-v/libraries/GD32VF103_Firmware_Library/RISCV/stubs/
A Disatty.c5 int _isatty(int fd) in _isatty() argument
7 if (fd == STDOUT_FILENO || fd == STDERR_FILENO) in _isatty()
A Dwrite_hex.c6 void write_hex(int fd, unsigned long int hex) in write_hex() argument
11 write(fd , "0x", 2); in write_hex()
16 write(fd, &towrite, 1); in write_hex()
A Dlseek.c8 off_t _lseek(int fd, off_t ptr, int dir) in _lseek() argument
10 if (isatty(fd)) in _lseek()
A Dfstat.c8 int _fstat(int fd, struct stat* st) in _fstat() argument
10 if (isatty(fd)) { in _fstat()
/bsp/nuvoton/libraries/ma35/rtt_port/
A Ddrv_rtp.c148 int fd, ret = -1; in nu_rtp_load_from_file() local
152 fd = open(szAbsFilePath, O_RDONLY); in nu_rtp_load_from_file()
153 if (fd < 0) in nu_rtp_load_from_file()
176 length = read(fd, buff_ptr, READ_BLOCK_SIZE); in nu_rtp_load_from_file()
188 if (fd >= 0) in nu_rtp_load_from_file()
189 close(fd); in nu_rtp_load_from_file()
/bsp/amebaz/
A Dgen_bin.py29 fd=open(file,'r')
31 for line in fd.readlines():
35 fd.close()
37 fd.close()

Completed in 49 milliseconds

123