首页 > 其他分享 >ESP32-S3-IIS编译报错 ‘I2S_TIMING_REG‘ was not declared in this scope; did you mean ‘I2S_TX_TIMING_REG‘?

ESP32-S3-IIS编译报错 ‘I2S_TIMING_REG‘ was not declared in this scope; did you mean ‘I2S_TX_TIMING_REG‘?

时间:2024-07-23 20:25:35浏览次数:17  
标签:Administrator esp32 I2S TIMING include REG

记录编译报错及解决方法

 'I2S_TIMING_REG' was not declared in this scope; did you mean 'I2S_TX_TIMING_REG'?

'I2S_TIMING_REG' was not declared in this scope; did you mean 'I2S_TX_TIMING_REG'?

1,编译串口打印的报错信息见第2项。
主要是: ‘I2S_TIMING_REG’ was not declared in this scope; did you mean ‘I2S_TX_TIMING_REG’?
中文意思:“I2S_TIMING_REG”未在此范围内声明;你是说“I2S_TX_TIMING_REG”吗?
按提示修改为:

 #define I2S_TIMING_REG I2S_TX_TIMING_REG  //该行和下一行为新增
 #define I2S_CONF_REG I2S_TX_CONF_REG


void I2SMEMSSampler::configureI2S()
{
    if (m_fixSPH0645)
    {
        // FIXES for SPH0645
        REG_SET_BIT(I2S_TIMING_REG(m_i2sPort), BIT(9));
        REG_SET_BIT(I2S_CONF_REG(m_i2sPort), I2S_RX_MSB_SHIFT);
    }

    i2s_set_pin(m_i2sPort, &m_i2sPins);
}

2,串口打印信息
In file included from C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/esp_hw_support/include/esp_memory_utils.h:12,
from C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:79,
from C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/freertos/FreeRTOS-Kernel/include/freertos/portable.h:59,
from C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:71,
from C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SSampler.h:3,
from C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SMEMSSampler.h:3,
from C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SMEMSSampler.cpp:1:
C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SMEMSSampler.cpp: In member function ‘virtual void I2SMEMSSampler::configureI2S()’:
C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SMEMSSampler.cpp:25:21: error: ‘I2S_TIMING_REG’ was not declared in this scope; did you mean ‘I2S_TX_TIMING_REG’?
25 | REG_SET_BIT(I2S_TIMING_REG(m_i2sPort), BIT(9));
| ^~~~~~~~~~~~~~
C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/soc/esp32s3/include/soc/soc.h:67:35: note: in definition of macro ‘REG_SET_BIT’
67 | (volatile uint32_t)(_r) = ((volatile uint32_t)(_r)) | (_b);
| ^~
C:\Users\Administrator\Documents\Arduino\UDP\esp32_sph0645_udp\src\main\I2SMEMSSampler.cpp:26:21: error: ‘I2S_CONF_REG’ was not declared in this scope; did you mean ‘I2S_TX_CONF_REG’?
26 | REG_SET_BIT(I2S_CONF_REG(m_i2sPort), I2S_RX_MSB_SHIFT);
| ^~~~~~~~~~~~
C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/soc/esp32s3/include/soc/soc.h:67:35: note: in definition of macro ‘REG_SET_BIT’
67 | (volatile uint32_t)(_r) = ((volatile uint32_t)(_r)) | (_b);
| ^~

exit status 1

Compilation error: ‘I2S_TIMING_REG’ was not declared in this scope; did you mean ‘I2S_TX_TIMING_REG’?

标签:Administrator,esp32,I2S,TIMING,include,REG
From: https://blog.csdn.net/USALCD/article/details/140641888

相关文章

  • ValueError:X 有 1 个特征,但 LinearRegression 期望有 2 个特征作为输入
    我正在使用pywebio为我的机器学习程序创建一个小型脚本运行用户界面。当不使用小型UI时,运行线性回归predict()函数时不会出现任何错误。UI从用户处检索两个数字,an'age'和a'salary'这两个数字被输入到numpy数组中,并且numpy数组已从一维......
  • CS50P: 7. Regular Expressions
    RegularExpressions/Regexes判断用户是否输入邮箱地址......
  • 解析Java中1000个常用类:GregorianCalendar类,你学会了吗?
    在线工具站推荐一个程序员在线工具站:程序员常用工具(http://cxytools.com),有时间戳、JSON格式化、文本对比、HASH生成、UUID生成等常用工具,效率加倍嘎嘎好用。程序员资料站推荐一个程序员编程资料站:程序员的成长之路(http://cxyroad.com),收录了一些列的技术教程、各大面试专......
  • 解析Java中1000个常用类:GregorianCalendar类,你学会了吗?
    在线工具站推荐一个程序员在线工具站:程序员常用工具(http://cxytools.com),有时间戳、JSON格式化、文本对比、HASH生成、UUID生成等常用工具,效率加倍嘎嘎好用。程序员资料站推荐一个程序员编程资料站:程序员的成长之路(http://cxyroad.com),收录了一些列的技术教程、各大面......
  • 我的 RandomForestRegressor 上的 MAE 和 MSE 非常高
    我得到了一个航班预测数据集,我想尝试一下我的机器学习技能。我清理了数据并修复了一些新功能并删除了其他功能我还得到了一些有价值的数据。但是当我尝试做出预测并评估我的模型时这就是我得到的答案!那是在我用SearchGridCV调整我的模型之后Regressionmetricsonthe......
  • 具有I2S输出的多模数字麦克风ICS-43434咪头LR引脚接地或电源WS接LRCLK
    外观和丝印ICS-43434麦克风3.50mmx2.65mm,丝印为434(图片不好拍,隐约可见434)一般描述ICS-43434是一款数字IS输出底部收音孔麦克风。完整的ICS-43434解决方案包括MEMS传感器、信号调理、模数转换器、抽取和抗混叠滤波器、电源管理以及行业标准的24位12S......
  • CS229|Ch1|Linear regression
    Trainingset:\(\{(x^i,y^i);i=1,...,n\}\)\(x^i\in{X}\):input(features)\(y^i\in{Y}\):output(1)continuousvalues——Regression(2)discretevalues——ClassificationSupervisedlearning主要任务为找functionGivenatrainingset,learnafunction(hyp......
  • PYTHON用时变马尔可夫区制转换(MARKOV REGIME SWITCHING)自回归模型分析经济时间序列|附
    全文下载链接:http://tecdat.cn/?p=22617最近我们被客户要求撰写关于MRS的研究报告,包括一些图形和统计输出。本文提供了一个在统计模型中使用马可夫转换模型模型的例子,来复现Kim和Nelson(1999)中提出的一些结果。它应用了Hamilton(1989)的滤波器和Kim(1994)的平滑器  %matplot......
  • auto,static,const,extern,volatile,register
    auto关键字用于声明变量的生存期为自动,auto修饰的是自动类型的变量,对于局部变量默认就是自动类型的变量,如果没有赋初值它的值就是随机值。static 修饰的变量或者函数有如下特点:static修饰的局部变量,可以延长变量的生命周期(不会被多次初始化)static修饰的全局变量或者函数只......
  • buying a SIM card and registering a mobile phone number
    Here’sasampleconversationaboutbuyingaSIMcardandregisteringamobilephonenumber:User:Hi,IneedtobuyaSIMcardandregisteramobilephonenumber.Canyouguidemethroughtheprocess?Salesperson:Ofcourse!First,weneedtochooseamo......