Super Vision / Mbed 2 deprecated sv_usb_firmware

Dependencies:   MODSERIAL USBDevice_for_Rev_C_HW mbed

Fork of mbed_sv_firmware_with_init by Bob Recny

Revision:
11:984631a6e373
Parent:
10:55e35536d493
Child:
12:d298b41bac0d
diff -r 55e35536d493 -r 984631a6e373 main.cpp
--- a/main.cpp	Fri Jan 23 01:32:07 2015 +0000
+++ b/main.cpp	Fri Jan 23 01:52:18 2015 +0000
@@ -217,13 +217,14 @@
  * The sensor then responds in kind.  Firmware re-attaches the leading 0xCC and trailing bytes before sending the response over the
  * CDC port to the host PC.
  *
- * I2C-prox messages:   0xCC                (byte) leading value = 0xCC
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      number of data bytes(byte) 0 to 32 (size of declared buffers)
- *                      index               (2 bytes) 12-bit VL6801X register offset, high byte first
- *                      data                (n bytes) number of data bytes noted above
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * I2C-prox messages:   
+ * - 0xCC                (byte) leading value = 0xCC
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - number of data bytes(byte) 0 to 32 (size of declared buffers)
+ * - index               (2 bytes) 12-bit VL6801X register offset, high byte first
+ * - data                (n bytes) number of data bytes noted above
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
  * Multiple registers can be read or written with single prox_msg_rd() or prox_msg_wr().  Location address increments for each byte.
  * VL6180X registers are defined in the sensor datasheet.
@@ -253,13 +254,14 @@
  * The sensor then responds in kind.  Firmware re-attaches the leading 0xCC and trailing bytes before sending the response over the
  * CDC port to the host PC.
  *
- * I2C-prox messages:   0xCC                (byte) leading value = 0xCC
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      number of data bytes(byte) 0 to 32 (size of declared buffers)
- *                      index               (2 bytes) 12-bit VL6801X register offset, high byte first
- *                      data                (n bytes) number of data bytes noted above
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * I2C-prox messages:   
+ * - 0xCC                (byte) leading value = 0xCC
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - number of data bytes(byte) 0 to 32 (size of declared buffers)
+ * - index               (2 bytes) 12-bit VL6801X register offset, high byte first
+ * - data                (n bytes) number of data bytes noted above
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
  * Multiple registers can be read or written with single prox_msg_rd() or prox_msg_wr().  Location address increments for each byte.
  * VL6180X registers are defined in the sensor datasheet.
@@ -287,22 +289,24 @@
  * The host PC sends the GPIO command over the COM port.  With a 0xDD leading byte in the message, the state of the GPIO signals are read and returned.
  * This allows a read-modify-write GPIO sequence.
  *
- * GPIO messages:       0xDD                (byte) leading value = 0xDD
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      data                (byte) see below
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * GPIO messages:       
+ * - 0xDD                (byte) leading value = 0xDD
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - data                (byte) see below
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
- * GPIO data bits:      0 LED - Error           0 = on, 1 = off                  
- *                      1 LED - Comm state      0 = on, 1 = off
- *                      2 RFID interrupt input  0 = off, 1 = on (inverted in h/w)
- *                      3 RFID in-system-prog   0 = off, 1 = on (inverted in h/w)
- *                      4 RFID reset            0 = off, 1 = on (inverted in h/w)
- *                      5 RFID power enable 
- *                         for first prototype, 0 = off, 1 = on
- *                              for production, 0 = on, 1 = off
- *                      6 RFID over-current     0 = overcurrent detected, 1 = OK
- *                      7 Proximity interrupt   0 = interrupt, 1 = idle (This pin may not return anything meaningful here.  The interrupt is edge triggered).
+ * GPIO data bits:      
+ * 0. LED - Error           0 = on, 1 = off                  
+ * 1. LED - Comm state      0 = on, 1 = off
+ * 2. RFID interrupt input  0 = off, 1 = on (inverted in h/w)
+ * 3. RFID in-system-prog   0 = off, 1 = on (inverted in h/w)
+ * 4. RFID reset            0 = off, 1 = on (inverted in h/w)
+ * 5. RFID power enable 
+ * +  for first prototype, 0 = off, 1 = on
+ * +  for production, 0 = on, 1 = off
+ * 6. RFID over-current     0 = overcurrent detected, 1 = OK
+ * 7. Proximity interrupt   0 = interrupt, 1 = idle (This pin may not return anything meaningful here.  The interrupt is edge triggered).
  *
  * @param [in/out] gpio_buffer - GPIO states
  *
