Advertising
- Something
- Sunday, December 17th, 2006 at 11:56:04am MST
- void fiq_record(void) ICODE_ATTR __attribute__ ((interrupt ("FIQ")));
- void fiq_record(void)
- {
- short value;
- pcm_more_callback_type2 more_ready;
- int status = 0;
- /* Clear interrupt */
- #if CONFIG_CPU == PP5020
- IISCONFIG &= ~0x01;
- #elif CONFIG_CPU == PP5002
- /* TODO */
- #endif
- while (p_size > 0) {
- if (FIFO_FULL_COUNT < 2) {
- /* enable interrupt */
- #if CONFIG_CPU == PP5020
- IISCONFIG |= 0x01;
- #elif CONFIG_CPU == PP5002
- /* TODO */
- #endif
- return;
- }
- value = (unsigned short)(IISFIFO_RD >> 16);
- if (value > peak_l) peak_l = value;
- else if (-value > peak_l) peak_l = -value;
- *(p++) = value;
- value = (unsigned short)(IISFIFO_RD >> 16);
- if (value > peak_r) peak_r = value;
- else if (-value > peak_r) peak_r = -value;
- *(p++) = value;
- p_size -= 4;
- /* If we have filled the current chunk, start a new one */
- if (p_size == 0) {
- rec_peak_left = peak_l;
- rec_peak_right = peak_r;
- peak_l = peak_r = 0;
- }
- }
- more_ready = pcm_callback_more_ready;
- if (more_ready != NULL && more_ready(status) >= 0)
- {
- logf("more ready");
- return;
- }
- logf("end");
- /* Finished recording */
- pcm_rec_dma_stop();
- }
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.