Advertisement
honey_the_codewitch

esp32 spi low level

Feb 16th, 2022
588
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. while (*_spi_cmd&SPI_USR);
  2. for (i=0; i < rem; ++i) *spi_w++ = val32;
  3. *_spi_mosi_dlen = (rem << 3) - 1;
  4. *_spi_cmd = SPI_USR;
  5. if (!count) return; //{while (*_spi_cmd&SPI_USR); return; }
  6. i = i>>1; while(i++<8) *spi_w++ = val32;
  7. ...
  8. if(spi_mode==1||spi_mode==2) {
  9.     *_spi_user = SPI_USR_MOSI | SPI_USR_MISO | SPI_DOUTDIN | SPI_CK_OUT_EDGE;
  10. } else {
  11.     *_spi_user = SPI_USR_MOSI | SPI_USR_MISO | SPI_DOUTDIN;
  12. }
  13. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement