2014-12-22 12:35:05 +01:00
|
|
|
/**
|
|
|
|
* External modules library
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MODULES_H__
|
|
|
|
#define __MODULES_H__
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_GPIO)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_GPIO "gpio"
|
|
|
|
#define ROM_MODULES_GPIO \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_GPIO, luaopen_gpio, gpio_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_GPIO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_PWM)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_PWM "pwm"
|
|
|
|
#define ROM_MODULES_PWM \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_PWM, luaopen_pwm, pwm_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_PWM
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_WIFI)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_WIFI "wifi"
|
|
|
|
#define ROM_MODULES_WIFI \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_WIFI, luaopen_wifi, wifi_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_WIFI
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_NET)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_NET "net"
|
|
|
|
#define ROM_MODULES_NET \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_NET, luaopen_net, net_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_NET
|
|
|
|
#endif
|
|
|
|
|
2015-02-04 18:32:57 +01:00
|
|
|
#if defined(LUA_USE_MODULES_COAP)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_COAP "coap"
|
|
|
|
#define ROM_MODULES_COAP \
|
2015-02-04 18:32:57 +01:00
|
|
|
_ROM(MODULES_COAP, luaopen_coap, coap_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_COAP
|
|
|
|
#endif
|
|
|
|
|
2015-01-23 04:48:05 +01:00
|
|
|
#if defined(LUA_USE_MODULES_MQTT)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_MQTT "mqtt"
|
|
|
|
#define ROM_MODULES_MQTT \
|
2015-01-23 04:48:05 +01:00
|
|
|
_ROM(MODULES_MQTT, luaopen_mqtt, mqtt_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_MQTT
|
|
|
|
#endif
|
|
|
|
|
2015-01-29 23:47:13 +01:00
|
|
|
#if defined(LUA_USE_MODULES_U8G)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_U8G "u8g"
|
|
|
|
#define ROM_MODULES_U8G \
|
2015-01-31 01:21:51 +01:00
|
|
|
_ROM(MODULES_U8G, luaopen_u8g, lu8g_map)
|
2015-01-29 23:47:13 +01:00
|
|
|
#else
|
2015-01-31 01:21:51 +01:00
|
|
|
#define ROM_MODULES_U8G
|
2015-01-29 23:47:13 +01:00
|
|
|
#endif
|
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
#if defined(LUA_USE_MODULES_I2C)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_I2C "i2c"
|
|
|
|
#define ROM_MODULES_I2C \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_I2C, luaopen_i2c, i2c_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_I2C
|
|
|
|
#endif
|
|
|
|
|
2015-01-16 21:41:34 +01:00
|
|
|
#if defined(LUA_USE_MODULES_SPI)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_SPI "spi"
|
|
|
|
#define ROM_MODULES_SPI \
|
2015-01-16 21:41:34 +01:00
|
|
|
_ROM(MODULES_SPI, luaopen_spi, spi_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_SPI
|
|
|
|
#endif
|
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
#if defined(LUA_USE_MODULES_TMR)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_TMR "tmr"
|
|
|
|
#define ROM_MODULES_TMR \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_TMR, luaopen_tmr, tmr_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_TMR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_NODE)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_NODE "node"
|
|
|
|
#define ROM_MODULES_NODE \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_NODE, luaopen_node, node_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_NODE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_FILE)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_FILE "file"
|
|
|
|
#define ROM_MODULES_FILE \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_FILE, luaopen_file, file_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_FILE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_ADC)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_ADC "adc"
|
|
|
|
#define ROM_MODULES_ADC \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_ADC, luaopen_adc, adc_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_ADC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_UART)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_UART "uart"
|
|
|
|
#define ROM_MODULES_UART \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_UART, luaopen_uart, uart_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_UART
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_OW)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_OW "ow"
|
|
|
|
#define ROM_MODULES_OW \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_OW, luaopen_ow, ow_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_OW
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(LUA_USE_MODULES_BIT)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_BIT "bit"
|
|
|
|
#define ROM_MODULES_BIT \
|
2014-12-22 12:35:05 +01:00
|
|
|
_ROM(MODULES_BIT, luaopen_bit, bit_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_BIT
|
|
|
|
#endif
|
|
|
|
|
2015-07-02 00:50:26 +02:00
|
|
|
#if defined(LUA_USE_MODULES_WS2801)
|
|
|
|
#define MODULES_WS2801 "ws2801"
|
|
|
|
#define ROM_MODULES_WS2801 \
|
|
|
|
_ROM(MODULES_WS2801, luaopen_ws2801, ws2801_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_WS2801
|
|
|
|
#endif
|
|
|
|
|
2015-02-05 18:40:46 +01:00
|
|
|
#if defined(LUA_USE_MODULES_WS2812)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_WS2812 "ws2812"
|
|
|
|
#define ROM_MODULES_WS2812 \
|
2015-03-03 10:20:02 +01:00
|
|
|
_ROM(MODULES_WS2812, luaopen_ws2812, ws2812_map)
|
2015-02-05 18:40:46 +01:00
|
|
|
#else
|
|
|
|
#define ROM_MODULES_WS2812
|
|
|
|
#endif
|
|
|
|
|
2015-03-16 02:00:33 +01:00
|
|
|
#if defined(LUA_USE_MODULES_CJSON)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_CJSON "cjson"
|
|
|
|
#define ROM_MODULES_CJSON \
|
2015-03-16 02:00:33 +01:00
|
|
|
_ROM(MODULES_CJSON, luaopen_cjson, cjson_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_CJSON
|
|
|
|
#endif
|
2015-02-05 18:40:46 +01:00
|
|
|
|
2015-05-26 06:06:49 +02:00
|
|
|
#if defined(LUA_USE_MODULES_CRYPTO)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_CRYPTO "crypto"
|
|
|
|
#define ROM_MODULES_CRYPTO \
|
2015-05-26 06:06:49 +02:00
|
|
|
_ROM(MODULES_CRYPTO, luaopen_crypto, crypto_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_CRYPTO
|
|
|
|
#endif
|
|
|
|
|
2015-06-12 00:05:27 +02:00
|
|
|
#if defined(LUA_USE_MODULES_RC)
|
2015-06-18 10:31:40 +02:00
|
|
|
#define MODULES_RC "rc"
|
|
|
|
#define ROM_MODULES_RC \
|
|
|
|
_ROM(MODULES_RC, luaopen_rc, rc_map)
|
2015-06-12 00:05:27 +02:00
|
|
|
#else
|
|
|
|
#define ROM_MODULES_RC
|
|
|
|
#endif
|
|
|
|
|
2015-06-18 10:31:40 +02:00
|
|
|
#if defined(LUA_USE_MODULES_DHT)
|
|
|
|
#define MODULES_DHT "dht"
|
|
|
|
#define ROM_MODULES_DHT \
|
|
|
|
_ROM(MODULES_DHT, luaopen_dht, dht_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_DHT
|
|
|
|
#endif
|
|
|
|
|
2015-06-25 04:26:54 +02:00
|
|
|
#if defined(LUA_USE_MODULES_RTCMEM)
|
|
|
|
#define MODULES_RTCMEM "rtcmem"
|
|
|
|
#define ROM_MODULES_RTCMEM \
|
|
|
|
_ROM(MODULES_RTCMEM, luaopen_rtcmem, rtcmem_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_RTCMEM
|
|
|
|
#endif
|
|
|
|
|
2015-06-25 07:32:21 +02:00
|
|
|
#if defined(LUA_USE_MODULES_RTCTIME)
|
|
|
|
#define MODULES_RTCTIME "rtctime"
|
|
|
|
#define ROM_MODULES_RTCTIME \
|
|
|
|
_ROM(MODULES_RTCTIME, luaopen_rtctime, rtctime_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_RTCTIME
|
|
|
|
#endif
|
|
|
|
|
2015-06-26 08:36:39 +02:00
|
|
|
#if defined(LUA_USE_MODULES_RTCFIFO)
|
|
|
|
#define MODULES_RTCFIFO "rtcfifo"
|
|
|
|
#define ROM_MODULES_RTCFIFO \
|
|
|
|
_ROM(MODULES_RTCFIFO, luaopen_rtcfifo, rtcfifo_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_RTCFIFO
|
|
|
|
#endif
|
|
|
|
|
2015-06-30 03:51:33 +02:00
|
|
|
#if defined(LUA_USE_MODULES_SNTP)
|
|
|
|
#define MODULES_SNTP "sntp"
|
|
|
|
#define ROM_MODULES_SNTP \
|
|
|
|
_ROM(MODULES_SNTP, luaopen_sntp, sntp_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_SNTP
|
|
|
|
#endif
|
|
|
|
|
2015-08-03 17:07:56 +02:00
|
|
|
#if defined(LUA_USE_MODULES_BMP085)
|
|
|
|
#define MODULES_BMP085 "bmp085"
|
|
|
|
#define ROM_MODULES_BMP085 \
|
|
|
|
_ROM(MODULES_BMP085, luaopen_bmp085, bmp085_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_BMP085
|
|
|
|
#endif
|
|
|
|
|
2015-08-22 00:15:28 +02:00
|
|
|
#if defined(LUA_USE_MODULES_TSL2561)
|
|
|
|
#define MODULES_TSL2561 "TSL2561"
|
|
|
|
#define ROM_MODULES_TSL2561 \
|
|
|
|
_ROM(MODULES_TSL2561, luaopen_tsl2561, tsl2561_map)
|
|
|
|
#else
|
|
|
|
#define ROM_MODULES_TSL2561
|
|
|
|
#endif
|
2015-08-03 17:07:56 +02:00
|
|
|
|
2015-03-03 10:20:02 +01:00
|
|
|
#define LUA_MODULES_ROM \
|
2014-12-22 12:35:05 +01:00
|
|
|
ROM_MODULES_GPIO \
|
|
|
|
ROM_MODULES_PWM \
|
|
|
|
ROM_MODULES_WIFI \
|
2015-02-04 18:32:57 +01:00
|
|
|
ROM_MODULES_COAP \
|
2015-01-29 23:47:13 +01:00
|
|
|
ROM_MODULES_MQTT \
|
2015-03-03 20:51:16 +01:00
|
|
|
ROM_MODULES_U8G \
|
2014-12-22 12:35:05 +01:00
|
|
|
ROM_MODULES_I2C \
|
2015-01-16 21:41:34 +01:00
|
|
|
ROM_MODULES_SPI \
|
2014-12-22 12:35:05 +01:00
|
|
|
ROM_MODULES_TMR \
|
|
|
|
ROM_MODULES_NODE \
|
|
|
|
ROM_MODULES_FILE \
|
|
|
|
ROM_MODULES_NET \
|
|
|
|
ROM_MODULES_ADC \
|
|
|
|
ROM_MODULES_UART \
|
|
|
|
ROM_MODULES_OW \
|
2015-03-03 10:20:02 +01:00
|
|
|
ROM_MODULES_BIT \
|
2015-07-02 00:50:26 +02:00
|
|
|
ROM_MODULES_WS2801 \
|
2015-03-16 02:00:33 +01:00
|
|
|
ROM_MODULES_WS2812 \
|
2015-06-18 10:31:40 +02:00
|
|
|
ROM_MODULES_CJSON \
|
|
|
|
ROM_MODULES_CRYPTO \
|
|
|
|
ROM_MODULES_RC \
|
2015-06-25 04:26:54 +02:00
|
|
|
ROM_MODULES_DHT \
|
|
|
|
ROM_MODULES_RTCMEM \
|
2015-06-25 07:32:21 +02:00
|
|
|
ROM_MODULES_RTCTIME \
|
2015-06-26 08:36:39 +02:00
|
|
|
ROM_MODULES_RTCFIFO \
|
2015-06-30 03:51:33 +02:00
|
|
|
ROM_MODULES_SNTP \
|
2015-08-03 17:07:56 +02:00
|
|
|
ROM_MODULES_BMP085 \
|
2015-08-22 14:25:47 +02:00
|
|
|
ROM_MODULES_TSL2561
|
2014-12-22 12:35:05 +01:00
|
|
|
#endif
|