#######################################
# EQSP32 Datatypes (KEYWORD1)
#######################################

EQSP32	KEYWORD1
EQSP32Configs	KEYWORD1
EQTimer		KEYWORD1
EQSerialMode	KEYWORD1
EQ_PinMode	KEYWORD1
EQ_TrigMode   	KEYWORD1
EQ_WeekDay	KEYWORD1
EQ_WifiStatus	KEYWORD1
EQ_EthernetStatus	KEYWORD1
CanBitRates	KEYWORD1
EQ_InitStatus	KEYWORD1



###########################################
# EQSP32 Global Objects (KEYWORD2)
###########################################
eqx2gStream    KEYWORD2


###########################################
# EQSP32 Library Functions (KEYWORD2)
###########################################

# Initialization
begin		KEYWORD2

# Begin status
initStatus	KEYWORD2

# On board button
readUserButton	KEYWORD2

# Pin Usage and Configuration
pinMode		KEYWORD2
readMode	KEYWORD2
pinValue	KEYWORD2
readPin		KEYWORD2
getPin		KEYWORD2
configPOUTFreq	KEYWORD2
configSWT	KEYWORD2
configTIN	KEYWORD2
configRELAY	KEYWORD2
configPCC	KEYWORD2
isModuleDetected KEYWORD2

# Connectivity Functions
getWiFiStatus		KEYWORD2
getEthernetStatus	KEYWORD2
isDeviceOnline		KEYWORD2
localIP			KEYWORD2
ethernetIP		KEYWORD2
wifiIP			KEYWORD2

# Power Supply Monitoring
readInputVoltage	KEYWORD2
readOutputVoltage	KEYWORD2

# Buzzer Control
buzzerOn	KEYWORD2
buzzerOff	KEYWORD2

# Serial Communication
configSerial	KEYWORD2

# CAN-Bus Communication
configCAN	KEYWORD2
configCANNode	KEYWORD2
transmitCANFrame	KEYWORD2
receiveCANFrame	KEYWORD2

# Timer Functions
start	KEYWORD2
stop	KEYWORD2
pause	KEYWORD2
reset	KEYWORD2
value	KEYWORD2
isExpired	KEYWORD2
isRunning	KEYWORD2

# Local System Time Functions
getLocalHour	KEYWORD2
getLocalMins	KEYWORD2
getLocalSecs	KEYWORD2
getLocalWeekDay	KEYWORD2
getLocalYear	KEYWORD2
getLocalMonth	KEYWORD2
getLocalMonthDay	KEYWORD2
getLocalYearDay	KEYWORD2
isLocalTimeSynced	KEYWORD2
printLocalTime	KEYWORD2

getLocalUnixTimestamp	KEYWORD2
getFormattedLocalTime	KEYWORD2
getUnixTimestamp	KEYWORD2
getFormattedUnixTimestamp	KEYWORD2

getUptimeDays    KEYWORD2
getUptimeHours   KEYWORD2
getUptimeMinutes KEYWORD2
getUptimeSeconds KEYWORD2
printUptime      KEYWORD2

# LED Control Functions
setBleLed        KEYWORD2
resetBleLed      KEYWORD2
toggleBleLed     KEYWORD2
setWifiLed       KEYWORD2
resetWifiLed     KEYWORD2
toggleWifiLed    KEYWORD2


# Helper Functions
isLocalPin	KEYWORD2
isExpModulePin	KEYWORD2
getDeviceName	KEYWORD2
getDeviceID	KEYWORD2

######################################
# EQSP32 Macros (KEYWORD2)
#######################################
# EQxM (EQ expansion modules)
EQXIO	KEYWORD2
EQXPH	KEYWORD2
EQXTC	KEYWORD2
EQXPT	KEYWORD2
EQXAI	KEYWORD2
EQX2G	KEYWORD2

CONVERT_AIN          KEYWORD2
CONVERT_TIN          KEYWORD2
CONVERT_CIN          KEYWORD2
CONVERT_PH           KEYWORD2
CONVERT_TC           KEYWORD2
CONVERT_PT           KEYWORD2



######################################
# EQSP32 Constants (LITERAL1)
#######################################

EQ_PIN_1	LITERAL1
EQ_PIN_2	LITERAL1
EQ_PIN_3	LITERAL1
EQ_PIN_4	LITERAL1
EQ_PIN_5	LITERAL1
EQ_PIN_6	LITERAL1
EQ_PIN_7	LITERAL1
EQ_PIN_8	LITERAL1
EQ_PIN_9	LITERAL1
EQ_PIN_10	LITERAL1
EQ_PIN_11	LITERAL1
EQ_PIN_12	LITERAL1
EQ_PIN_13	LITERAL1
EQ_PIN_14	LITERAL1
EQ_PIN_15	LITERAL1
EQ_PIN_16	LITERAL1

