SPI code added (experimental)
This commit is contained in:
1 parent
41bec2714d
commit
16759c4dd5
2 files changed
+72
-3
No files matched your search
@@ -1,9 +1,34 @@
|
||||
#ifndef _SPISEND_H
|
||||
#define _SPISEND_H
|
||||
|
||||
#include "globals.h"
|
||||
#include "spi.h"
|
||||
|
||||
extern TaskHandle_t SpiTask;
|
||||
extern QueueHandle_t SPISendQueue;
|
||||
|
||||
/*
|
||||
* Process data in SPI send queue
|
||||
*/
|
||||
void spi_loop(void *pvParameters);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user