MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modSPITxRx

Function modSPITxRx

modules/pins/spi/esp/modSPI.c:411–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void modSPITxRx(modSPIConfiguration config, uint8_t *data, uint16_t count)
412{
413 if (3 & (int)data) {
414 modLog("SPI txrx data address not long aligned");
415 return;
416 }
417
418 modSPIActivateConfiguration(config);
419 gSPIBufferLoader = modSpiLoadBufferAsIs;
420
421 WRITE_PERI_REG(SPI_FLASH_USER(HSPI), SPI_FLASH_DOUT | SPI_DOUTDIN | SPI_CK_I_EDGE); // always lttle-endian
422
423 modSpiLoadBufferAsIs(data, count);
424 gSPIDataCount = 0;
425 modSPIStartSend();
426 modSPIFlush();
427 modSPIReadFromBuffer(data, count);
428}
429
430void modSPIFlush(void)
431{

Callers 14

ssd1351CommandFunction · 0.50
ili9341CommandFunction · 0.50
xpt2046GetPositionFunction · 0.50
xpt2046GetZ1Function · 0.50
powerDownFunction · 0.50
xs_arducam_readFunction · 0.50
readRegisterSPI_FIFOFunction · 0.50
readRegisterSPI_8Function · 0.50
destm32sCommandFunction · 0.50
xs_spi_readFunction · 0.50
xs_spi_transferFunction · 0.50
xs_spi_readFunction · 0.50

Calls 5

modSPIStartSendFunction · 0.85
modSPIReadFromBufferFunction · 0.85
modSpiLoadBufferAsIsFunction · 0.70
modSPIFlushFunction · 0.70

Tested by

no test coverage detected