UART

uart

request: init

available 0 to 1

path type conditions description
uartX.rx pinSetting
  • required
 
uartX.tx pinSetting
  • required
 
uartX.baud integer
  • default 115200
  • 1 ≤ value ≤ 5000000
baud rate (bps) 
uartX.stop number
  • default 1
  • enum
    • 1
    • 1.5
    • 2
stop bit width 
uartX.bits integer
  • default 8
  • enum
    • 5
    • 6
    • 7
    • 8
 
uartX.parity string
  • default off
  • enum
    • "off"
    • "odd"
    • "even"
 
uartX.flowcontrol string
  • default off
  • enum
    • "off"
    • "rts"
    • "cts"
    • "rts-cts"
 
uartX.rts pinSetting    
uartX.cts pinSetting    
// Json Example
[
    {
        "uart0": {
            "rx": 0,
            "tx": 1,
            "baud": 115200,
            "stop": 1,
            "bits": 8,
            "parity": "off",
            "flowcontrol": "off",
            "rts": 2,
            "cts": 3
        }
    }
]

request: send

path type conditions description
uartX.data dataArray
  • required
 
// Json Example
[
    {
        "uart0": {
            "data": [16, 34, 242]
        }
    }
]

request: deinit

path type conditions description
uartX null
  • required
 
// Json Example
[
    {
        "uart0": null
    }
]

response: receive

path type conditions description
uartX.data dataArray    
//Response Example
[
    {
        "uart0": {
            "data": [16, 34, 242]
        }
    }
]

type defines

dataArray

type conditions examples description
array
  • items
    • 0 ≤ value ≤ 255
  • [16, 34, 242]
  • [100, 255, 21, 0, 21]
Binary data array. 

pinSetting

type conditions examples description
integer
  • 0 ≤ value ≤ 40
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6