浏览代码

Audio interrupt priority = 208

main
PaulStoffregen 10 年前
父节点
当前提交
6130951165
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. +1
    -1
      teensy3/AudioStream.cpp
  2. +2
    -0
      teensy3/AudioStream.h

+ 1
- 1
teensy3/AudioStream.cpp 查看文件

@@ -202,7 +202,7 @@ bool AudioStream::update_scheduled = false;
bool AudioStream::update_setup(void)
{
if (update_scheduled) return false;
NVIC_SET_PRIORITY(IRQ_SOFTWARE, 0xFF); // 0xFF = lowest priority
NVIC_SET_PRIORITY(IRQ_SOFTWARE, 208); // 255 = lowest priority
NVIC_ENABLE_IRQ(IRQ_SOFTWARE);
update_scheduled = true;
return true;

+ 2
- 0
teensy3/AudioStream.h 查看文件

@@ -43,6 +43,8 @@ class AudioConnection;
typedef struct audio_block_struct {
unsigned char ref_count;
unsigned char memory_pool_index;
unsigned char reserved1;
unsigned char reserved2;
int16_t data[AUDIO_BLOCK_SAMPLES];
} audio_block_t;


正在加载...
取消
保存