EQ_RS232_TX	LITERAL1
EQ_RS232_RX	LITERAL1
EQ_RS485_TX	LITERAL1
EQ_RS485_RX	LITERAL1
EQ_RS485_EN	LITERAL1
EQ_CAN_TX	LITERAL1
EQ_CAN_RX	LITERAL1
EQ_RS485_2_TX   LITERAL1
EQ_RS485_2_RX   LITERAL1
EQ_RS485_2_EN   LITERAL1

NO_MODE	LITERAL1
CUSTOM	LITERAL1
DIN	LITERAL1
AIN	LITERAL1
CIN	LITERAL1
PCC	LITERAL1          
POUT	LITERAL1
SWT	LITERAL1
TIN	LITERAL1
RELAY	LITERAL1
RAIN	LITERAL1
PH	LITERAL1
TC	LITERAL1
PT100_24W	LITERAL1
PT100_3W	LITERAL1

STATE		LITERAL1
ON_RISING	LITERAL1
ON_FALLING	LITERAL1
ON_TOGGLE	LITERAL1

RS232		LITERAL1
RS232_INV	LITERAL1
RS485_TX	LITERAL1
RS485_RX	LITERAL1


# Conversion multipliers
AIN_TO_V_MULT      LITERAL1
TIN_TO_C_MULT      LITERAL1
CIN_TO_mA_MULT     LITERAL1

PH_TO_PH_MUL       LITERAL1
TC_TO_C_MUL        LITERAL1
PT_TO_C_MULT       LITERAL1


# EQXTC Constants
EQXTC_CH_1	LITERAL1
EQXTC_CH_2	LITERAL1
EQXTC_CH_3	LITERAL1
EQXTC_CH_4	LITERAL1
EQXTC_CH_5	LITERAL1
EQXTC_CH_6	LITERAL1
EQXTC_CHANNELS	LITERAL1


# EQXPT Constants
EQXPT_M_1	LITERAL1
EQXPT_M_2	LITERAL1
EQXPT_CHANNELS	LITERAL1


# EQXPH Constants
EQXPH_PH_1	LITERAL1
EQXPH_CHANNELS	LITERAL1


# EQXIO Constants
EQXIO_PIN_1	LITERAL1
EQXIO_PIN_2	LITERAL1
EQXIO_PIN_3	LITERAL1
EQXIO_PIN_4	LITERAL1
EQXIO_PIN_5	LITERAL1
EQXIO_PIN_6	LITERAL1
EQXIO_PIN_7	LITERAL1
EQXIO_PIN_8	LITERAL1
EQXIO_PIN_9	LITERAL1
EQXIO_PIN_10	LITERAL1
EQXIO_CHANNELS	LITERAL1


# Fault Detection Macros
CIN_OC_ERROR		LITERAL1

TIN_OPEN_CIRCUIT	LITERAL1
TIN_SHORT_CIRCUIT	LITERAL1
IS_TIN_VALID	KEYWORD2

TC_FAULT_OPEN	LITERAL1
TC_FAULT_SHORT_GND	LITERAL1
TC_FAULT_SHORT_VCC	LITERAL1
IS_TC_VALID	KEYWORD2

PT_FAULT_THR_HIGH	LITERAL1
PT_FAULT_THR_LOW	LITERAL1
PT_FAULT_REFIN_LOW	LITERAL1
PT_FAULT_REFIN_HIGH	LITERAL1
PT_FAULT_RTDIN_LOW	LITERAL1
PT_FAULT_OVUV	LITERAL1
IS_PT_VALID	KEYWORD2

CONVERT_AIN   KEYWORD2
CONVERT_TIN   KEYWORD2
CONVERT_CIN   KEYWORD2
CONVERT_PH    KEYWORD2
CONVERT_TC    KEYWORD2
CONVERT_PT    KEYWORD2


###########################################
# MQTT Global Topics (not UID based) for Node-RED, direct device access etc. (KEYWORD2)
###########################################
createGlobal_Topic	KEYWORD2
readGlobal_Topic	KEYWORD2
readGlobal_TopicBOOL	KEYWORD2
readGlobal_TopicFLOAT	KEYWORD2
updateGlobal_Topic	KEYWORD2

###########################################
# MQTT Control Entities for Home Assistant, Node-RED, etc. (KEYWORD2)
###########################################
createControl_Switch	KEYWORD2
createControl_Value	KEYWORD2
readControl_Switch	KEYWORD2
readControl_Value	KEYWORD2
updateControl_Switch	KEYWORD2
updateControl_Value	KEYWORD2

###########################################
# MQTT Display Entities for Home Assistant, Node-RED, etc. (KEYWORD2)
###########################################
createDisplay_BinarySensor	KEYWORD2
createDisplay_Sensor	KEYWORD2
readDisplay_BinarySensor	KEYWORD2
readDisplay_Sensor	KEYWORD2
updateDisplay_BinarySensor	KEYWORD2
updateDisplay_Sensor	KEYWORD2


