Arduino PinChangeInt.h产生编译器错误
Arduino PinChangeInt.h yields compiler errors
我尝试重新编译使用PinChangeInt的旧arduino草图。编译器报告以下错误:
Arduino: 1.6.9 (Windows 7), TD: 1.29, Board: "Arduino/Genuino Micro"
In file included from D:homearnolddevelopmentarduinodroneserial_commRxRx.ino:50:0:
C:packagesarduinolibrariesPinChangeInt/PinChangeInt.h:328:32: error: 'PCMSK1' was not declared in this scope
PCintPort portC=PCintPort(3, 1,PCMSK1); // port PC==3 (also in pins_arduino.c, Arduino version 022)
C:packagesarduinolibrariesPinChangeInt/PinChangeInt.h:331:32: error: 'PCMSK2' was not declared in this scope
PCintPort portD=PCintPort(4, 2,PCMSK2); // port PD==4
exit status 1
Error compiling for board Arduino/Genuino Micro.
有谁知道这里有什么问题,我该如何修复这些错误?使用Arduino 1.6.9版本,PinChangeInt版本为2402。
在Arduino Micro
中使用ATMega32U4
,在PORTB
上只支持PCMSK0
。其他端口不具备此功能。参见:ATMega32U4 datasheet。
您也可以使用attachInterrupt
来处理外部中断。因此,您在引脚0
, 1
, 2
, 3
和7
(HW引脚:PD0
- PD3
, PE6
)上有八个PCINT0
源(所有这些源都有一个ISR处理程序)和五个外部中断源(每个都有自己的ISR处理程序)。
相关文章:
- MSVC多行宏编译器错误
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++,我收到一个无法理解的编译器错误
- 我收到同义重复编译器错误。我应该如何修复"类型"X"的参数与类型"X"的参数不兼容?
- 重载方法的方式会在使用临时调用时生成编译器错误
- 尝试使用继承和模板实现CRTP.Visual Studio正在生成编译器错误
- 编译器错误:destuctor 的更宽松的抛出说明符
- Android NDK clang 编译器错误在 Windows 上显示'No such file or directory'
- C++ G++ 编译器 - 错误:隐式声明的定义
- 这个失败的测试是将零添加到空指针未定义的行为、编译器错误还是其他什么?
- 模板模板参数和模板别名:编译器错误?
- C++ 编译器错误:P1LinkedList.cpp:145:错误:重载的"to_string(int&)"调用不明确
- 在gcc中意外调用了Const重载.编译器错误或兼容性修复程序
- C1001内部编译器错误是由于矢量初始化(如数组)引起的
- 编译器错误(英特尔并行工作室 2019 与 Visual Studio 社区 2019)
- 如何在C++中克服此 C4430 编译器错误?
- 尝试使用 WinBGI 显示文本时出现编译器错误
- 使用typedef'ed返回类型声明友元函数时出现编译器错误
- 如何在类模板的成员函数中正确调用函数对象?正在生成 Visual Studio 编译器错误 C2440
- C++自定义分配器大小参数作为模板参数会引发编译器错误