147 uint8_t tx_reg = reg | 0x80;
152 if (HAL_SPI_Transmit(&
hspi2, &tx_reg, 1, 1000) != HAL_OK)
159 if (HAL_SPI_Receive(&
hspi2, buf, len, 1000) != HAL_OK)
182 uint8_t tx_reg = reg & 0x7F;
187 if (HAL_SPI_Transmit(&
hspi2, &tx_reg, 1, 1000) != HAL_OK)
194 if (HAL_SPI_Transmit(&
hspi2, buf, len, 1000) != HAL_OK)
: Header for main.c file. This file contains the common defines of the application.