2017-05-01 22:02:07 +02:00
|
|
|
// Module for interfacing with the SPI interface
|
|
|
|
|
|
|
|
#include "module.h"
|
|
|
|
#include "lauxlib.h"
|
|
|
|
|
|
|
|
#include "spi_common.h"
|
|
|
|
#include "driver/spi_common.h"
|
|
|
|
|
|
|
|
|
2019-07-22 11:13:43 +02:00
|
|
|
LROT_BEGIN(lspi)
|
|
|
|
LROT_FUNCENTRY( master, lspi_master )
|
|
|
|
// LROT_FUNCENTRY( slave, lspi_slave )
|
|
|
|
LROT_NUMENTRY( SPI, SPI_HOST )
|
|
|
|
LROT_NUMENTRY( HSPI, HSPI_HOST )
|
|
|
|
LROT_NUMENTRY( VSPI, VSPI_HOST )
|
|
|
|
LROT_END(lspi, NULL, 0)
|
2017-05-01 22:02:07 +02:00
|
|
|
|
|
|
|
int luaopen_spi( lua_State *L ) {
|
|
|
|
luaopen_spi_master( L );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-22 11:13:43 +02:00
|
|
|
NODEMCU_MODULE(SPI, "spi", lspi, luaopen_spi);
|