mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Also, expose serialNumber() in Ion and keep "copySerialNumber" in Ion::Device. This allows the DFU bootloader to remain .bss-free.
24 lines
441 B
C++
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);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|