Dear Ti Experts,
My customer is developing ADS1292R with below refernce design's demo code
http://www.ti.com/tool/TIDM-BIOSIGNMONITOR
In the below code, customer suppose that SPI_Tx_buf[4] means ECG data, is it right?
they don't know what the meaning of SPI_Tx_buf[3] and SPI_Tx_buf[5] , could you kindly help to give some advice? Thanks a lot.
-----------------------------------------------------------------------------------------------------------------------------
static void ads_rdry_event_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
APP_ERROR_CHECK(nrf_drv_spi_transfer(&ads_spi, NULL, 0, SPI_Rx_buf, 9));
wPara.ecgs++;
if(wPara.ecgs >= 255)
wPara.ecgs = 0;
Disable_ADS1x9x_DRDY_Interrupt();
SPI_Tx_buf[0] = 0x5A;
SPI_Tx_buf[1] = 0xA5;
SPI_Tx_buf[2] = wPara.ecgs;
SPI_Tx_buf[3] = SPI_Rx_buf[6];
SPI_Tx_buf[4] = SPI_Rx_buf[7];
SPI_Tx_buf[5] = SPI_Rx_buf[8];
SPI_Tx_buf[6] = 0;
SPI_Tx_buf[7] = 0;
SPI_Tx_buf[8] = 0;
SPI_Tx_buf[9] = 0;
SPI_Tx_buf[10]= 0;
SPI_Tx_buf[11]= 0;
for(i=2;i<12;i++)
sum += SPI_Tx_buf[i];
SPI_Tx_buf[12] = sum & 0xFF;
sum = 0;
for(i=0;i<13;i++)
while (app_uart_put(SPI_Tx_buf[i]) != NRF_SUCCESS);
Enable_ADS1x9x_DRDY_Interrupt();
}