/nrf52832-nimble/rt-thread/examples/ulog/ |
H A D | ulog_example.c | 24 int count = 0; in ulog_example() local 30 while (count++ < 50) in ulog_example() 34 LOG_D("LOG_D(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 35 LOG_I("LOG_I(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 36 LOG_W("LOG_W(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 37 LOG_E("LOG_E(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 38 … ulog_d("test", "ulog_d(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 39 … ulog_i("test", "ulog_i(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 40 … ulog_w("test", "ulog_w(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() 41 … ulog_e("test", "ulog_e(%d): RT-Thread is an open source IoT operating system from China.", count); in ulog_example() [all …]
|
/nrf52832-nimble/rt-thread/examples/kernel/ |
H A D | cpuusage.c | 13 rt_uint32_t count; in cpu_usage_idle_hook() local 18 /* get total count */ in cpu_usage_idle_hook() 30 count = 0; in cpu_usage_idle_hook() 35 count ++; in cpu_usage_idle_hook() 41 if (count < total_count) in cpu_usage_idle_hook() 43 count = total_count - count; in cpu_usage_idle_hook() 44 cpu_usage_major = (count * 100) / total_count; in cpu_usage_idle_hook() 45 cpu_usage_minor = ((count * 100) % total_count) * 100 / total_count; in cpu_usage_idle_hook() 49 total_count = count; in cpu_usage_idle_hook()
|
H A D | thread_priority.c | 8 static rt_uint32_t count = 0; variable 17 count ++; in thread1_entry() 18 rt_kprintf("count = %d\n", count); in thread1_entry() 33 if (count == 0) in thread2_entry() 88 count = 0; in _tc_thread_priority()
|
H A D | thread_yield.c | 13 rt_uint32_t count = 0; in thread1_entry() local 18 rt_kprintf("thread1: count = %d\n", count ++); in thread1_entry() 28 rt_uint32_t count = 0; in thread2_entry() local 33 rt_kprintf("thread2: count = %d\n", count ++); in thread2_entry()
|
H A D | timer_stop_self.c | 11 static rt_uint8_t count; variable 18 count ++; in timeout1() 20 if (count >= 8) in timeout1() 24 count = 0; in timeout1() 66 count = 0; in _tc_timer_stop_self()
|
H A D | timer_control.c | 11 static rt_uint8_t count; variable 20 count ++; in timeout1() 22 if (count >= 8) in timeout1() 26 count = 0; in timeout1() 68 count = 0; in _tc_timer_control()
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/ramfs/ |
H A D | dfs_ramfs.c | 95 int dfs_ramfs_read(struct dfs_fd *file, void *buf, size_t count) in dfs_ramfs_read() argument 103 if (count < file->size - file->pos) in dfs_ramfs_read() 104 length = count; in dfs_ramfs_read() 117 int dfs_ramfs_write(struct dfs_fd *fd, const void *buf, size_t count) in dfs_ramfs_write() argument 128 if (count + fd->pos > fd->size) in dfs_ramfs_write() 131 ptr = rt_memheap_realloc(&(ramfs->memheap), dirent->data, fd->pos + count); in dfs_ramfs_write() 141 dirent->size = fd->pos + count; in dfs_ramfs_write() 145 if (count > 0) in dfs_ramfs_write() 146 memcpy(dirent->data + fd->pos, buf, count); in dfs_ramfs_write() 149 fd->pos += count; in dfs_ramfs_write() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/devfs/ |
H A D | devfs.c | 51 int dfs_device_fs_read(struct dfs_fd *file, void *buf, size_t count) in dfs_device_fs_read() argument 63 result = rt_device_read(dev_id, file->pos, buf, count); in dfs_device_fs_read() 69 int dfs_device_fs_write(struct dfs_fd *file, const void *buf, size_t count) in dfs_device_fs_write() argument 81 result = rt_device_write(dev_id, file->pos, buf, count); in dfs_device_fs_write() 135 rt_uint32_t count = 0; in dfs_device_fs_open() local 145 count ++; in dfs_device_fs_open() 149 count * sizeof(rt_device_t)); in dfs_device_fs_open() 154 root_dirent->device_count = count; in dfs_device_fs_open() 155 count = 0; in dfs_device_fs_open() 160 root_dirent->devices[count] = (rt_device_t)object; in dfs_device_fs_open() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/test/src/ |
H A D | ble_store_test.c | 119 int count; in ble_store_test_util_count() local 122 rc = ble_store_util_count(obj_type, &count); in ble_store_test_util_count() 125 return count; in ble_store_test_util_count() 201 int count; in TEST_CASE() local 229 rc = ble_store_util_count(BLE_STORE_OBJ_TYPE_OUR_SEC, &count); in TEST_CASE() 231 TEST_ASSERT(count == 1); in TEST_CASE() 237 rc = ble_store_util_count(BLE_STORE_OBJ_TYPE_PEER_SEC, &count); in TEST_CASE() 239 TEST_ASSERT(count == 1); in TEST_CASE() 247 rc = ble_store_util_count(BLE_STORE_OBJ_TYPE_CCCD, &count); in TEST_CASE() 249 TEST_ASSERT(count == 1); in TEST_CASE() [all …]
|
/nrf52832-nimble/rt-thread/examples/libc/ |
H A D | ex6.c | 14 unsigned long count; in libc_ex6() local 18 for (count = 0; count < 2000; ++count) { in libc_ex6() 24 printf("status = %d, count = %lu: %s\n", status, count, strerror( in libc_ex6() 28 printf("count = %lu\n", count); in libc_ex6()
|
H A D | ex7.c | 62 unsigned long count; in libc_ex7() local 71 for (count = 0; count < 20; ++count) { in libc_ex7() 76 status = pthread_create(&thread, NULL, test_thread, (void*) (count in libc_ex7() 79 printf("status = %d, count = %lu: %s\n", status, count, strerror( in libc_ex7() 92 printf("count = %lu\n", count); in libc_ex7()
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/include/mesh/ |
H A D | access.h | 197 * @brief Encode transmission count & interval steps. 199 * @param count Number of retransmissions (first transmission is excluded). 206 #define BT_MESH_TRANSMIT(count, int_ms) ((count) | (((int_ms / 10) - 1) << 3)) argument 210 * @brief Decode transmit count from a transmit value. 212 * @param transmit Encoded transmit count & interval value. 214 * @return Transmission count (actual transmissions is N + 1). 222 * @param transmit Encoded transmit count & interval value. 230 * @brief Encode Publish Retransmit count & interval steps. 232 * @param count Number of retransmissions (first transmission is excluded). 239 #define BT_MESH_PUB_TRANSMIT(count, int_ms) BT_MESH_TRANSMIT(count, \ argument [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/spi/ |
H A D | qspi_core.c | 108 rt_size_t count = 0; in rt_qspi_send_then_recv() local 113 count++; in rt_qspi_send_then_recv() 123 count += 4; in rt_qspi_send_then_recv() 130 count += 3; in rt_qspi_send_then_recv() 151 if (count != send_length) in rt_qspi_send_then_recv() 153 message.dummy_cycles = (send_length - count) * 8; in rt_qspi_send_then_recv() 190 rt_size_t count = 0; in rt_qspi_send() local 195 count++; in rt_qspi_send() 206 count += 4; in rt_qspi_send() 214 count += 3; in rt_qspi_send() [all …]
|
/nrf52832-nimble/rt-thread/components/drivers/src/ |
H A D | pipe.c | 126 static int pipe_fops_read(struct dfs_fd *fd, void *buf, size_t count) in pipe_fops_read() argument 146 len = rt_ringbuffer_get(pipe->fifo, buf, count); in pipe_fops_read() 175 static int pipe_fops_write(struct dfs_fd *fd, const void *buf, size_t count) in pipe_fops_write() argument 191 if (count == 0) in pipe_fops_write() 206 len = rt_ringbuffer_put(pipe->fifo, pbuf, count - ret); in pipe_fops_write() 211 if (ret == count) in pipe_fops_write() 344 rt_size_t rt_pipe_read (rt_device_t device, rt_off_t pos, void *buffer, rt_size_t count) in rt_pipe_read() argument 355 if (count == 0) return 0; in rt_pipe_read() 360 while (read_bytes < count) in rt_pipe_read() 362 int len = rt_ringbuffer_get(pipe->fifo, &pbuf[read_bytes], count - read_bytes); in rt_pipe_read() [all …]
|
/nrf52832-nimble/rt-thread/components/libc/pthreads/ |
H A D | pthread_barrier.c | 69 unsigned count) in pthread_barrier_init() argument 76 barrier->count = count; in pthread_barrier_init() 94 if (barrier->count == 0) in pthread_barrier_wait() 98 barrier->count -= 1; in pthread_barrier_wait() 99 if (barrier->count == 0) /* broadcast condition */ in pthread_barrier_wait()
|
/nrf52832-nimble/rt-thread/components/drivers/include/drivers/ |
H A D | hwtimer.h | 22 HWTIMER_CTRL_FREQ_SET = 0x01, /* set the count frequency */ 42 #define HWTIMER_CNTMODE_UP 0x01 /* increment count mode */ 43 #define HWTIMER_CNTMODE_DW 0x02 /* decreasing count mode */ 59 rt_int32_t maxfreq; /* the maximum count frequency timer support */ 60 rt_int32_t minfreq; /* the minimum count frequency timer support */ 62 rt_uint8_t cntmode; /* count mode (inc/dec) */
|
/nrf52832-nimble/packages/NimBLE-latest/porting/nimble/src/ |
H A D | os_mbuf.c | 529 unsigned int count; in os_mbuf_copydata() local 549 count = min(m->om_len - off, len); in os_mbuf_copydata() 550 memcpy(udst, m->om_data + off, count); in os_mbuf_copydata() 551 len -= count; in os_mbuf_copydata() 552 udst += count; in os_mbuf_copydata() 565 int count; in os_mbuf_adj() local 595 count = 0; in os_mbuf_adj() 597 count += m->om_len; in os_mbuf_adj() 608 count -= len; in os_mbuf_adj() 609 if (count < 0) in os_mbuf_adj() [all …]
|
/nrf52832-nimble/rt-thread/components/net/uip/lib/ |
H A D | memb.c | 54 memset(m->count, 0, m->num); in memb_init() 64 if(m->count[i] == 0) { in memb_alloc() 65 /* If this block was unused, we increase the reference count to in memb_alloc() 68 ++(m->count[i]); in memb_alloc() 91 reference count and return the new value of it. */ in memb_free() 92 if(m->count[i] > 0) { in memb_free() 94 --(m->count[i]); in memb_free() 96 return m->count[i]; in memb_free()
|
/nrf52832-nimble/rt-thread/components/drivers/i2c/ |
H A D | i2c_core.c | 80 rt_uint32_t count) in rt_i2c_master_send() argument 87 msg.len = count; in rt_i2c_master_send() 92 return (ret > 0) ? count : ret; in rt_i2c_master_send() 99 rt_uint32_t count) in rt_i2c_master_recv() argument 108 msg.len = count; in rt_i2c_master_recv() 113 return (ret > 0) ? count : ret; in rt_i2c_master_recv()
|
H A D | i2c_dev.c | 17 rt_size_t count) in i2c_bus_device_read() argument 26 i2c_dbg("I2C bus dev [%s] reading %u bytes.\n", dev->parent.name, count); in i2c_bus_device_read() 31 return rt_i2c_master_recv(bus, addr, flags, buffer, count); in i2c_bus_device_read() 37 rt_size_t count) in i2c_bus_device_write() argument 46 i2c_dbg("I2C bus dev [%s] writing %u bytes.\n", dev->parent.name, count); in i2c_bus_device_write() 51 return rt_i2c_master_send(bus, addr, flags, buffer, count); in i2c_bus_device_write()
|
/nrf52832-nimble/rt-thread/examples/network/ |
H A D | udpclient.c | 22 static int count = 10; variable 56 while (count && is_running) in udpclient() 66 count --; in udpclient() 69 if (count == 0) in udpclient() 86 rt_kprintf("Usage: udpclient -h <host> -p <port> [--cnt] [count]\n"); in usage() 93 rt_kprintf(" --cnt Specify the send data count\n"); in usage() 129 count = atoi(argv[7]); in udpclient_test()
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/nfs/ |
H A D | dfs_nfs.c | 554 int nfs_read(struct dfs_fd *file, void *buf, size_t count) in nfs_read() argument 582 args.count = count > DFS_NFS_MAX_MTU ? DFS_NFS_MAX_MTU : count; in nfs_read() 583 count -= args.count; in nfs_read() 600 bytes = res.READ3res_u.resok.count; in nfs_read() 606 buf = (void *)((char *)buf + args.count); in nfs_read() 615 } while(count > 0); in nfs_read() 622 int nfs_write(struct dfs_fd *file, const void *buf, size_t count) in nfs_write() argument 650 args.count = count > DFS_NFS_MAX_MTU ? DFS_NFS_MAX_MTU : count; in nfs_write() 651 args.data.data_len = args.count; in nfs_write() 652 count -= args.count; in nfs_write() [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/romfs/ |
H A D | dfs_romfs.c | 131 int dfs_romfs_read(struct dfs_fd *file, void *buf, size_t count) in dfs_romfs_read() argument 144 if (count < file->size - file->pos) in dfs_romfs_read() 145 length = count; in dfs_romfs_read() 243 int dfs_romfs_getdents(struct dfs_fd *file, struct dirent *dirp, uint32_t count) in dfs_romfs_getdents() argument 258 /* make integer count */ in dfs_romfs_getdents() 259 count = (count / sizeof(struct dirent)); in dfs_romfs_getdents() 260 if (count == 0) in dfs_romfs_getdents() 264 for (index = 0; index < count && file->pos < file->size; index ++) in dfs_romfs_getdents()
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/uffs/tools/ |
H A D | format_code.rb | 7 count = 0 11 count += 1 16 if count > 0 22 puts "Fix file #{file}, modified lines: #{count}"
|
H A D | chomp_uffs_perror.rb | 7 count = 0 11 count += 1 17 if count > 0 23 puts "Fix file #{file}, modified lines: #{count}"
|