ESP32-PaxCounter/include/spisend.h

34 lines
690 B
C
Raw Normal View History

#ifndef _SPISEND_H
#define _SPISEND_H
2018-10-03 16:24:45 +02:00
2018-10-27 13:51:59 +02:00
#include "globals.h"
#include "spi.h"
2018-10-03 16:24:45 +02:00
extern TaskHandle_t SpiTask;
extern QueueHandle_t SPISendQueue;
2018-10-27 13:51:59 +02:00
/*
* Process data in SPI send queue
*/
2018-10-03 16:24:45 +02:00
void spi_loop(void *pvParameters);
2018-10-27 13:51:59 +02:00
/*
* initialize local SPI wire interface
*/
void hal_spi_init();
/*
* Perform SPI write transaction on local SPI wire interface
* - write the command byte 'cmd'
* - write 'len' bytes out of 'buf'
*/
void hal_spi_write(uint8_t cmd, const uint8_t* buf, int len);
/*
* Perform SPI read transaction on local SPI wire interface
* - read the command byte 'cmd'
* - read 'len' bytes into 'buf'
*/
void hal_spi_read(uint8_t cmd, uint8_t* buf, int len);
2018-10-03 16:24:45 +02:00
#endif