~ruther/vhdl-spi-2

85e40acbb9c47cff0d091bcd607da8299c6928ea — Rutherther 2 months ago 5379443
feat(stm): Echo received number back
1 files changed, 6 insertions(+), 0 deletions(-)

M stm_spi_funduino/src/main.c
M stm_spi_funduino/src/main.c => stm_spi_funduino/src/main.c +6 -0
@@ 168,12 168,18 @@ void main()
  display_convert_number(&display, 9999);

  // Application
  bool received = false;
  while (1) {
    uint16_t rx;
    if (spi_receive(&spi, &rx, 1) == 0) {
      continue;
    }

    if (received) {
      spi_transmit(&spi, &rx, 1);
    }
    received = true;

    /* usart_transmit(&uart, &buffer[idx], 1); */

    display_convert_number(&display, rx);

Do not follow this link