/lk-master/external/platform/pico/rp2_common/hardware_rtc/ |
A D | rtc.c | 45 if (!(t->year >= 0 && t->year <= 4095)) return false; in valid_datetime() 46 if (!(t->month >= 1 && t->month <= 12)) return false; in valid_datetime() 47 if (!(t->day >= 1 && t->day <= 31)) return false; in valid_datetime() 48 if (!(t->dotw >= 0 && t->dotw <= 6)) return false; in valid_datetime() 49 if (!(t->hour >= 0 && t->hour <= 23)) return false; in valid_datetime() 50 if (!(t->min >= 0 && t->min <= 59)) return false; in valid_datetime() 51 if (!(t->sec >= 0 && t->sec <= 59)) return false; in valid_datetime() 56 if (!valid_datetime(t)) { in rtc_set_datetime() 150 ((t->day == -1) ? 0 : (t->day << RTC_IRQ_SETUP_0_DAY_LSB )); in rtc_set_alarm() 151 rtc_hw->irq_setup_1 = ((t->dotw == -1) ? 0 : (t->dotw << RTC_IRQ_SETUP_1_DOTW_LSB)) | in rtc_set_alarm() [all …]
|
/lk-master/kernel/ |
A D | thread.c | 85 list_add_head(&run_queue[t->priority], &t->queue_node); in insert_in_run_queue_head() 96 list_add_tail(&run_queue[t->priority], &t->queue_node); in insert_in_run_queue_tail() 115 strlcpy(t->name, name, sizeof(t->name)); in init_thread_struct() 148 if (!t) { in thread_create_etc() 219 return t; in thread_create_etc() 234 if (!t) in thread_set_real_time() 344 if (t->flags & THREAD_FLAG_FREE_STACK && t->stack) in thread_join() 964 … thread_state_to_str(t->state), t->curr_cpu, t->pinned_cpu, t->priority, t->remaining_quantum); in dump_thread() 967 thread_state_to_str(t->state), t->priority, t->remaining_quantum); in dump_thread() 971 t->stack, t->stack_size, thread_stack_used(t)); in dump_thread() [all …]
|
/lk-master/external/lib/libm/ |
A D | e_asin.c | 73 double t=0.0,w,p,q,c,r,s; in __ieee754_asin() local 88 t = x*x; in __ieee754_asin() 89 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); in __ieee754_asin() 90 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4))); in __ieee754_asin() 96 t = w*0.5; in __ieee754_asin() 97 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); in __ieee754_asin() 98 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4))); in __ieee754_asin() 99 s = sqrt(t); in __ieee754_asin() 106 c = (t-w*w)/(s+w); in __ieee754_asin() 110 t = pio4_hi-(p-q); in __ieee754_asin() [all …]
|
A D | e_asinf.c | 44 float t=0.0,w,p,q,c,r,s; in __ieee754_asinf() local 57 t = x*x; in __ieee754_asinf() 58 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); in __ieee754_asinf() 59 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4))); in __ieee754_asinf() 65 t = w*(float)0.5; in __ieee754_asinf() 66 p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5))))); in __ieee754_asinf() 67 q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4))); in __ieee754_asinf() 68 s = __ieee754_sqrtf(t); in __ieee754_asinf() 77 c = (t-w*w)/(s+w); in __ieee754_asinf() 81 t = pio4_hi-(p-q); in __ieee754_asinf() [all …]
|
A D | s_round.c | 38 double t; in round() local 46 t = floor(x); in round() 47 if (t - x <= -0.5) in round() 48 t += 1; in round() 49 return (t); in round() 51 t = floor(-x); in round() 52 if (t + x <= -0.5) in round() 53 t += 1; in round() 54 return (-t); in round()
|
A D | e_powf.c | 60 float y1,t1,t2,r,s,sn,t,u,v,w; in __ieee754_powf() local 139 w = (t*t)*((float)0.5-t*((float)0.333333333333-t*(float)0.25)); in __ieee754_powf() 141 v = t*ivln2_l-w*ivln2; in __ieee754_powf() 193 t = (float)n; in __ieee754_powf() 229 p_h -= t; in __ieee754_powf() 231 t = p_l+p_h; in __ieee754_powf() 232 GET_FLOAT_WORD(is,t); in __ieee754_powf() 234 u = t*lg2_h; in __ieee754_powf() 235 v = (p_l-(t-p_h))*lg2+t*lg2_l; in __ieee754_powf() 238 t = z*z; in __ieee754_powf() [all …]
|
A D | e_pow.c | 198 w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25)); in __ieee754_pow() 200 v = t*ivln2_l-w*ivln2; in __ieee754_pow() 248 t = (double)n; in __ieee754_pow() 283 t = zero; in __ieee754_pow() 287 p_h -= t; in __ieee754_pow() 289 t = p_l+p_h; in __ieee754_pow() 290 SET_LOW_WORD(t,0); in __ieee754_pow() 291 u = t*lg2_h; in __ieee754_pow() 292 v = (p_l-(t-p_h))*lg2+t*lg2_l; in __ieee754_pow() 295 t = z*z; in __ieee754_pow() [all …]
|
/lk-master/external/platform/lpc15xx/lpcopen/usbd_rom_hid_keyboard/example/inc/ |
A D | ms_timer.h | 88 t->interval = interval; in ms_timerInit() 89 t->start = (int32_t) g_msTicks; in ms_timerInit() 100 t->interval = interval; in ms_timerInitOnly() 101 t->start = 0; in ms_timerInitOnly() 109 static INLINE void ms_timerStop(ms_timer_t *t) in ms_timerStop() argument 111 t->start = 0; in ms_timerStop() 119 static INLINE bool ms_timerStarted(ms_timer_t *t) in ms_timerStarted() argument 121 return (bool) (t->start != 0); in ms_timerStarted() 129 static INLINE void ms_timerStart(ms_timer_t *t) in ms_timerStart() argument 139 static INLINE bool ms_timerExpired(ms_timer_t *t) in ms_timerExpired() argument [all …]
|
/lk-master/app/tests/ |
A D | fibo.c | 21 thread_t *t[2]; in fibo_thread() local 31 if (!t[0]) { in fibo_thread() 37 if (!t[1]) { in fibo_thread() 39 thread_resume(t[0]); in fibo_thread() 40 thread_join(t[0], NULL, INFINITE_TIME); in fibo_thread() 44 thread_resume(t[0]); in fibo_thread() 45 thread_resume(t[1]); in fibo_thread() 49 thread_join(t[0], &retcode0, INFINITE_TIME); in fibo_thread() 50 thread_join(t[1], &retcode1, INFINITE_TIME); in fibo_thread() 65 thread_resume(t); in fibo() [all …]
|
A D | clock_tests.c | 20 lk_time_t t; in clock_tests() local 27 t = current_time(); in clock_tests() 46 t = current_time(); in clock_tests() 48 if (TIME_LT(t, last)) { in clock_tests() 49 printf("WARNING: time ran backwards: %u < %u\n", t, last); in clock_tests() 50 last = t; in clock_tests() 53 last = t; in clock_tests() 80 t = current_time(); in clock_tests() 82 if (t > ((t2 + 500) / 1000)) { in clock_tests() 83 printf("WARNING: current_time() ahead of current_time_hires() %u %llu\n", t, t2); in clock_tests() [all …]
|
A D | cache_tests.c | 20 lk_bigtime_t t; in bench_cache() local 35 t = current_time_hires(); in bench_cache() 37 t = current_time_hires() - t; in bench_cache() 39 printf("took %llu usecs to clean %d bytes (cold)\n", t, bufsize); in bench_cache() 43 t = current_time_hires(); in bench_cache() 45 t = current_time_hires() - t; in bench_cache() 50 printf("took %llu usecs to clean %d bytes (hot)\n", t, bufsize); in bench_cache()
|
/lk-master/arch/microblaze/ |
A D | thread.c | 40 void arch_thread_initialize(thread_t *t) { in arch_thread_initialize() argument 41 LTRACEF("t %p (%s)\n", t, t->name); in arch_thread_initialize() 48 memset(&t->arch.cs_frame, 0, sizeof(t->arch.cs_frame)); in arch_thread_initialize() 50 t->arch.cs_frame.r1 = (vaddr_t)t->stack + t->stack_size; in arch_thread_initialize() 51 t->arch.cs_frame.r2 = r2; in arch_thread_initialize() 52 t->arch.cs_frame.r13 = r13; in arch_thread_initialize() 53 t->arch.cs_frame.r15 = (vaddr_t)&initial_thread_func; in arch_thread_initialize() 56 *(volatile uint32_t *)&t->arch.cs_frame.r15 -= 8; in arch_thread_initialize() 65 void arch_dump_thread(thread_t *t) { in arch_dump_thread() argument 66 if (t->state != THREAD_RUNNING) { in arch_dump_thread() [all …]
|
/lk-master/arch/riscv/ |
A D | thread.c | 43 void arch_thread_initialize(thread_t *t) { in arch_thread_initialize() argument 45 memset(&t->arch.cs_frame, 0, sizeof(t->arch.cs_frame)); in arch_thread_initialize() 48 vaddr_t stack_top = ROUNDDOWN((vaddr_t)t->stack + t->stack_size, 16); in arch_thread_initialize() 50 t->arch.cs_frame.sp = stack_top; in arch_thread_initialize() 51 t->arch.cs_frame.ra = (vaddr_t)&initial_thread_func; in arch_thread_initialize() 53 LTRACEF("t %p (%s) stack top %#lx entry %p arg %p\n", t, t->name, stack_top, t->entry, t->arg); in arch_thread_initialize() 64 void arch_dump_thread(thread_t *t) { in arch_dump_thread() argument 65 if (t->state != THREAD_RUNNING) { in arch_dump_thread() 67 dprintf(INFO, "sp %#lx\n", t->arch.cs_frame.sp); in arch_dump_thread()
|
/lk-master/arch/or1k/ |
A D | thread.c | 41 void arch_thread_initialize(thread_t *t) { in arch_thread_initialize() argument 42 LTRACEF("t %p (%s)\n", t, t->name); in arch_thread_initialize() 48 memset(&t->arch.cs_frame, 0, sizeof(t->arch.cs_frame)); in arch_thread_initialize() 50 t->arch.cs_frame.r1 = (vaddr_t)t->stack + t->stack_size; in arch_thread_initialize() 51 t->arch.cs_frame.r2 = r2; in arch_thread_initialize() 52 t->arch.cs_frame.r9 = (vaddr_t)initial_thread_func; in arch_thread_initialize() 61 void arch_dump_thread(thread_t *t) { in arch_dump_thread() argument 62 if (t->state != THREAD_RUNNING) { in arch_dump_thread() 64 dprintf(INFO, "sp 0x%x\n", t->arch.cs_frame.r1); in arch_dump_thread()
|
/lk-master/kernel/include/kernel/ |
A D | thread.h | 116 #define thread_curr_cpu(t) ((t)->curr_cpu) argument 117 #define thread_pinned_cpu(t) ((t)->pinned_cpu) argument 118 #define thread_set_curr_cpu(t,c) ((t)->curr_cpu = (c)) argument 119 #define thread_set_pinned_cpu(t, c) ((t)->pinned_cpu = (c)) argument 121 #define thread_curr_cpu(t) (0) argument 122 #define thread_pinned_cpu(t) (-1) argument 157 status_t thread_detach(thread_t *t); 160 status_t thread_set_real_time(thread_t *t); 162 void dump_thread(thread_t *t); 163 void arch_dump_thread(thread_t *t); [all …]
|
/lk-master/arch/mips/ |
A D | thread.c | 40 void arch_thread_initialize(thread_t *t) { in arch_thread_initialize() argument 41 LTRACEF("t %p (%s)\n", t, t->name); in arch_thread_initialize() 44 memset(&t->arch.cs_frame, 0, sizeof(t->arch.cs_frame)); in arch_thread_initialize() 46 t->arch.cs_frame.ra = (vaddr_t)&initial_thread_func; in arch_thread_initialize() 47 t->arch.cs_frame.sp = (vaddr_t)t->stack + t->stack_size; in arch_thread_initialize() 56 void arch_dump_thread(thread_t *t) { in arch_dump_thread() argument 57 if (t->state != THREAD_RUNNING) { in arch_dump_thread() 59 dprintf(INFO, "sp 0x%x\n", t->arch.cs_frame.sp); in arch_dump_thread()
|
/lk-master/arch/m68k/ |
A D | thread.c | 40 void arch_thread_initialize(thread_t *t) { in arch_thread_initialize() argument 41 LTRACEF("t %p (%s)\n", t, t->name); in arch_thread_initialize() 44 memset(&t->arch.cs_frame, 0, sizeof(t->arch.cs_frame)); in arch_thread_initialize() 46 t->arch.cs_frame.sp = (vaddr_t)t->stack + t->stack_size; in arch_thread_initialize() 47 t->arch.cs_frame.pc = (vaddr_t)&initial_thread_func; in arch_thread_initialize() 56 void arch_dump_thread(thread_t *t) { in arch_dump_thread() argument 58 if (t->state != THREAD_RUNNING) { in arch_dump_thread() 60 dprintf(INFO, "sp 0x%x\n", t->arch.cs_frame.r1); in arch_dump_thread()
|
/lk-master/external/lib/mincrypt/ |
A D | sha.c | 43 int t; in SHA1_Transform() local 45 for (t = 0; t < 16; ++t) { in SHA1_Transform() 50 W[t] = tmp; in SHA1_Transform() 53 for (; t < 80; t++) { in SHA1_Transform() 54 W[t] = rol(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); in SHA1_Transform() 63 for (t = 0; t < 80; t++) { in SHA1_Transform() 64 uint32_t tmp = rol(5,A) + E + W[t]; in SHA1_Transform() 66 if (t < 20) in SHA1_Transform() 68 else if ( t < 40) in SHA1_Transform() 70 else if ( t < 60) in SHA1_Transform()
|
A D | sha256.c | 63 int t; in SHA256_Transform() local 65 for (t = 0; t < 16; ++t) { in SHA256_Transform() 70 W[t] = tmp; in SHA256_Transform() 73 for (; t < 64; t++) { in SHA256_Transform() 74 uint32_t s0 = ror(W[t-15], 7) ^ ror(W[t-15], 18) ^ shr(W[t-15], 3); in SHA256_Transform() 75 uint32_t s1 = ror(W[t-2], 17) ^ ror(W[t-2], 19) ^ shr(W[t-2], 10); in SHA256_Transform() 76 W[t] = W[t-16] + s0 + W[t-7] + s1; in SHA256_Transform() 88 for (t = 0; t < 64; t++) { in SHA256_Transform() 94 uint32_t t1 = H + s1 + ch + K[t] + W[t]; in SHA256_Transform()
|
/lk-master/external/lib/lwip/core/ |
A D | timers.c | 296 for(t = next_timeout; t != NULL; t = t->next) { in sys_timeout_debug() 297 timeout->time -= t->time; in sys_timeout_debug() 298 if (t->next == NULL || t->next->time > timeout->time) { in sys_timeout_debug() 299 if (t->next != NULL) { in sys_timeout_debug() 303 t->next = timeout; in sys_timeout_debug() 323 struct sys_timeo *prev_t, *t; in sys_untimeout() local 329 for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { in sys_untimeout() 330 if ((t->h == handler) && (t->arg == arg)) { in sys_untimeout() 334 next_timeout = t->next; in sys_untimeout() 339 if (t->next != NULL) { in sys_untimeout() [all …]
|
/lk-master/lib/minip/ |
A D | net_timer.c | 29 static void add_to_queue(net_timer_t *t) { in add_to_queue() argument 38 list_add_tail(&net_timer_list, &t->node); in add_to_queue() 48 if (list_in_list(&t->node)) { in net_timer_set() 49 list_delete(&t->node); in net_timer_set() 53 t->cb = cb; in net_timer_set() 54 t->arg = callback_args; in net_timer_set() 55 t->sched_time = now + delay; in net_timer_set() 57 add_to_queue(t); in net_timer_set() 66 bool net_timer_cancel(net_timer_t *t) { in net_timer_cancel() argument 71 if (list_in_list(&t->node)) { in net_timer_cancel() [all …]
|
/lk-master/external/platform/pico/common/pico_util/ |
A D | datetime.c | 30 void datetime_to_str(char *buf, uint buf_size, const datetime_t *t) { in datetime_to_str() argument 34 DATETIME_DOWS[t->dotw], in datetime_to_str() 35 t->day, in datetime_to_str() 36 DATETIME_MONTHS[t->month - 1], in datetime_to_str() 37 t->hour, in datetime_to_str() 38 t->min, in datetime_to_str() 39 t->sec, in datetime_to_str() 40 t->year); in datetime_to_str()
|
/lk-master/arch/arm/ |
A D | stackusage | 17 t = line.split() variable 19 if len(t) == 0: 25 match = hexcolonrule.match(t[0]) 32 match = symbolrule.match(t[1]) 46 match = hex2byterule.match(t[1]) 49 match = hex2byterule.match(t[2]) 57 insmatch = insrule.match(t[iindex]) 65 c = (len(t) - 1 - iindex) * 4 71 c = (len(t) - 2 - iindex) * 4 76 reg = t[iindex+1] [all …]
|
/lk-master/arch/arm64/ |
A D | fpu.c | 17 static void arm64_fpu_load_state(struct thread *t) { in arm64_fpu_load_state() argument 19 struct fpstate *fpstate = &t->arch.fpstate; in arm64_fpu_load_state() 22 LTRACEF("cpu %d, thread %s, fpstate already valid\n", cpu, t->name); in arm64_fpu_load_state() 26 cpu, t->name, fpstate, fpstate->current_cpu, current_fpstate[cpu]); in arm64_fpu_load_state() 53 void arm64_fpu_save_state(struct thread *t) { in arm64_fpu_save_state() argument 54 struct fpstate *fpstate = &t->arch.fpstate; in arm64_fpu_save_state() 76 LTRACEF("thread %s, fpcr %x, fpsr %x\n", t->name, fpstate->fpcr, fpstate->fpsr); in arm64_fpu_save_state() 84 thread_t *t = get_current_thread(); in arm64_fpu_exception() local 85 if (likely(t)) in arm64_fpu_exception() 86 arm64_fpu_load_state(t); in arm64_fpu_exception()
|
/lk-master/dev/usb/class/bulktest/ |
A D | bulktest.c | 30 static status_t ep_cb_rx(ep_t endpoint, usbc_transfer_t *t); 31 static status_t ep_cb_tx(ep_t endpoint, usbc_transfer_t *t); 68 static status_t ep_cb_rx(ep_t endpoint, usbc_transfer_t *t) { in ep_cb_rx() argument 70 LTRACEF("ep %u transfer %p\n", endpoint, t); in ep_cb_rx() 71 usbc_dump_transfer(t); in ep_cb_rx() 73 if (t->result >= 0) { in ep_cb_rx() 74 hexdump8(t->buf, t->bufpos); in ep_cb_rx() 78 if (t->result >= 0) in ep_cb_rx() 86 LTRACEF("ep %u transfer %p\n", endpoint, t); in ep_cb_tx() 87 usbc_dump_transfer(t); in ep_cb_tx() [all …]
|