Lines Matching refs:monkey
36 static MonkeyWork monkey; variable
51 OS_InitMessageQueue(&(monkey.msg_q), monkey.msg_buf, MONKEY_MESSAGE_ARRAY_MAX); in MonkeyInit()
52 OS_CreateThread(&(monkey.thread), in MonkeyInit()
55 (void *)(monkey.stack + (MONKEY_STACK_SIZE / sizeof(u32))), in MonkeyInit()
57 OS_WakeupThreadDirect(&(monkey.thread)); in MonkeyInit()
77 index = (s32)(monkey.tpIndex); in MonkeyGetNewTpData()
81 array[i] = monkey.tpBuf[index]; in MonkeyGetNewTpData()
102 index = (s32)(monkey.micIndex); in MonkeyGetNewMicData()
106 array[i] = monkey.micBuf[index]; in MonkeyGetNewMicData()
128 monkey.micIndex = 0; in MonkeyThread()
151 monkey.tpIndex = 0; in MonkeyThread()
155 OS_CreateAlarm(&(monkey.alarm)); in MonkeyThread()
156 monkey.timerCount = 0; in MonkeyThread()
157 OS_SetPeriodicAlarm(&(monkey.alarm), in MonkeyThread()
165 (void)OS_ReceiveMessage(&(monkey.msg_q), &msg, OS_MESSAGE_BLOCK); in MonkeyThread()
176 &(monkey.micBuf[monkey.micIndex]), in MonkeyThread()
206 if (0 == (monkey.timerCount % 8)) in MonkeySamplingAlarm()
208 (void)OS_SendMessage(&(monkey.msg_q), (void *)MONKEY_MESSAGE_TYPE_MIC, OS_MESSAGE_BLOCK); in MonkeySamplingAlarm()
210 else if (3 == (monkey.timerCount % 16)) in MonkeySamplingAlarm()
212 (void)OS_SendMessage(&(monkey.msg_q), (void *)MONKEY_MESSAGE_TYPE_TP, OS_MESSAGE_BLOCK); in MonkeySamplingAlarm()
215 monkey.timerCount++; in MonkeySamplingAlarm()
237 monkey.micIndex = (u16)((monkey.micIndex + 1) % MONKEY_MIC_ARRAY_MAX); in MonkeyMicCallback()
267 (void)TP_GetCalibratedResult(&(monkey.tpBuf[monkey.tpIndex])); in MonkeyTpCallback()
269 monkey.tpIndex = (u16)((monkey.tpIndex + 1) % MONKEY_TP_ARRAY_MAX); in MonkeyTpCallback()