Harry Chen / EPD_GDEW075T8

Dependents:   EInkTest

DemoPixelSource.h

Committer:
HarryChen
Date:
2018-10-17
Revision:
5:fa9eb887e9a6
Parent:
4:a038b8b2ee11

File content as of revision 5:fa9eb887e9a6:

#ifndef DEMOPIXELSOURCE_H
#define DEMOPIXELSOURCE_H

#include "PixelSource.h"

namespace GDE {

    class DemoPixelSource: public PixelSource {
        
        unsigned char inverted;
        
    public: 
    
        virtual unsigned char nextPixelGroup() {
            return (count++ & 1) ? ~inverted : inverted;
        }
        void setColor(bool _inverted) {
            inverted = _inverted ? 0xff : 0x00;
        }
    };

}

#endif