Hi, I'm reading the firmware of TIDA00771.
I found that the SPI is implemented with four IO ports, not the SPI module in MSP430G2553, why?
Moreover, the readregister function is as below:
uint16_t ReadRegister(uint8_t address)
{
uint16_t reading;
reading = ReadOnce(address); //once
delay_1us(1);
reading = ReadOnce(address); //twice
return reading;
}
why do we need to read the register twice?
And in main.c, there is only "ReadRegister(0x01)", it makes no sense because the "reading" result is not given to any variable. I think it should be
"faulttype= ReadRegister(0x01)" for example.
Thanks.