Skip to content

Commit ebc18f5

Browse files
committed
fix(SPI): Remove some dumb code
1 parent 0178974 commit ebc18f5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Inc/HALAL/Models/SPI/SPI2.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,10 +1238,10 @@ struct SPIDomain {
12381238
);
12391239
return false;
12401240
}
1241-
auto error_code = HAL_SPI_TransmitReceive_DMA(
1241+
auto error_code = HAL_SPI_TransmitReceive_DMA( // (TODO) These functions should actually allow volatiles
12421242
&spi_instance.hspi,
1243-
const_cast<uint8_t*>(reinterpret_cast<const volatile uint8_t*>(&tx_data)),
1244-
const_cast<uint8_t*>(reinterpret_cast<volatile uint8_t*>(&rx_data)),
1243+
reinterpret_cast<const uint8_t*>(&tx_data),
1244+
reinterpret_cast<uint8_t*>(&rx_data),
12451245
size / frame_size
12461246
);
12471247
return check_error_code(error_code);

0 commit comments

Comments
 (0)