Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
gemu2015 committed Sep 16, 2024
1 parent aed3781 commit 2876dab
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 312 deletions.
26 changes: 20 additions & 6 deletions tasmota/Plugins/module_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,10 @@ typedef struct {
#define TSerial_Hardwareserial(A) jspdispatch(9,(uint32_t)A,0,0)


#define New_E32Serial (void*)jspdispatch(20,0,0,0)
#define New_E32Serial(A) (void*)jspdispatch(20,0,A,0)
#define E32Serial_End(A) jspdispatch(21,(uint32_t)A,0,0)
#define Del_E32Serial(A) jspdispatch(22,(uint32_t)A,0,0)
#define E32Serial_Begin(A,B) jspdispatch(23,(uint32_t)A,B,0)
#define E32Serial_Begin(A,B) jspdispatch(23,(uint32_t)A,(uint32_t)B,0)
#define E32Serial_Available(A) jspdispatch(24,(uint32_t)A,0,0)
#define E32Serial_Peek(A) jspdispatch(25,(uint32_t)A,0,0)
#define E32Serial_Read(A) jspdispatch(26,(uint32_t)A,0,0)
Expand All @@ -950,8 +950,25 @@ typedef struct {
#define E32Serial_SetBaudrate(A,B) jspdispatch(29,(uint32_t)A,B,0)
#define E32Serial_RxBufferSize(A,B) jspdispatch(30,(uint32_t)A,B,0)

#define Replace_Cmd_Vars(A,B,C,D) jReplace_Cmd_Vars((uint32_t)A,B,(uint32_t)C,D)
#define E32_SOC_UART_HP_NUM jspdispatch(50,0,0,0)

#define jgpio_pullup_dis(A) jspdispatch(51,A,0,0)


// canbus
#define ptwai_driver_install(A,B,C) jspdispatch(70,(uint32_t)A,(uint32_t)B,(uint32_t)C)
#define ptwai_driver_uninstall() jspdispatch(71,0,0,0)
#define ptwai_start() jspdispatch(72,0,0,0)
#define ptwai_stop() jspdispatch(73,0,0,0)
#define ptwai_reconfigure_alerts(A,B) jspdispatch(74,(uint32_t)A,(uint32_t)B,0)
#define ptwai_get_status_info(A) jspdispatch(75,(uint32_t)A,0,0)
#define ptwai_receive(A,B) jspdispatch(76,(uint32_t)A,(uint32_t)B,0)
#define ptwai_transmit(A,B) jspdispatch(77,(uint32_t)A,(uint32_t)B,0)
#define ptwai_read_alerts(A,B) jspdispatch(78,(uint32_t)A,(uint32_t)B,0)
#define ptwai__clear_receive_queue() jspdispatch(79,0,0,0)


#define Replace_Cmd_Vars(A,B,C,D) jReplace_Cmd_Vars((uint32_t)A,B,(uint32_t)C,D)


#define icecast_open(A) jtmod_wifi(50,0,(uint32_t)A,0,0)
Expand All @@ -960,9 +977,6 @@ typedef struct {
#define icecast_test() jtmod_wifi(53,0,0,0,0)





#define GetHostbyName(A,B) jtmod_wifi(60,0,(uint32_t)A,(uint32_t)B,0)


Expand Down
27 changes: 25 additions & 2 deletions tasmota/Plugins/modules_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum {iD_TEMPERATURE,iD_PRESSURE,iD_HUMIDITY,iD_ABSOLUTE_HUMIDITY,iD_DISTANCE};
#endif
#endif

#define FUNC_DEINIT 999
#define pFUNC_DEINIT 999

typedef union {
uint8_t data;
Expand Down Expand Up @@ -57,7 +57,7 @@ typedef struct {
int8_t rxpin;
int8_t txpin;
int8_t hwfb;
int8_t nwmode;
int32_t nwmode;
uint16_t bsize;
uint32_t speed;
int8_t invert;
Expand Down Expand Up @@ -98,3 +98,26 @@ enum {
//slow RTC MEM
#define GLOB_MOD_REG 0x50001ff0
//#define GLOB_MOD_REG RTC_SLOW_MEM

enum pXsnsFunctions { pFUNC_SETTINGS_OVERRIDE, pFUNC_SETUP_RING1, pFUNC_SETUP_RING2, pFUNC_PRE_INIT, pFUNC_INIT, pFUNC_ACTIVE, pFUNC_ABOUT_TO_RESTART,
pFUNC_LOOP, pFUNC_SLEEP_LOOP, pFUNC_EVERY_50_MSECOND, pFUNC_EVERY_100_MSECOND, pFUNC_EVERY_200_MSECOND, pFUNC_EVERY_250_MSECOND, pFUNC_EVERY_SECOND,
pFUNC_RESET_SETTINGS, pFUNC_RESTORE_SETTINGS, pFUNC_SAVE_SETTINGS, pFUNC_SAVE_AT_MIDNIGHT, pFUNC_SAVE_BEFORE_RESTART, pFUNC_INTERRUPT_STOP, pFUNC_INTERRUPT_START,
pFUNC_AFTER_TELEPERIOD, pFUNC_JSON_APPEND, pFUNC_WEB_SENSOR, pFUNC_WEB_COL_SENSOR,
pFUNC_MQTT_SUBSCRIBE, pFUNC_MQTT_INIT,
pFUNC_SET_POWER, pFUNC_SHOW_SENSOR, pFUNC_ANY_KEY, pFUNC_LED_LINK,
pFUNC_ENERGY_EVERY_SECOND, pFUNC_ENERGY_RESET,
pFUNC_TELEPERIOD_RULES_PROCESS, pFUNC_FREE_MEM,
pFUNC_WEB_ADD_BUTTON, pFUNC_WEB_ADD_CONSOLE_BUTTON, pFUNC_WEB_ADD_MANAGEMENT_BUTTON, pFUNC_WEB_ADD_MAIN_BUTTON,
pFUNC_WEB_GET_ARG, pFUNC_WEB_ADD_HANDLER, pFUNC_SET_SCHEME, pFUNC_HOTPLUG_SCAN, pFUNC_TIME_SYNCED,
pFUNC_DEVICE_GROUP_ITEM,
pFUNC_NETWORK_UP, pFUNC_NETWORK_DOWN,
pFUNC_return_result = 200, // Insert function WITHOUT return results before here. Following functions return results
pFUNC_PIN_STATE, pFUNC_MODULE_INIT, pFUNC_ADD_BUTTON, pFUNC_ADD_SWITCH, pFUNC_BUTTON_PRESSED, pFUNC_BUTTON_MULTI_PRESSED,
pFUNC_SET_DEVICE_POWER,
pFUNC_MQTT_DATA, pFUNC_SERIAL,
pFUNC_COMMAND, pFUNC_COMMAND_SENSOR, pFUNC_COMMAND_DRIVER,
pFUNC_RULES_PROCESS,
pFUNC_SET_CHANNELS,
pFUNC_last_function // Insert functions WITH return results before here
};

Loading

0 comments on commit 2876dab

Please sign in to comment.