0
我需要一個代碼,一個AnalogIn輸入轉換的mbed LPC1768數字由我使用的CAN controller.The例如語法被用來幫助模擬輸入轉換爲數字的CAN是在mbed LPC1768
if(can1.write(CANMessage(1337, &counter, 2))) {
..........
}
其中「counter
」是要由我作爲一個符號的int(該示例然而它定義爲一個char)發送和定義的數據。但我不斷收到錯誤消息
Error: No instance of constructor "mbed::CANMessage::CANMessage" matches the argument list in "project_test.cpp"
控制器CANMessage語法
CANMessage(int _id, const char *_data, char _len = 8, CANType _type = CANData, CANFormat _format = CANStandard) {
len = _len & 0xF;
type = _type;
format = _format;
id = _id;
memcpy(data, _data, _len);
}
我真的不明白控制器語法和如何應用它。任何幫助解釋將不勝感激。由於