Skip to content

Commit

Permalink
Fix unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHeEGG committed Apr 1, 2024
1 parent 4efac35 commit 9ab6af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tc_max31855_spi/tc_max31855_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ TcMax31855Spi::Data TcMax31855Spi::Read() {
data.valid = false;

uint8_t buffer[4] = {0};
uint8_t temp[4] = {0};
HAL_GPIO_WritePin(_csPort, _csPin, GPIO_PIN_RESET); // start SPI transaction
if (HAL_SPI_Receive(_hspi, buffer, 4, _timeout) != HAL_OK) return data; // read 8-bits four times from miso line
uint32_t dummy = _hspi->Instance->DR; // flush
(void)dummy;
HAL_GPIO_WritePin(_csPort, _csPin, GPIO_PIN_SET);
uint32_t d = ((uint32_t)buffer[0] << 24) | ((uint32_t)buffer[1] << 16) | ((uint32_t)buffer[2] << 8) | ((uint32_t)buffer[3]); // MSB

Expand Down

0 comments on commit 9ab6af2

Please sign in to comment.