This commit is contained in:
parent
1727168ee5
commit
7023fe5c42
@ -33,14 +33,14 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
|||||||
return DirectTmSinkIF::IS_BUSY;
|
return DirectTmSinkIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
for (size_t idx = 0; idx < size; idx++) {
|
for (size_t idx = 0; idx < size; idx++) {
|
||||||
if (pollPapbBusySignal(10) == returnvalue::OK) {
|
if (pollPapbBusySignal(20) == returnvalue::OK) {
|
||||||
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
||||||
} else {
|
} else {
|
||||||
abortPacketTransfer();
|
abortPacketTransfer();
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pollPapbBusySignal(10) == returnvalue::OK) {
|
if (pollPapbBusySignal(20) == returnvalue::OK) {
|
||||||
completePacketTransfer();
|
completePacketTransfer();
|
||||||
} else {
|
} else {
|
||||||
abortPacketTransfer();
|
abortPacketTransfer();
|
||||||
@ -57,7 +57,7 @@ ReturnValue_t PapbVcInterface::pollPapbBusySignal(uint32_t maxPollRetries) const
|
|||||||
gpio::Levels papbBusyState = gpio::Levels::LOW;
|
gpio::Levels papbBusyState = gpio::Levels::LOW;
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
uint32_t busyIdx = 0;
|
uint32_t busyIdx = 0;
|
||||||
struct timespec nextDelay = {.tv_sec = 0, .tv_nsec = 1000};
|
nextDelay.tv_nsec = 1000;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
/** Check if PAPB interface is ready to receive data */
|
/** Check if PAPB interface is ready to receive data */
|
||||||
|
@ -87,6 +87,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
|
|
||||||
std::string uioFile;
|
std::string uioFile;
|
||||||
int mapNum = 0;
|
int mapNum = 0;
|
||||||
|
mutable struct timespec nextDelay = {.tv_sec = 0, .tv_nsec = 1000};
|
||||||
mutable struct timespec remDelay;
|
mutable struct timespec remDelay;
|
||||||
|
|
||||||
volatile uint32_t* vcBaseReg = nullptr;
|
volatile uint32_t* vcBaseReg = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user