@@ -129,14 +129,16 @@ WinbondFlash::requestDeviceId()
129
129
, WindbondCommandSet::DummyByte
130
130
, WindbondCommandSet::DummyByte
131
131
, WindbondCommandSet::DummyByte
132
- );
133
- m_pBusPtr->addTransaction ( std::move ( requestId ) );
134
-
135
132
136
- Interface::Spi::Transaction receiveData =
137
- readTransaction ( WindbondCommandSet::UniqueIdLength );
133
+ , WindbondCommandSet::DummyByte
134
+ , WindbondCommandSet::DummyByte
135
+ , WindbondCommandSet::DummyByte
136
+ , WindbondCommandSet::DummyByte
137
+ , WindbondCommandSet::DummyByte
138
+ , WindbondCommandSet::DummyByte
139
+ );
138
140
139
- receiveData .afterTransaction =
141
+ requestId .afterTransaction =
140
142
[this ]
141
143
{
142
144
const auto & dmaReceiveBuffer = m_pBusPtr->getDmaBufferReceive ();
@@ -147,8 +149,8 @@ WinbondFlash::requestDeviceId()
147
149
}
148
150
onRequestDeviceIdCompleted.emit ();
149
151
};
150
-
151
- m_pBusPtr->addTransaction ( std::move ( receiveData ) );
152
+
153
+ m_pBusPtr->addTransaction ( std::move ( requestId ) );
152
154
m_pBusPtr->runQueue ();
153
155
}
154
156
@@ -157,12 +159,11 @@ WinbondFlash::requestJEDEDCId()
157
159
{
158
160
Interface::Spi::Transaction requestIdCommandTransaction = writeTransaction (
159
161
WindbondCommandSet::ReadJedecId
162
+ , WindbondCommandSet::DummyByte
163
+ , WindbondCommandSet::DummyByte
164
+ , WindbondCommandSet::DummyByte
160
165
);
161
- m_pBusPtr->addTransaction ( std::move ( requestIdCommandTransaction ) );
162
-
163
- Interface::Spi::Transaction receiveData =
164
- readTransaction ( WindbondCommandSet::JedecIdLength );
165
- receiveData.afterTransaction =
166
+ requestIdCommandTransaction.afterTransaction =
166
167
[this ]
167
168
{
168
169
std::uint32_t JedecDeviceId{};
@@ -173,7 +174,7 @@ WinbondFlash::requestJEDEDCId()
173
174
}
174
175
onRequestJedecIdCompleted.emit (JedecDeviceId);
175
176
};
176
- m_pBusPtr->addTransaction ( std::move ( receiveData ) );
177
+ m_pBusPtr->addTransaction ( std::move ( requestIdCommandTransaction ) );
177
178
m_pBusPtr->runQueue ();
178
179
}
179
180
0 commit comments