Added a GPIO to power on/off for external I2C sensor(s) (with LEDs)
Dependencies: UniGraphic mbed vt100
18-Jun-2018 外部センサの電源オン・オフ機能は下位互換の為に無効になっていました。 この版で再度有効にしました。
af_utils/mbedSPI.h@0:846e2321c637, 2018-04-13 (annotated)
- Committer:
- Rhyme
- Date:
- Fri Apr 13 04:19:23 2018 +0000
- Revision:
- 0:846e2321c637
power to color sensor on/off test OK. Currently the function is disabled.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rhyme | 0:846e2321c637 | 1 | #ifndef _MBEDSPI_H_ |
Rhyme | 0:846e2321c637 | 2 | #define _MBEDSPI_H_ |
Rhyme | 0:846e2321c637 | 3 | #include "mbed.h" |
Rhyme | 0:846e2321c637 | 4 | #include "afSPI.h" |
Rhyme | 0:846e2321c637 | 5 | |
Rhyme | 0:846e2321c637 | 6 | class mbedSPI : public afSPI { |
Rhyme | 0:846e2321c637 | 7 | public: |
Rhyme | 0:846e2321c637 | 8 | mbedSPI(PinName mosi, PinName miso, PinName sckl, PinName cs) ; |
Rhyme | 0:846e2321c637 | 9 | virtual void begin() ; |
Rhyme | 0:846e2321c637 | 10 | virtual void beginSPI() ; |
Rhyme | 0:846e2321c637 | 11 | virtual void endSPI() ; |
Rhyme | 0:846e2321c637 | 12 | virtual void transfer(char *bytes,int len) ; |
Rhyme | 0:846e2321c637 | 13 | private: |
Rhyme | 0:846e2321c637 | 14 | SPI _spi ; |
Rhyme | 0:846e2321c637 | 15 | DigitalOut _cs ; |
Rhyme | 0:846e2321c637 | 16 | } ; |
Rhyme | 0:846e2321c637 | 17 | |
Rhyme | 0:846e2321c637 | 18 | |
Rhyme | 0:846e2321c637 | 19 | #endif /* _MBEDSPI_H_ */ |