1 { 2 "Uart": { 3 "read": { 4 "description": "Read length bytes from the device", 5 "params": { 6 "length": { 7 "type": "Number", 8 "description": "Size of read in bytes to make" 9 } 10 }, 11 "return": { 12 "type": "Buffer", 13 "description": "Data read" 14 } 15 }, 16 "write": { 17 "description": "Write length bytes to the device", 18 "params": { 19 "length": { 20 "type": "Number", 21 "description": "Size of buffer to send" 22 } 23 }, 24 "return": { 25 "type": "mraa_result_t", 26 "description": "Result of operation" 27 } 28 } 29 }, 30 "I2c": { 31 "read": { 32 "description": "Read length bytes from the bus", 33 "params": { 34 "length": { 35 "type": "Number", 36 "description": "Size of read in bytes to make" 37 } 38 }, 39 "return": { 40 "type": "Buffer", 41 "description": "Data read" 42 } 43 }, 44 "write": { 45 "description": "Write length bytes to the bus, the first byte in the Buffer is the command/register to write", 46 "params": { 47 "length": { 48 "type": "Number", 49 "description": "Size of buffer to send" 50 } 51 }, 52 "return": { 53 "type": "mraa_result_t", 54 "description": "Result of operation" 55 } 56 } 57 }, 58 "Gpio": { 59 "isr": { 60 "description": "Sets a callback to be called when pin value changes", 61 "params": { 62 "mode": { 63 "type": "Edge", 64 "description": "The edge mode to set" 65 }, 66 "func": { 67 "type": "Function", 68 "description": "Function to be called when interupt is triggered" 69 } 70 }, 71 "return": { 72 "type": "mraa_result_t", 73 "description": "Result of operation" 74 } 75 } 76 } 77 } 78