#ifndef SPECTRALMATRICESDMASIMULATOR_H #define SPECTRALMATRICESDMASIMULATOR_H #define APB_SPECTRAL_MATRICES_CTRL 0x80000700 #define APB_SPECTRAL_MATRICES_DMA1 0x80000704 #define APB_SPECTRAL_MATRICES_DMA2 0x80000708 #define APB_ADDRESS_IRQCTRL 0x80000208 #include #include #include #include #define SPECTRAL_MATRIX_SIZE 3840 class SpectralMatricesDMASimulator : public QWidget { Q_OBJECT public: explicit SpectralMatricesDMASimulator(QWidget *parent = 0); QVBoxLayout *mainLayout; signals: void rmapplugginRead(unsigned int *Value, unsigned int count, unsigned int address); void rmapplugginWrite(unsigned int *Value, unsigned int count, unsigned int address); void sendMessage(QString message); public slots: void sendOneSpectralMatrixSLOT(); void sendOneSpectralMatrix1SLOT(); void sendOneSpectralMatrix2SLOT(); void startSendingMatricesSLOT(); void stopSendingMatricesSLOT(); void readMatrixAddress1SLOT(); void readMatrixAddress2SLOT(); private: unsigned int *Value; unsigned int count; unsigned int address; unsigned int spectralMatrixCTRL; unsigned int spectralMatrixAddress1; unsigned int spectralMatrixAddress2; unsigned int irqctrlForce; unsigned int nbMatricesSent; QPushButton *sendOneSpectralMatrix1Button; QPushButton *sendOneSpectralMatrix2Button; QPushButton *sendSpectralMatricesPeriodicallyButton; QPushButton *readMatrixAddress1Button; QPushButton *readMatrixAddress2Button; QPushButton *startSendingMatricesButton; QPushButton *stopSendingMatricesButton; bool flagSendMatrix1; QTimer *timer; }; #endif // SPECTRALMATRICESDMASIMULATOR_H