Question
use of HAL_SPI_Transmit()
I am using HAL_SPI_Transmit() API to write to slave's register, how can I confirm that it has actually find the right register and write to it? is below code right?
uint8_t R44=0x2C; //register address
uint8_t R44_data[2]={0x00,0x00};// data to be written
HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12, GPIO_PIN_RESET);//CS pin low
HAL_SPI_Transmit(&hspi1, (uint8_t *)&R44, 1, 100); // transmit address
HAL_SPI_Transmit(&hspi1, (uint8_t *)R44_data, 2, 100);//transmit data
HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12, GPIO_PIN_SET);//CS pin high
