diff --git a/src/lt_l1.c b/src/lt_l1.c index 06b55d9..c5511ff 100644 --- a/src/lt_l1.c +++ b/src/lt_l1.c @@ -42,6 +42,20 @@ lt_ret_t lt_l1_read(lt_handle_t *h, const uint32_t max_len, const uint32_t timeo // Try to read CHIP_STATUS lt_l1_spi_csn_low(h); +#ifdef EXPERIMENTAL_SPI_RASPBERRYPI + // store the byte which was initally in l2_buff + uint8_t store_byte = h->l2_buff[0]; + // put raspberry command byte there + h->l2_buff[0] = PUT READ BYTE HERE; + // do transmit of that one command + if (lt_l1_spi_transfer(h, 0, 1, timeout) != LT_OK) + { + lt_l1_spi_csn_high(h); + return LT_L1_SPI_ERROR; + } + // put previous byte back to buffer and continue as usually + h->l2_buff[0] = store_byte; +#endif if (lt_l1_spi_transfer(h, 0, 1, timeout) != LT_OK) { lt_l1_spi_csn_high(h);