8x8ドットマトリクスLED用のドライバ
LedMatrix8x8Driver.h@0:326fc1762064, 2015-12-23 (annotated)
- Committer:
- mbed_Cookbook_SE
- Date:
- Wed Dec 23 15:57:27 2015 +0000
- Revision:
- 0:326fc1762064
??????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_Cookbook_SE | 0:326fc1762064 | 1 | /** |
mbed_Cookbook_SE | 0:326fc1762064 | 2 | * Matrix8x8 LED library |
mbed_Cookbook_SE | 0:326fc1762064 | 3 | * |
mbed_Cookbook_SE | 0:326fc1762064 | 4 | * @author Junichi Katsu |
mbed_Cookbook_SE | 0:326fc1762064 | 5 | * @version 1.0 |
mbed_Cookbook_SE | 0:326fc1762064 | 6 | * @date 15-April-2015 |
mbed_Cookbook_SE | 0:326fc1762064 | 7 | * |
mbed_Cookbook_SE | 0:326fc1762064 | 8 | */ |
mbed_Cookbook_SE | 0:326fc1762064 | 9 | |
mbed_Cookbook_SE | 0:326fc1762064 | 10 | #ifndef MBED_LED_MATRIX8X8_DRIVER_H |
mbed_Cookbook_SE | 0:326fc1762064 | 11 | #define MBED_LED_MATRIX8X8_DRIVER_H |
mbed_Cookbook_SE | 0:326fc1762064 | 12 | |
mbed_Cookbook_SE | 0:326fc1762064 | 13 | #include "mbed.h" |
mbed_Cookbook_SE | 0:326fc1762064 | 14 | #include "Adafruit_GFX.h" |
mbed_Cookbook_SE | 0:326fc1762064 | 15 | |
mbed_Cookbook_SE | 0:326fc1762064 | 16 | /** LedMatrix8x8Driver class |
mbed_Cookbook_SE | 0:326fc1762064 | 17 | * @endcode |
mbed_Cookbook_SE | 0:326fc1762064 | 18 | */ |
mbed_Cookbook_SE | 0:326fc1762064 | 19 | |
mbed_Cookbook_SE | 0:326fc1762064 | 20 | class LedMatrix8x8Driver : public Adafruit_GFX |
mbed_Cookbook_SE | 0:326fc1762064 | 21 | { |
mbed_Cookbook_SE | 0:326fc1762064 | 22 | public: |
mbed_Cookbook_SE | 0:326fc1762064 | 23 | /** Create a LedMatrix8x8Driver instance |
mbed_Cookbook_SE | 0:326fc1762064 | 24 | * |
mbed_Cookbook_SE | 0:326fc1762064 | 25 | * @param Matrix column |
mbed_Cookbook_SE | 0:326fc1762064 | 26 | * @param Matrix row |
mbed_Cookbook_SE | 0:326fc1762064 | 27 | */ |
mbed_Cookbook_SE | 0:326fc1762064 | 28 | LedMatrix8x8Driver(BusOut* Col,BusOut* Row); |
mbed_Cookbook_SE | 0:326fc1762064 | 29 | |
mbed_Cookbook_SE | 0:326fc1762064 | 30 | virtual void drawPixel(int16_t x, int16_t y, uint16_t color); |
mbed_Cookbook_SE | 0:326fc1762064 | 31 | void flip(); |
mbed_Cookbook_SE | 0:326fc1762064 | 32 | |
mbed_Cookbook_SE | 0:326fc1762064 | 33 | private: |
mbed_Cookbook_SE | 0:326fc1762064 | 34 | BusOut* _Col; |
mbed_Cookbook_SE | 0:326fc1762064 | 35 | BusOut* _Row; |
mbed_Cookbook_SE | 0:326fc1762064 | 36 | Ticker flipper; |
mbed_Cookbook_SE | 0:326fc1762064 | 37 | uint8_t displaybuffer[8]; |
mbed_Cookbook_SE | 0:326fc1762064 | 38 | }; |
mbed_Cookbook_SE | 0:326fc1762064 | 39 | |
mbed_Cookbook_SE | 0:326fc1762064 | 40 | #endif // MBED_LED_MATRIX8X8_DRIVER_H |