请帮忙。我有用于制作模拟合成器的旧代码并且无法在 teensy 2.0 上编译它,我使用 Arduino 1.6.9 和 teensyduino 1.29 完整代码有错误
错误日志:从 'void ( )(uint8_t, unsigned int) {aka void ( )(unsigned char, unsigned int)}' 到 'void ( )(uint8_t, int) {aka void ( )(unsigned char, int ) 的无效转换)}' [-fpermissive]
这里的错误,使用函数时:doBend;
void doBend(byte channel, unsigned int bend_usb) {
byte chip_select = channel / 4;
channel = channel % 4;
bendMSB = bend_usb >> 7;
bendLSB = bend_usb % B01111111;
if(channel >=0 && channel <= 2) {
bend_MSB[channel + (chip_select * 4)] = bendMSB;
bend_data[channel + (chip_select * 4)] = bend_MSB[channel + (chip_select * 4)];
writeFrequency(pitchData[channel + (chip_select * 4)], channel, chip_select);
}
}
Arduino 不知道“unsigned int bent_usb”。我不懂 c++,需要你的帮助,如何修复这个错误!