Color sensor reset at the end of calibration added. sensor id auto assignment was changed to be a fixed value assignment to avoid sensor id shift when some sensor is absent.

Dependencies:   UniGraphic mbed vt100

Committer:
Rhyme
Date:
Fri Feb 23 07:51:55 2018 +0000
Revision:
1:8818b793d147
Parent:
0:ce97f6d34336
Wrong behavior when one of color sensor is missing has been fixed.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:ce97f6d34336 1 #ifndef _MBEDSPI_H_
Rhyme 0:ce97f6d34336 2 #define _MBEDSPI_H_
Rhyme 0:ce97f6d34336 3 #include "mbed.h"
Rhyme 0:ce97f6d34336 4 #include "afSPI.h"
Rhyme 0:ce97f6d34336 5
Rhyme 0:ce97f6d34336 6 class mbedSPI : public afSPI {
Rhyme 0:ce97f6d34336 7 public:
Rhyme 0:ce97f6d34336 8 mbedSPI(PinName mosi, PinName miso, PinName sckl, PinName cs) ;
Rhyme 0:ce97f6d34336 9 virtual void begin() ;
Rhyme 0:ce97f6d34336 10 virtual void beginSPI() ;
Rhyme 0:ce97f6d34336 11 virtual void endSPI() ;
Rhyme 0:ce97f6d34336 12 virtual void transfer(char *bytes,int len) ;
Rhyme 0:ce97f6d34336 13 private:
Rhyme 0:ce97f6d34336 14 SPI _spi ;
Rhyme 0:ce97f6d34336 15 DigitalOut _cs ;
Rhyme 0:ce97f6d34336 16 } ;
Rhyme 0:ce97f6d34336 17
Rhyme 0:ce97f6d34336 18
Rhyme 0:ce97f6d34336 19 #endif /* _MBEDSPI_H_ */