Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DemoPixelSource.h@5:fa9eb887e9a6, 2018-10-17 (annotated)
- Committer:
- HarryChen
- Date:
- Wed Oct 17 14:05:23 2018 +0000
- Revision:
- 5:fa9eb887e9a6
- Parent:
- 4:a038b8b2ee11
Update
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
HarryChen | 1:6ae4383194a1 | 1 | #ifndef DEMOPIXELSOURCE_H |
HarryChen | 1:6ae4383194a1 | 2 | #define DEMOPIXELSOURCE_H |
HarryChen | 1:6ae4383194a1 | 3 | |
HarryChen | 1:6ae4383194a1 | 4 | #include "PixelSource.h" |
HarryChen | 1:6ae4383194a1 | 5 | |
HarryChen | 1:6ae4383194a1 | 6 | namespace GDE { |
HarryChen | 1:6ae4383194a1 | 7 | |
HarryChen | 1:6ae4383194a1 | 8 | class DemoPixelSource: public PixelSource { |
HarryChen | 5:fa9eb887e9a6 | 9 | |
zhangyx | 4:a038b8b2ee11 | 10 | unsigned char inverted; |
HarryChen | 5:fa9eb887e9a6 | 11 | |
HarryChen | 1:6ae4383194a1 | 12 | public: |
HarryChen | 5:fa9eb887e9a6 | 13 | |
HarryChen | 1:6ae4383194a1 | 14 | virtual unsigned char nextPixelGroup() { |
zhangyx | 4:a038b8b2ee11 | 15 | return (count++ & 1) ? ~inverted : inverted; |
HarryChen | 1:6ae4383194a1 | 16 | } |
HarryChen | 5:fa9eb887e9a6 | 17 | void setColor(bool _inverted) { |
HarryChen | 5:fa9eb887e9a6 | 18 | inverted = _inverted ? 0xff : 0x00; |
HarryChen | 5:fa9eb887e9a6 | 19 | } |
HarryChen | 1:6ae4383194a1 | 20 | }; |
HarryChen | 1:6ae4383194a1 | 21 | |
HarryChen | 1:6ae4383194a1 | 22 | } |
HarryChen | 1:6ae4383194a1 | 23 | |
HarryChen | 1:6ae4383194a1 | 24 | #endif |