Skip to content

Commit

Permalink
update serial 2.0 feature ID
Browse files Browse the repository at this point in the history
  • Loading branch information
soundanalogous committed Nov 14, 2016
1 parent 2fa9134 commit a91d7f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
8 changes: 2 additions & 6 deletions protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions serial-2.0.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit a91d7f6

Please sign in to comment.