Hi Friends,
I have to implement a SPI request_response function for 8-bit microcontroller. This function has two arguments one is request command structure and other is response structure which is filled after getting response. Its 8-bytes i.e.,
There are 3-4 set of request and response. Which is...
Tricky SPI communication with request and response structure.
I have to implement a SPI request_response function for 8-bit microcontroller. This function has two arguments one is request command structure and other is response structure which is filled after getting response. Its 8-bytes i.e.,
Code (Text):
- typdef struct{
- uint16_t data0;
- uint16_t data1;
- uint16_t data2;
- uint16_t data3;
- }data_st;
- extern data_st *request;
- extern data_st *response;
- request_response(&request, &response);
Tricky SPI communication with request and response structure.