removed hexa and renumbered neopixel commands

master
Ondřej Hruška 7 years ago
parent b63ca927af
commit 7a4a909d11
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 10
      UNIT_DI.md
  2. 10
      UNIT_DO.md
  3. 8
      UNIT_I2C.md
  4. 14
      UNIT_NEOPIXEL.md
  5. 10
      UNIT_PWMDIM.md
  6. 10
      UNIT_SIPO.md
  7. 4
      UNIT_SPI.md
  8. 14
      UNIT_TOUCH.md
  9. 12
      UNIT_USART.md

@ -7,13 +7,13 @@ Pins are described using the packed format (see [UNIT_DO.md](UNIT_DO.md))
## Commands
### READ (0x00)
### READ (0)
Read all pins.
*Response:*
- u16 - pin states (packed)
### ARM_SINGLE (0x01)
### ARM_SINGLE (1)
Arm a pin or pins for a change detection.
The active edge is defined in the unit settings.
The pins are dis-armed again after a detected event.
@ -21,14 +21,14 @@ The pins are dis-armed again after a detected event.
*Request:*
- u16 - pins to arm (packed)
### ARM_AUTO (0x02)
### ARM_AUTO (2)
Arm a pin or pins for a change detection with automatic re-arm.
The active edge is defined in the unit settings.
*Request:*
- u16 - pins to arm (packed)
### DISARM (0x03)
### DISARM (3)
Disable change detection on the selected pins.
*Request:*
@ -36,7 +36,7 @@ Disable change detection on the selected pins.
## Events
### PIN_CHANGE (0x00)
### PIN_CHANGE (0)
External interrupt, pin change(s) detected.
Reports which pins caused the event (can be multiple), and the entire unit's input captured right after the event.

@ -11,31 +11,31 @@ the block of pins easier, e.g. when using them to drive a parallel bus. For sing
## Commands
### WRITE (0x00)
### WRITE (0)
Write a value to all defined pins.
*Request:*
- u16 - new value (packed)
### SET (0x01)
### SET (1)
Set pins high
*Request:*
- u16 - pins to set high (packed)
### CLEAR (0x02)
### CLEAR (2)
Set pins low
*Request:*
- u16 - pins to set low (packed)
### TOGGLE (0x03)
### TOGGLE (3)
Toggle selected pins (high - low)
*Request:*
- u16 - pins to toggle (packed)
### PULSE (0x04)
### PULSE (4)
Send a pulse.
The start will be aligned to 1 us or 1 ms (based on pulse length) of the internal timebase to ensure the highest length precision. This alignment reduces jitter in the pulse duration. A jitter of the pulse start time is less significant, as there's already some unpredictable delay caused by the USB connection and the PC OS scheduler.

@ -2,13 +2,13 @@
## Commands
### WRITE (0x00)
### WRITE (0)
*Request:*
- u16 - slave address
- u8[] - bytes to write
### READ (0x01)
### READ (1)
*Request:*
- u16 - slave address
@ -17,7 +17,7 @@
*Response:*
- u8[] - received bytes
### WRITE_REG (0x02)
### WRITE_REG (2)
Write a register; first writes the register number, then (in the same transaction)
the data. If the device supports it, can write multiple registers at once.
@ -27,7 +27,7 @@ the data. If the device supports it, can write multiple registers at once.
- u8 - register number
- u8[] - bytes to write
### READ_REG (0x03)
### READ_REG (3)
Read a register value. First writes the register number, then reads a number of bytes.
For devices implementing auto-increment, the register width field can be used to read

@ -7,45 +7,45 @@ Five color data encodings are available for user convenience.
## Commands
### CLEAR (0x00)
### CLEAR (0)
Set all pixels to black. This is also automatically executed on start-up to clear the strip.
### LOAD (0x01)
### LOAD (1)
Load packed RGB data to the strip.
*Payload:*
- a byte array `(R,G,B)` x length
### LOAD_U32_ZRGB (0x08)
### LOAD_U32_ZRGB (4)
Load 32-bit `0x00RRGGBB` words encoded in big-endian as `(0,R,G,B)`.
*Payload:*
- a byte array `(0,R,G,B)` x length
### LOAD_U32_ZBGR (0x09)
### LOAD_U32_ZBGR (5)
Load 32-bit `0x00BBGGRR` words encoded in big-endian as `(0,B,G,R)`.
*Payload:*
- a byte array `(0,B,G,R)` x length
### LOAD_U32_RGBZ (0x0A)
### LOAD_U32_RGBZ (6)
Load 32-bit `0x00BBGGRR` words encoded in little-endian as `(R,G,B,0)`.
*Payload:*
- a byte array `(R,G,B,0)` x length
### LOAD_U32_BGRZ (0x09)
### LOAD_U32_BGRZ (7)
Load 32-bit `0x00RRGGBB` words encoded in little-endian as `(B,G,R,0)`.
*Payload:*
- a byte array `(B,G,R,0)` x length
### GET_LEN (0x04)
### GET_LEN (10)
Read the neopixel strip length as configured in the settings.
*Response:*