@@ -332,22 +336,24 @@
  * The host PC sends the GPIO command over the COM port.  With a 0xDD leading byte in the message, the state of the GPIO signals are read and returned.
  * This allows a read-modify-write GPIO sequence.
  *
- * GPIO messages:       0xDD                (byte) leading value = 0xDD
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      data                (byte) see below
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * GPIO messages:       
+ * - 0xDD                (byte) leading value = 0xDD
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - data                (byte) see below
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
- * GPIO data bits:      0 LED - Error           0 = on, 1 = off                  
- *                      1 LED - Comm state      0 = on, 1 = off
- *                      2 RFID interrupt input  0 = off, 1 = on (inverted in h/w)
- *                      3 RFID in-system-prog   0 = off, 1 = on (inverted in h/w)
- *                      4 RFID reset            0 = off, 1 = on (inverted in h/w)
- *                      5 RFID power enable 
- *                         for first prototype, 0 = off, 1 = on
- *                              for production, 0 = on, 1 = off
- *                      6 don't care
- *                      7 don't care
+ * GPIO data bits:      
+ * 0. LED - Error           0 = on, 1 = off                  
+ * 1. LED - Comm state      0 = on, 1 = off
+ * 2. RFID interrupt input  0 = off, 1 = on (inverted in h/w)
+ * 3. RFID in-system-prog   0 = off, 1 = on (inverted in h/w)
+ * 4. RFID reset            0 = off, 1 = on (inverted in h/w)
+ * 5. RFID power enable 
+ * +  for first prototype, 0 = off, 1 = on
+ * +  for production, 0 = on, 1 = off
+ * 6. RFID over-current     READ ONLY, ignored here 
+ * 7. Proximity interrupt   READ ONLY, ignored here
  *
  * @param [in/out] gpio_buffer - GPIO states
  *
@@ -385,14 +391,15 @@
  * Firmware re-attaches the leading 0xFF and trailing bytes before sending the response over the
  * CDC port to the host PC.
  *
- * I2C-EEPROM messages: 0xEE                (byte) leading value = 0xEE
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      number of data bytes(byte) 0 to 32 (size of declared buffers)
- *                      block               (byte) lower 3 bits are logically OR'd with the I2C address
- *                      address             (byte) memory location within block
- *                      data                (n bytes) number of data bytes noted above
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * I2C-EEPROM messages:    
+ * - 0xEE                (byte) leading value = 0xEE
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - number of data bytes(byte) 0 to 32 (size of declared buffers)
+ * - block               (byte) lower 3 bits are logically OR'd with the I2C address
+ * - address             (byte) memory location within block
+ * - data                (n bytes) number of data bytes noted above
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
  * Multiple memory locations can be read or written with single eeprom_msg_rd() or eeprom_msg_wr().  Location address increments for each byte.
  * Read/Write sequences are defined in the 24LC16B datasheet.
@@ -428,14 +435,15 @@
  * Firmware re-attaches the leading 0xFF and trailing bytes before sending the response over the
  * CDC port to the host PC.
  *
- * I2C-EEPROM messages: 0xEE                (byte) leading value = 0xEE
- *                      r/w#                (byte) 0 = write, 1 = read
- *                      number of data bytes(byte) 0 to 32 (size of declared buffers)
- *                      block               (byte) lower 3 bits are logically OR'd with the I2C address
- *                      address             (byte) memory location within block
- *                      data                (n bytes) number of data bytes noted above
- *                      end_mark            (byte) 0x7E
- *                      dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
+ * I2C-EEPROM messages:    
+ * - 0xEE                (byte) leading value = 0xEE
+ * - r/w#                (byte) 0 = write, 1 = read
+ * - number of data bytes(byte) 0 to 32 (size of declared buffers)
+ * - block               (byte) lower 3 bits are logically OR'd with the I2C address
+ * - address             (byte) memory location within block
+ * - data                (n bytes) number of data bytes noted above
+ * - end_mark            (byte) 0x7E
+ * - dummy               (2 bytes) values are don't-care - fillers for RFID CRC bytes
  *
  * Multiple memory locations can be read or written with single eeprom_msg_rd() or eeprom_msg_wr().  Location address increments for each byte.
  * Read/Write sequences are defined in the 24LC16B datasheet.