diff --git a/doc/version-history.rst b/doc/version-history.rst index 2873afbe..be42f031 100644 --- a/doc/version-history.rst +++ b/doc/version-history.rst @@ -8,6 +8,7 @@ v1.11.0 to FPGA class. * Improved documentation. * Public constants to explain meaning of the numbers +* mpuCommands redesign v1.10.1 ------- diff --git a/include/cRIO/FPGA.h b/include/cRIO/FPGA.h index 628011d3..6d5b6191 100644 --- a/include/cRIO/FPGA.h +++ b/include/cRIO/FPGA.h @@ -37,6 +37,20 @@ namespace cRIO { class MPU; +/** + * Commands for FPGA MPU unit. + */ +enum MPUCommands { + WRITE = 1, + READ_US = 2, + READ_MS = 3, + WAIT_US = 100, + WAIT_MS = 101, + IRQ = 240, + TELEMETRY = 254, + RESET = 255, +}; + /** * Interface class for cRIO FPGA. Subclasses can talk either to the real HW, or * be a software simulator. diff --git a/src/LSST/cRIO/FPGA.cpp b/src/LSST/cRIO/FPGA.cpp index 2722430b..63f993b1 100644 --- a/src/LSST/cRIO/FPGA.cpp +++ b/src/LSST/cRIO/FPGA.cpp @@ -155,6 +155,8 @@ void FPGA::mpuCommands(MPU &mpu, const std::chrono::duration &timeout) { std::vector data; data.push_back(mpu.getBus()); + data.push_back(cmd.buffer.size() + 2); + data.push_back(MPUCommands::WRITE); data.push_back(cmd.buffer.size()); data.insert(data.end(), cmd.buffer.begin(), cmd.buffer.end());