Files
Upsilon/ion/src/device/bench/command/mcu_serial.cpp
Romain Goyet a29c775663 [ion] Encode the serial number in Base64
Also, expose serialNumber() in Ion and keep "copySerialNumber" in
Ion::Device. This allows the DFU bootloader to remain .bss-free.
2018-05-04 17:31:41 +02:00

24 lines
441 B
C++

#include "command.h"
#include <ion.h>
#include "../../device.h"
namespace Ion {
namespace Device {
namespace Bench {
namespace Command {
void MCUSerial(const char * input) {
if (input != nullptr) {
reply(sSyntaxError);
return;
}
char response[11 + Ion::Device::SerialNumberLength + 1] = {'M', 'C', 'U', '_', 'S', 'E', 'R', 'I', 'A', 'L', '=', 0};
Ion::Device::copySerialNumber(response + 11);
reply(response);
}
}
}
}
}