andygeiss/esp32-transpiler

View on GitHub
transpile/handlers/mapping.go

Summary

Maintainability
A
0 mins
Test Coverage
package handlers

var mapping = map[string]string{
    "digital.Low":                "LOW",
    "digital.High":               "HIGH",
    "digital.ModeInput":          "INPUT",
    "digital.ModeOutput":         "OUTPUT",
    "digital.PinMode":            "pinMode",
    "digital.Write":              "digitalWrite",
    "random.Num":                 "random",
    "random.NumBetween":          "random",
    "random.Seed":                "randomSeed",
    "serial.Available":           "Serial.available",
    "serial.BaudRate300":         "300",
    "serial.BaudRate600":         "600",
    "serial.BaudRate1200":        "1200",
    "serial.BaudRate2400":        "2400",
    "serial.BaudRate4800":        "4800",
    "serial.BaudRate9600":        "9600",
    "serial.BaudRate14400":       "14400",
    "serial.BaudRate28800":       "28800",
    "serial.BaudRate38400":       "38400",
    "serial.BaudRate57600":       "57600",
    "serial.BaudRate115200":      "115200",
    "serial.Begin":               "Serial.begin",
    "serial.Print":               "Serial.print",
    "serial.Println":             "Serial.println",
    "timer.Delay":                "delay",
    "wifi":                       "WiFi",
    "wifi.Client":                "WiFiClient",
    "client.Connect":             "client.connect",
    "client.Println":             "client.println",
    "client.Write":               "client.write",
    "wifi.Begin":                 "WiFi.begin",
    "wifi.BeginEncrypted":        "WiFi.begin",
    "wifi.BSSID":                 "WiFi.BSSID",
    "wifi.Disconnect":            "WiFi.disconnect",
    "wifi.EncryptionType":        "WiFi.encryptionType",
    "wifi.EncryptionTypeAuto":    "8",
    "wifi.EncryptionTypeCCMP":    "4",
    "wifi.EncryptionTypeNone":    "7",
    "wifi.EncryptionTypeTKIP":    "2",
    "wifi.EncryptionTypeWEP":     "5",
    "wifi.LocalIP":               "WiFi.localIP",
    "wifi.RSSI":                  "WiFi.RSSI",
    "wifi.ScanNetworks":          "WiFi.scanNetworks",
    "wifi.SetDNS":                "WiFi.setDNS",
    "wifi.SSID":                  "WiFi.SSID",
    "wifi.Status":                "WiFi.status",
    "wifi.StatusConnected":       "WL_CONNECTED",
    "wifi.StatusConnectionLost":  "WL_CONNECTION_LOST",
    "wifi.StatusConnectFailed":   "WL_CONNECT_FAILED",
    "wifi.StatusDisconnected":    "WL_DISCONNECTED",
    "wifi.StatusIdle":            "WL_IDLE_STATUS",
    "wifi.StatusNoShield":        "WL_NO_SHIELD",
    "wifi.StatusNoSSIDAvailable": "WL_NO_SSID_AVAIL",
    "wifi.StatusScanCompleted":   "WL_SCAN_COMPLETED",
    "Loop":                       "void loop",
    "Setup":                      "void setup",
}