firmware  v0.1.2
Chromation Spectrometer Dev-Kit
UsbCmd.h
Go to the documentation of this file.
1 // ---API (Go to the Doxygen documentation of this file)---
19 #ifndef _USBCMD_H
20 #define _USBCMD_H
21 #include "StatusCode.h"
22 #include "ReadWriteBits.h"
23 #include "BiColorLed.h"
24 #include "Usb.h"
25 #include "SpiMaster.h"
26 
27 /* ---------------------------------------- */
28 /* | ---Command helpers (not commands)--- | */
29 /* ---------------------------------------- */
30 inline uint8_t ReadLedState(void) // -> led_state
31 {
40  if (BitIsClear(BiColorLed_ddr, status_led))
41  return OFF;
42  else // LED is on
43  return BitIsClear(BiColorLed_port, status_led)
44  ? GREEN : RED;
45 }
46 
47 /* ------------------ */
48 /* | ---Commands--- | */
49 /* ------------------ */
50 inline void NullCommand(void)
51 {
52 }
53 inline void GetBridgeLED(void)
54 {
62  // loop until led_num received
63  while (UsbRxbufferIsEmpty());
64 
65  // read led_num
66  uint8_t led_num = 0xFF;
67  UsbReadByte(&led_num);
68 
69  if (led_num == 0) // led_num is valid
70  {
71  // write OK and LED STATE
72  UsbWriteByte(OK);
73  UsbWriteByte(ReadLedState());
74  }
75  else // led_num is invalid
76  {
77  // write ERROR and pad second byte
78  UsbWriteByte(ERROR);
79  UsbWriteByte(PADDING);
80  }
81 }
82 inline void SetBridgeLED(void)
83 {
93  // loop until led_num received
94  while (UsbRxbufferIsEmpty());
95 
96  // read led_num
97  uint8_t led_num = 0xFF;
98  UsbReadByte(&led_num);
99 
100  // loop until led_setting received
101  while (UsbRxbufferIsEmpty());
102 
103  // read led_setting
104  uint8_t led_setting = 0xFF;
105  UsbReadByte(&led_setting);
106 
107  if ( (led_num == 0) && led_setting_is_valid(led_setting) ) // parameters are valid
108  {
109  // apply led_setting
110  switch (led_setting)
111  {
112  case 0: BiColorLedOff(status_led); break;
113  case 1: BiColorLedOn(status_led); BiColorLedGreen(status_led); break;
114  case 2: BiColorLedOn(status_led); BiColorLedRed(status_led); break;
115  }
116  // write OK
117  UsbWriteByte(OK);
118  }
119  else // at least one parameter is invalid
120  {
121  UsbWriteByte(ERROR);
122  }
123 }
124 inline void GetSensorLED(void)
125 {
146  uint8_t const cmd = 3; // command is GetSensorLED
147 
148  // loop until led_num received
149  while (UsbRxbufferIsEmpty());
150 
151  // read led_num
152  uint8_t led_num = 0xFF;
153  UsbReadByte(&led_num);
154 
155  // send command to sensor
156  SpiMasterXfrByte(cmd);
157  SpiMasterXfrByte(led_num);
158 
159  // write OK to indicate command sent to sensor
160  UsbWriteByte(OK);
161 
162  // wait for data ready LOW: sensor ready to send STATUS
163  while( BitIsSet(Spi_PortInput, Spi_DataReady));
164  // read status
165  uint8_t status = SpiMasterXfrByte(PADDING);
166  // wait for data ready LOW: sensor ready to send LED_SETTING
167  while( BitIsSet(Spi_PortInput, Spi_DataReady));
168  // read led_setting
169  uint8_t led_setting = SpiMasterXfrByte(PADDING);
170 
171  // write response
172  UsbWriteByte(status);
173  UsbWriteByte(led_setting);
174 }
175 inline void SetSensorLED(void)
176 {
197  uint8_t const cmd = 4; // command is SetSensorLED
198 
199  // loop until led_num received
200  while (UsbRxbufferIsEmpty());
201 
202  // read led_num
203  uint8_t led_num = 0xFF;
204  UsbReadByte(&led_num);
205 
206  // loop until led_setting received
207  while (UsbRxbufferIsEmpty());
208 
209  // read led_setting
210  uint8_t led_setting = 0xFF;
211  UsbReadByte(&led_setting);
212 
213  // send command to sensor
214  SpiMasterXfrByte(cmd);
215  SpiMasterXfrByte(led_num);
216  SpiMasterXfrByte(led_setting);
217 
218  // write OK to indicate command sent to sensor
219  UsbWriteByte(OK);
220 
221  // wait for data ready LOW: sensor ready to send STATUS
222  while( BitIsSet(Spi_PortInput, Spi_DataReady));
223  // read status
224  uint8_t status = SpiMasterXfrByte(PADDING);
225 
226  // write response from sensor
227  UsbWriteByte(status);
228 }
229 inline void GetSensorConfig(void)
230 {
261  uint8_t const cmd = 7; // command is GetSensorConfig
262 
263  // send command to sensor
264  SpiMasterXfrByte(cmd);
265 
266  // write OK to indicate command sent to sensor
267  UsbWriteByte(OK);
268 
269  // wait for data ready LOW: sensor ready to send STATUS
270  while( BitIsSet(Spi_PortInput, Spi_DataReady));
271  // read status
272  uint8_t status = SpiMasterXfrByte(PADDING);
273 
274  // TODO(sustainablelab): Add status check and junk bytes to unit tests and docstring.
275 
276  // Return junk PADDING if vis-spi-out status is ERROR.
277  uint8_t binning = PADDING;
278  uint8_t gain = PADDING;
279  uint8_t row_bitmap = PADDING;
280 
281  // Proceed with getting the LIS config if status is OK.
282  if (status == OK)
283  {
284  // wait for data ready LOW: sensor ready to send BINNING
285  while( BitIsSet(Spi_PortInput, Spi_DataReady));
286  // read binning
287  binning = SpiMasterXfrByte(PADDING);
288 
289  // wait for data ready LOW: sensor ready to send GAIN
290  while( BitIsSet(Spi_PortInput, Spi_DataReady));
291  // read gain
292  gain = SpiMasterXfrByte(PADDING);
293 
294  // wait for data ready LOW: sensor ready to send ROW_BITMAP
295  while( BitIsSet(Spi_PortInput, Spi_DataReady));
296  // read row_bitmap
297  row_bitmap = SpiMasterXfrByte(PADDING);
298 
299  }
300 
301  // write response from sensor
302  UsbWriteByte(status);
303  UsbWriteByte(binning);
304  UsbWriteByte(gain);
305  UsbWriteByte(row_bitmap);
306 }
307 inline void SetSensorConfig(void)
308 {
365  uint8_t const cmd = 8; // command is SetSensorConfig
366 
367  // loop until binning received
368  while (UsbRxbufferIsEmpty());
369 
370  // read binning
371  uint8_t binning = 0xFF;
372  UsbReadByte(&binning);
373 
374  // loop until gain received
375  while (UsbRxbufferIsEmpty());
376 
377  // read gain
378  uint8_t gain = 0xFF;
379  UsbReadByte(&gain);
380 
381  // loop until row_bitmap received
382  while (UsbRxbufferIsEmpty());
383 
384  // read row_bitmap
385  uint8_t row_bitmap = 0xFF;
386  UsbReadByte(&row_bitmap);
387 
388  // send command to sensor
389  SpiMasterXfrByte(cmd);
390 
391  // Check sensor recognizes command before sending args!
392 
393  // wait for data ready LOW: sensor ready to send STATUS
394  while( BitIsSet(Spi_PortInput, Spi_DataReady));
395  // read status
396  uint8_t status = SpiMasterXfrByte(PADDING);
397 
398  // Proceed with sending the LIS config if status is OK.
399  if (status == OK)
400  {
401  SpiMasterXfrByte(binning);
402  SpiMasterXfrByte(gain);
403  SpiMasterXfrByte(row_bitmap);
404 
405  // vis-spi-out responds OK after loading new config.
406  // vis-spi-out responds ERROR if config is invalid.
407 
408  // wait for data ready LOW: sensor ready to send STATUS
409  while( BitIsSet(Spi_PortInput, Spi_DataReady));
410  // read status
411  status = SpiMasterXfrByte(PADDING);
412  }
413 
414  // write OK to indicate command sent to sensor
415  UsbWriteByte(OK);
416 
417  // write response
418  UsbWriteByte(status);
419 
420 }
421 
422 inline void GetExposure(void)
423 {
438  uint8_t const cmd = 9; // command is GetExposure
439 
440  // send command to sensor
441  SpiMasterXfrByte(cmd);
442 
443  // write OK to indicate command sent to sensor
444  UsbWriteByte(OK);
445 
446  // wait for data ready LOW: sensor ready to send STATUS
447  while( BitIsSet(Spi_PortInput, Spi_DataReady));
448  // read status
449  uint8_t status = SpiMasterXfrByte(PADDING);
450 
451  // wait for data ready LOW: sensor ready to send EXPOSURE_MSB
452  while( BitIsSet(Spi_PortInput, Spi_DataReady));
453  // read exposure_msb
454  uint8_t exposure_msb = SpiMasterXfrByte(PADDING);
455 
456  // wait for data ready LOW: sensor ready to send EXPOSURE_LSB
457  while( BitIsSet(Spi_PortInput, Spi_DataReady));
458  // read exposure_lsb
459  uint8_t exposure_lsb = SpiMasterXfrByte(PADDING);
460 
461  // write response from sensor
462  UsbWriteByte(status);
463  UsbWriteByte(exposure_msb);
464  UsbWriteByte(exposure_lsb);
465 }
466 inline void SetExposure(void)
467 {
482  uint8_t const cmd = 10; // command is SetExposure
483 
484  // loop until exposure_MSB received
485  while (UsbRxbufferIsEmpty());
486 
487  // read exposure_MSB
488  uint8_t exposure_MSB = 0xFF;
489  UsbReadByte(&exposure_MSB);
490 
491  // loop until exposure_LSB received
492  while (UsbRxbufferIsEmpty());
493 
494  // read exposure_LSB
495  uint8_t exposure_LSB = 0xFF;
496  UsbReadByte(&exposure_LSB);
497 
498  // send command to sensor
499  SpiMasterXfrByte(cmd);
500  SpiMasterXfrByte(exposure_MSB);
501  SpiMasterXfrByte(exposure_LSB);
502 
503  // write OK to indicate command sent to sensor
504  UsbWriteByte(OK);
505 
506  // wait for data ready LOW: sensor ready to send STATUS
507  while( BitIsSet(Spi_PortInput, Spi_DataReady));
508  // read status
509  uint8_t status = SpiMasterXfrByte(PADDING);
510 
511  // write response
512  UsbWriteByte(status);
513 }
514 inline void CaptureFrame(void)
515 {
534  uint8_t const cmd = 11; // command is CaptureFrame
535 
536  // send command to sensor
537  SpiMasterXfrByte(cmd);
538 
539  // write OK to indicate command sent to sensor
540  UsbWriteByte(OK);
541 
542  // wait for data ready LOW: sensor ready to send STATUS
543  while( BitIsSet(Spi_PortInput, Spi_DataReady));
544  // read status
545  uint8_t status = SpiMasterXfrByte(PADDING);
546 
547  // wait for data ready LOW: sensor ready to send num_pixels_MSB
548  while( BitIsSet(Spi_PortInput, Spi_DataReady));
549  // read num_pixels_MSB
550  uint8_t num_pixels_MSB = SpiMasterXfrByte(PADDING);
551 
552  // wait for data ready LOW: sensor ready to send num_pixels_LSB
553  while( BitIsSet(Spi_PortInput, Spi_DataReady));
554  // read num_pixels_LSB
555  uint8_t num_pixels_LSB = SpiMasterXfrByte(PADDING);
556 
557  // write first three bytes of response from sensor
558  UsbWriteByte(status);
559  UsbWriteByte(num_pixels_MSB);
560  UsbWriteByte(num_pixels_LSB);
561 
562  if (status == OK)
563  {
564  /* ------------------ */
565  /* | READ THE FRAME | */
566  /* ------------------ */
567 
568  uint16_t num_pixels = (num_pixels_MSB << 8) | num_pixels_LSB;
569  uint16_t nbytes = 2*num_pixels;
570  uint16_t nbytes_read = 0;
571  while(nbytes_read++ < nbytes)
572  {
573  // wait for data ready LOW: sensor ready to send next byte
574  while( BitIsSet(Spi_PortInput, Spi_DataReady));
575  // read next byte of frame data and write to USB host
576  UsbWriteByte( SpiMasterXfrByte(PADDING) );
577  }
578  }
579 
580 }
581 inline void AutoExposure(void)
582 {
583  uint8_t const cmd = 12; // command is GetAutoExposeConfig
584 
585  /* // indicate BUSY */
586  /* BiColorLedRed(status_led); */
587 
588  // send command to sensor
589  SpiMasterXfrByte(cmd);
590 
591  // write OK to indicate command sent to sensor
592  UsbWriteByte(OK);
593 
594  // wait for data ready LOW: sensor ready to send STATUS
595  while( BitIsSet(Spi_PortInput, Spi_DataReady));
596  // read status
597  uint8_t status = SpiMasterXfrByte(PADDING);
598 
599  // wait for data ready LOW: sensor ready to send success
600  while( BitIsSet(Spi_PortInput, Spi_DataReady));
601  // read success true/false
602  uint8_t success = SpiMasterXfrByte(PADDING);
603 
604  // wait for data ready LOW: sensor ready to send iterations
605  while( BitIsSet(Spi_PortInput, Spi_DataReady));
606  // read number of iterations to hit AutoExpose target
607  uint8_t iterations = SpiMasterXfrByte(PADDING);
608 
609  // write response from sensor
610  UsbWriteByte(status);
611  UsbWriteByte(success);
612  UsbWriteByte(iterations);
613 
614  /* // indicate DONE */
615  /* BiColorLedGreen(status_led); */
616 }
617 inline void GetAutoExposeConfig(void)
618 {
619  uint8_t const cmd = 13; // command is GetAutoExposeConfig
620 
621  // send command to sensor
622  SpiMasterXfrByte(cmd);
623 
624  // write OK to indicate command sent to sensor
625  UsbWriteByte(OK);
626 
627  // wait for data ready LOW: sensor ready to send STATUS
628  while( BitIsSet(Spi_PortInput, Spi_DataReady));
629  // read status
630  uint8_t status = SpiMasterXfrByte(PADDING);
631 
632  // wait for data ready LOW: sensor ready to send MAX_TRIES
633  while( BitIsSet(Spi_PortInput, Spi_DataReady));
634  // read max_tries
636 
637  // wait for data ready LOW: sensor ready to send START_PIXEL_MSB
638  while( BitIsSet(Spi_PortInput, Spi_DataReady));
639  // read start_pixel_msb
640  uint8_t start_pixel_msb = SpiMasterXfrByte(PADDING);
641 
642  // wait for data ready LOW: sensor ready to send START_PIXEL_LSB
643  while( BitIsSet(Spi_PortInput, Spi_DataReady));
644  // read start_pixel_lsb
645  uint8_t start_pixel_lsb = SpiMasterXfrByte(PADDING);
646 
647  // wait for data ready LOW: sensor ready to send STOP_PIXEL_MSB
648  while( BitIsSet(Spi_PortInput, Spi_DataReady));
649  // read stop_pixel_msb
650  uint8_t stop_pixel_msb = SpiMasterXfrByte(PADDING);
651 
652  // wait for data ready LOW: sensor ready to send STOP_PIXEL_LSB
653  while( BitIsSet(Spi_PortInput, Spi_DataReady));
654  // read stop_pixel_lsb
655  uint8_t stop_pixel_lsb = SpiMasterXfrByte(PADDING);
656 
657  // wait for data ready LOW: sensor ready to send TARGET_MSB
658  while( BitIsSet(Spi_PortInput, Spi_DataReady));
659  // read target_msb
660  uint8_t target_msb = SpiMasterXfrByte(PADDING);
661 
662  // wait for data ready LOW: sensor ready to send TARGET_LSB
663  while( BitIsSet(Spi_PortInput, Spi_DataReady));
664  // read target_lsb
665  uint8_t target_lsb = SpiMasterXfrByte(PADDING);
666 
667  // wait for data ready LOW: sensor ready to send target_tolerance_MSB
668  while( BitIsSet(Spi_PortInput, Spi_DataReady));
669  // read target_tolerance_msb
670  uint8_t target_tolerance_msb = SpiMasterXfrByte(PADDING);
671 
672  // wait for data ready LOW: sensor ready to send target_tolerance_LSB
673  while( BitIsSet(Spi_PortInput, Spi_DataReady));
674  // read target_tolerance_lsb
675  uint8_t target_tolerance_lsb = SpiMasterXfrByte(PADDING);
676 
677  // wait for data ready LOW: sensor ready to send max_exposure_MSB
678  while( BitIsSet(Spi_PortInput, Spi_DataReady));
679  // read max_exposure_msb
680  uint8_t max_exposure_msb = SpiMasterXfrByte(PADDING);
681 
682  // wait for data ready LOW: sensor ready to send max_exposure_LSB
683  while( BitIsSet(Spi_PortInput, Spi_DataReady));
684  // read max_exposure_lsb
685  uint8_t max_exposure_lsb = SpiMasterXfrByte(PADDING);
686 
687  // write response from sensor
688  UsbWriteByte(status);
689  // default: 10 = 0x0a
690  UsbWriteByte(max_tries);
691  // default: 7 = 0x0007
692  UsbWriteByte(start_pixel_msb); // 0
693  UsbWriteByte(start_pixel_lsb); // 7
694  // default: 392 = 0x0188
695  UsbWriteByte(stop_pixel_msb); // 0x01 -- 1 (*256)
696  UsbWriteByte(stop_pixel_lsb); // 0x88 -- 136
697  // default: 46420 = 0xb554
698  UsbWriteByte(target_msb); // 0xb5 -- 181 (*256)
699  UsbWriteByte(target_lsb); // 0x54 -- 84
700  // default: 3277 = 0x0ccd
701  UsbWriteByte(target_tolerance_msb); // 0x0c -- 12 (*256)
702  UsbWriteByte(target_tolerance_lsb); // 0xcd -- 205
703  // default: 65535 = 0xFFFF
704  UsbWriteByte(max_exposure_msb); // 0x0c -- 12 (*256)
705  UsbWriteByte(max_exposure_lsb); // 0xcd -- 205
706 }
707 inline void SetAutoExposeConfig(void)
708 {
709 
710  /* // indicate BUSY */
711  /* BiColorLedRed(status_led); */
712  uint8_t const cmd = 14; // command is SetAutoExposeConfig
713 
714  // loop until max_tries is received
715  while (UsbRxbufferIsEmpty());
716  // read max_tries
717  uint8_t max_tries = 0xFF;
719 
720  // loop until start_pixel_msb is received
721  while (UsbRxbufferIsEmpty());
722  // read start_pixel_msb
723  uint8_t start_pixel_msb = 0xFF;
724  UsbReadByte(&start_pixel_msb);
725 
726  // loop until start_pixel_lsb is received
727  while (UsbRxbufferIsEmpty());
728  // read start_pixel_lsb
729  uint8_t start_pixel_lsb = 0xFF;
730  UsbReadByte(&start_pixel_lsb);
731 
732  // loop until stop_pixel_msb is received
733  while (UsbRxbufferIsEmpty());
734  // read stop_pixel_msb
735  uint8_t stop_pixel_msb = 0xFF;
736  UsbReadByte(&stop_pixel_msb);
737 
738  // loop until stop_pixel_lsb is received
739  while (UsbRxbufferIsEmpty());
740  // read stop_pixel_lsb
741  uint8_t stop_pixel_lsb = 0xFF;
742  UsbReadByte(&stop_pixel_lsb);
743 
744  // loop until target_msb is received
745  while (UsbRxbufferIsEmpty());
746  // read target_msb
747  uint8_t target_msb = 0xFF;
748  UsbReadByte(&target_msb);
749 
750  // loop until target_lsb is received
751  while (UsbRxbufferIsEmpty());
752  // read target_lsb
753  uint8_t target_lsb = 0xFF;
754  UsbReadByte(&target_lsb);
755 
756  // loop until target_tolerance_msb is received
757  while (UsbRxbufferIsEmpty());
758  // read target_tolerance_msb
759  uint8_t target_tolerance_msb = 0xFF;
760  UsbReadByte(&target_tolerance_msb);
761 
762  // loop until target_tolerance_lsb is received
763  while (UsbRxbufferIsEmpty());
764  // read target_tolerance_lsb
765  uint8_t target_tolerance_lsb = 0xFF;
766  UsbReadByte(&target_tolerance_lsb);
767 
768  // loop until max_exposure_msb is received
769  while (UsbRxbufferIsEmpty());
770  // read max_exposure_msb
771  uint8_t max_exposure_msb = 0xFF;
772  UsbReadByte(&max_exposure_msb);
773 
774  // loop until max_exposure_lsb is received
775  while (UsbRxbufferIsEmpty());
776  // read max_exposure_lsb
777  uint8_t max_exposure_lsb = 0xFF;
778  UsbReadByte(&max_exposure_lsb);
779 
780  // send command to sensor
781  SpiMasterXfrByte(cmd);
783  SpiMasterXfrByte(start_pixel_msb);
784  SpiMasterXfrByte(start_pixel_lsb);
785  SpiMasterXfrByte(stop_pixel_msb);
786  SpiMasterXfrByte(stop_pixel_lsb);
787  SpiMasterXfrByte(target_msb);
788  SpiMasterXfrByte(target_lsb);
789  SpiMasterXfrByte(target_tolerance_msb);
790  SpiMasterXfrByte(target_tolerance_lsb);
791  SpiMasterXfrByte(max_exposure_msb);
792  SpiMasterXfrByte(max_exposure_lsb);
793 
794  // write OK to indicate command sent to sensor
795  UsbWriteByte(OK);
796 
797  // wait for data ready LOW: sensor ready to send STATUS
798  while( BitIsSet(Spi_PortInput, Spi_DataReady));
799  // read status
800  uint8_t status = SpiMasterXfrByte(PADDING);
801 
802  // write response
803  UsbWriteByte(status);
804 
805  /* // indicate DONE */
806  /* BiColorLedGreen(status_led); */
807 }
808 
809 // TODO(slab): unit test
810 inline void GetSensorHash(void)
811 {
812  uint8_t const cmd = 15; // command is GetSensorHash
813 
814  // send command to sensor
815  SpiMasterXfrByte(cmd);
816 
817  // write OK to indicate command sent to sensor
818  UsbWriteByte(OK);
819 
820  // wait for data ready LOW: sensor ready to send STATUS
821  while( BitIsSet(Spi_PortInput, Spi_DataReady));
822  // read status
823  uint8_t status = SpiMasterXfrByte(PADDING);
824 
825  // Return junk PADDING if vis-spi-out status is ERROR.
826  uint8_t first_byte = PADDING;
827  uint8_t second_byte = PADDING;
828  uint8_t third_byte = PADDING;
829 
830  // Proceed with getting the hash if status is OK.
831  if (status == OK)
832  {
833  // wait for data ready LOW: sensor ready to send byte
834  while( BitIsSet(Spi_PortInput, Spi_DataReady));
835  // read byte
836  first_byte = SpiMasterXfrByte(PADDING);
837 
838  // wait for data ready LOW: sensor ready to send byte
839  while( BitIsSet(Spi_PortInput, Spi_DataReady));
840  // read byte
841  second_byte = SpiMasterXfrByte(PADDING);
842 
843  // wait for data ready LOW: sensor ready to send byte
844  while( BitIsSet(Spi_PortInput, Spi_DataReady));
845  // read byte
846  third_byte = SpiMasterXfrByte(PADDING);
847  }
848 
849  // write response from sensor
850  UsbWriteByte(status);
851  UsbWriteByte(first_byte);
852  UsbWriteByte(second_byte);
853  UsbWriteByte(third_byte);
854 }
855 
856 #endif // _USBCMD_H
uint8_t max_tries
maximum number of tries before AutoExpose() gives up
Definition: AutoExpose.c:5
void BiColorLedOff(bicolorled_num led)
Definition: BiColorLed.h:28
void BiColorLedGreen(bicolorled_num led)
Definition: BiColorLed.h:35
void BiColorLedRed(bicolorled_num led)
Definition: BiColorLed.h:42
void BiColorLedOn(bicolorled_num led)
Definition: BiColorLed.h:21
uint8_t SpiMasterXfrByte(uint8_t byte)
Definition: SpiMaster.h:21
spi_reg Spi_PortInput
Atmel PIN.
See cfg/microspec.json in the Python API repository.
bool led_setting_is_valid(led_state setting)
Definition: StatusCode.h:53
uint8_t PADDING
When status_code is ERROR, pad responses to send expected number of bytes.
Definition: StatusCodes.h:21
void CaptureFrame(void)
Definition: UsbCmd.h:514
void GetSensorConfig(void)
Definition: UsbCmd.h:229
void GetBridgeLED(void)
Definition: UsbCmd.h:53
void GetSensorLED(void)
Definition: UsbCmd.h:124
void SetExposure(void)
Definition: UsbCmd.h:466
void SetBridgeLED(void)
Definition: UsbCmd.h:82
void SetSensorLED(void)
Definition: UsbCmd.h:175
uint8_t ReadLedState(void)
Definition: UsbCmd.h:30
void NullCommand(void)
Definition: UsbCmd.h:50
void SetSensorConfig(void)
Definition: UsbCmd.h:307
void GetExposure(void)
Definition: UsbCmd.h:422
usb-bridge communicates over USB via FTDI USB Bridge IC FT221X
bool UsbRxbufferIsEmpty(void)
Definition: Usb.h:237
uint8_t UsbReadByte(uint8_t *pbyte)
Definition: Usb.h:262