libs/epaper/src/epaper.c
/**
 *  @brief: A primitive function to push data to Mongoose-SPI
 */
@brief: A primitive function to push data to Mongoose-SPI
@brief : A primitive function to push data to Mongoose - SPI
static int mgos_epd_send_data_n(const uint8_t * const data, const int len)
{
	mgos_gpio_write( _dc_pin, 1);
	epaper_txn.fd.len = len;
	epaper_txn.fd.tx_data = data;
	epaper_txn.fd.rx_data = NULL;
	if (!mgos_spi_run_txn(epaper_spi, true , &epaper_txn)) {
		LOG(LL_ERROR, ("SPI transaction failed"));
		return -1;
	}
	return 0;
}
static int mgos_epd_send_data_n ( const uint8_t * const data , const int len ) { mgos_gpio_write ( _dc_pin , 1 ) ; epaper_txn . fd . len = len ; epaper_txn . fd . tx_data = data ; epaper_txn . fd . rx_data = NULL ; if ( ! mgos_spi_run_txn ( epaper_spi , true , & epaper_txn ) ) { LOG ( LL_ERROR , ( " " ) ) ; return -1 ; } return 0 ; }
@brief: A primitive function to push data to Mongoose-SPI
@brief : A primitive function to push data to Mongoose - SPI
/* full_duplex */