1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-21 15:54:39 +01:00

Bridge class now checks for protocol version

This commit is contained in:
Cristian Maglie 2013-06-12 12:08:11 +02:00
parent e5ea217429
commit 1958ecd620

View File

@ -27,8 +27,6 @@ void BridgeClass::begin() {
return; return;
started = true; started = true;
// TODO: A more robust restart
// Wait for Atheros bootloader to finish startup // Wait for Atheros bootloader to finish startup
do { do {
dropAll(); dropAll();
@ -53,8 +51,11 @@ void BridgeClass::begin() {
// are ignored as "invalid packets". // are ignored as "invalid packets".
// Reset the brigde // Reset the brigde
uint8_t cmd[] = {'X','X'}; uint8_t cmd[] = {'X','X', '1','0','0'};
transfer(cmd, 2); uint8_t res[1];
transfer(cmd, 5, res, 1);
if (res[0] != 0)
while (true);
} }
uint8_t BridgeClass::runCommand(String &command, uint8_t &err) { uint8_t BridgeClass::runCommand(String &command, uint8_t &err) {