Skip to content

Commit b7a28d7

Browse files
committed
fixed examples
1 parent 1b9b044 commit b7a28d7

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

examples/nucleo_f042k6/spi_dma/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main()
3333
uint8_t receiveBuffer[13];
3434

3535
// send out 12 bytes, don't care about response
36-
Spi::transferBlocking(sendBuffer, nullptr, 12);
36+
Spi::transferBlocking(sendBuffer, (uint8_t*)(nullptr), 12);
3737

3838
// send out 12 bytes, read in 12 bytes
3939
Spi::transferBlocking(sendBuffer, receiveBuffer, 12);

examples/nucleo_f303re/spi_dma/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main()
3333
uint8_t receiveBuffer[13];
3434

3535
// send out 12 bytes, don't care about response
36-
Spi::transferBlocking(sendBuffer, nullptr, 12);
36+
Spi::transferBlocking(sendBuffer, (uint8_t*)(nullptr), 12);
3737

3838
// send out 12 bytes, read in 12 bytes
3939
Spi::transferBlocking(sendBuffer, receiveBuffer, 12);

examples/nucleo_l432kc/spi_dma/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int main()
3434
uint8_t receiveBuffer[13];
3535

3636
// send out 12 bytes, don't care about response
37-
Spi::transferBlocking(sendBuffer, nullptr, 12);
37+
Spi::transferBlocking(sendBuffer, (uint8_t*)(nullptr), 12);
3838

3939
// send out 12 bytes, read in 12 bytes
4040
Spi::transferBlocking(sendBuffer, receiveBuffer, 12);

src/modm/driver/radio/sx1276_impl.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ Sx1276<SpiMaster, Cs>::transmit(uint8_t* data, uint8_t length)
173173

174174
Cs::reset();
175175

176-
RF_CALL(SpiMaster::transfer(buffer,nullptr,1));
177-
RF_CALL(SpiMaster::transfer(data,nullptr,length));
176+
RF_CALL(SpiMaster::transfer(buffer, (uint8_t*)(nullptr), 1));
177+
RF_CALL(SpiMaster::transfer(data, (uint8_t*)(nullptr), length));
178178

179179
if(this->releaseMaster())
180180
{
@@ -251,16 +251,16 @@ Sx1276<SpiMaster, Cs>::readPacket(uint8_t* data, uint8_t maxLength)
251251

252252
Cs::reset();
253253

254-
RF_CALL(SpiMaster::transfer(buffer,nullptr,1));
254+
RF_CALL(SpiMaster::transfer(buffer, (uint8_t*)(nullptr), 1));
255255
if(lastPacketSize > maxLength)
256256
{
257257
MODM_LOG_ERROR<<"SX1276: Read buffer is too small, packet discarded!"<<modm::endl;
258258
//read it out anyway to clean the fifo
259-
RF_CALL(SpiMaster::transfer(nullptr,nullptr,lastPacketSize));
259+
RF_CALL(SpiMaster::transfer((uint8_t*)(nullptr),(uint8_t*)(nullptr),lastPacketSize));
260260
}
261261
else
262262
{
263-
RF_CALL(SpiMaster::transfer(nullptr,data,lastPacketSize));
263+
RF_CALL(SpiMaster::transfer((uint8_t*)(nullptr), data, lastPacketSize));
264264
}
265265

266266
if(this->releaseMaster())

0 commit comments

Comments
 (0)