From a91d7f61af23f278a599817c78c1f1bdbd9b5412 Mon Sep 17 00:00:00 2001 From: Jeff Hoefs Date: Sun, 13 Nov 2016 19:31:18 -0800 Subject: [PATCH] update serial 2.0 feature ID --- protocol.md | 8 ++------ serial-2.0.md | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/protocol.md b/protocol.md index 9226291..fe942e1 100644 --- a/protocol.md +++ b/protocol.md @@ -120,9 +120,9 @@ N END_SYSEX (0xF7) (MIDI End of SysEx - EOX) Following are SysEx commands used in this version of the protocol: ``` RESERVED 0x00-0x0F // The first 16 bytes are reserved for custom commands +SERIAL_MESSAGE 0x60 // communicate with serial devices, including other boards ENCODER_DATA 0x61 // reply with encoders current positions -STEPPER_DATA 0x62 // control a stepper motor -SERIAL_MESSAGE 0x64 // communicate with serial devices, including other boards +STEPPER2_DATA 0x62 // control a stepper motor ANALOG_MAPPING_QUERY 0x69 // ask for mapping of analog to pin numbers ANALOG_MAPPING_RESPONSE 0x6A // reply with mapping info CAPABILITY_QUERY 0x6B // ask for supported modes and resolution of all pins @@ -143,10 +143,6 @@ SAMPLEING_INTERVAL 0x7A // the interval at which analog input is sample SCHEDULER_DATA 0x7B // send a createtask/deletetask/addtotask/schedule/querytasks/querytask request to the scheduler SYSEX_NON_REALTIME 0x7E // MIDI Reserved for non-realtime messages SYSEX_REALTIME 0X7F // MIDI Reserved for realtime messages - -// Deprecated command IDs -SERIAL_MESSAGE 0x60 // communicate with serial devices, including other boards -STEPPER_DATA 0x72 // control a stepper motor ``` Query Firmware Name and Version diff --git a/serial-2.0.md b/serial-2.0.md index 9d01cc6..c807b2e 100644 --- a/serial-2.0.md +++ b/serial-2.0.md @@ -1,13 +1,13 @@ #Serial 2.0 +Current version: 2.0.0 + Enables control of up to 4 software and 4 hardware (UART) serial ports. Multiple ports can be used simultaneously (depending on restrictions of a given microcontroller board's capabilities). Example files: * Version 2.0 of the Serial feature has not yet been implemented. -Added in version 2.6.0 - ## Constants ### Port IDs @@ -59,7 +59,7 @@ only be specified if the platform requires them to be set. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) // command byte +1 SERIAL_DATA (0x67) // command byte 2 SERIAL_CONFIG (0x00) 3 port (HW_SERIALn OR SW_SERIALn) 4 baud (bits 0 - 6) @@ -78,7 +78,7 @@ Receive serial data from Firmata client, reassemble and write for each byte rece ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_WRITE (0x01) 3 port (HW_SERIALn OR SW_SERIALn) 4 data 0 (LSB) @@ -101,7 +101,7 @@ specified by `maxBytesToRead` then the lesser number of bytes will be returned. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_READ (0x02) 3 port (HW_SERIALn OR SW_SERIALn) 4 SERIAL_READ_MODE (0x00) // 0x00 => read continuously, 0x01 => stop reading @@ -118,7 +118,7 @@ Sent in response to a SERIAL_READ event or on each iteration of the reporting lo ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_REPLY (0x03) 3 port (HW_SERIALn OR SW_SERIALn) 4 data 0 (LSB) @@ -136,7 +136,7 @@ reopen it. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_CLOSE (0x04) 3 port (HW_SERIALn OR SW_SERIALn) 4 END_SYSEX (0xF7) @@ -155,7 +155,7 @@ cases. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_FLUSH (0x05) 3 port (HW_SERIALn OR SW_SERIALn) 4 END_SYSEX (0xF7) @@ -168,7 +168,7 @@ other platforms. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_LISTEN (0x06) 3 port (HW_SERIALn OR SW_SERIALn) 4 END_SYSEX (0xF7) @@ -180,7 +180,7 @@ Update the baud rate on a configured serial port. ``` 0 START_SYSEX (0xF0) -1 SERIAL_MESSAGE (0x64) +1 SERIAL_DATA (0x67) 2 SERIAL_UPDATE_BAUD (0x07) 3 port (HW_SERIALn OR SW_SERIALn) 4 baud (bits 0 - 6)