@ -1,19 +1,19 @@
# PWMDIM
This unit provides an up to 4-channel PWM output with shared frequency and independent duty cycles. Only one instance can be created due to using a
This unit provides an up to 4-channel PWM output with shared frequency and independent duty cycles. Only one instance can be created due to using a
hardware timer.
## Commands
### SET_FREQUENCY (0x00)
### SET_FREQUENCY (0)
Set the PWM frequency
*Request:*
- u32 - frequency in Hz
### SET_DUTY (0x01)
### SET_DUTY (1)
Set the duty cycle of one or more channels
@ -22,11 +22,11 @@ Set the duty cycle of one or more channels
- u8 - channel number 0-3
- u16 - duty cycle 0-1000
### STOP (0x02)
### STOP (2)
Stop the hardware timer. Outputs enter low level. Has no effect if stopped.
### START (0x03)
### START (3)
Start the timer. Has no effect if running.

@ -13,7 +13,7 @@ The `DIRECT_*` commands are mostly meant for debugging purposes when trying to c
## Commands
### WRITE (0x00)
### WRITE (0)
Sends data to the shift registers.
@ -28,22 +28,22 @@ control or extra LEDs.
- (u8 array) x num_outputs
- must be a multiple of the outputs count (if 1, simply the output data)
### DIRECT_DATA (0x01)
### DIRECT_DATA (1)
Direct write to the data pins, without any pulse.
*Request:*
- u16 - data to output, packed
### DIRECT_CLEAR (0x02)
### DIRECT_CLEAR (2)
Pulse the *Clear* output.
### DIRECT_SHIFT (0x03)
### DIRECT_SHIFT (3)
Pulse the *Shift* output.
### DIRECT_STORE (0x04)
### DIRECT_STORE (4)
Pulse the *Store* output.

@ -10,7 +10,7 @@ connected through protection resistors to prevent a short circuit on signal coll
## Commands
### QUERY (0x00)
### QUERY (0)
Write and read some bytes.
@ -29,7 +29,7 @@ bytes equal to the number of written bytes.
*Response:*
- u8[] - received bytes
### MULTICAST (0x01)
### MULTICAST (1)
*Request:*
- u16 - slaves (packed)

@ -1,6 +1,6 @@
# TOUCH
Access to the hardware touch sensing controller.
Access to the hardware touch sensing controller.
Can be used to create capacitive touch interfaces or for rough capacitance measurement (e.g. water level in a bottle, or proximity sensing).
Button mode is implemented for simple threshold checking with hystheresis.
@ -8,7 +8,7 @@ Button mode is implemented for simple threshold checking with hystheresis.
## Commands
### READ (0x00)
### READ (0)
Read the raw touch pad values (lower indicates higher capacitance).
Values are ordered by group and channel.
@ -16,19 +16,19 @@ Values are ordered by group and channel.
*Response:*
- u16[] - values
### SET_BIN_THR (0x01)
### SET_BIN_THR (1)
Set button mode thresholds. Value 0 = button mode disabled fro the pad.
*Request:*
- u16[] - thresholds
### DISABLE_ALL_REPORTS (0x02)
### DISABLE_ALL_REPORTS (2)
Set thresholds to 0, disabling the button mode for all pads.
### SET_DEBOUNCE_TIME (0x03)
### SET_DEBOUNCE_TIME (3)
Set debounce time for the button mode (replaces the value from unit settings)
@ -36,7 +36,7 @@ Set debounce time for the button mode (replaces the value from unit settings)
- u16 - debounce time milliseconds
### SET_HYSTERESIS (0x04)
### SET_HYSTERESIS (4)
Set hysteresis (replaces the default value from settings)
@ -48,7 +48,7 @@ drops)
- u16 - hystheresis
### GET_CH_COUNT (0x0A)
### GET_CH_COUNT (10)
Get the number of enabled channels

@ -3,15 +3,15 @@
This unit provides access to the hardware USART peripheral. It is capable of
driving RS485 transceivers.
The unit uses asynchronous reception and transmission using DMA to support
low baud rates without lagging the whole platform. Reception is double-buffered
and sent in buffer-sized chunks. The remainder is sent when a timeout from
The unit uses asynchronous reception and transmission using DMA to support
low baud rates without lagging the whole platform. Reception is double-buffered
and sent in buffer-sized chunks. The remainder is sent when a timeout from
the last received byte is reached.
## Commands
### WRITE (0x00)
### WRITE (0)
Add data to the Tx buffer. Sending is asynchronous, but the command may wait
for free space in the DMA buffer.
@ -19,7 +19,7 @@ for free space in the DMA buffer.
*Request:*
- u8[] - bytes to write
### WRITE_SYNC (0x01)
### WRITE_SYNC (1)
Add data to the Tx buffer and wait for the transmission to complete.
@ -28,7 +28,7 @@ Add data to the Tx buffer and wait for the transmission to complete.
## Events
### DATA_RECEIVED (0x00)
### DATA_RECEIVED (0)
Data was received on the serial port.

Loading…
Cancel
Save