aiie/teensy/teensy-display.h

56 lines
1.4 KiB
C
Raw Normal View History

2017-02-20 18:55:16 +00:00
#ifndef __TEENSY_DISPLAY_H
#define __TEENSY_DISPLAY_H
#include <Arduino.h>
2022-01-18 12:42:57 +00:00
#include <SPI.h>
2022-01-26 18:49:28 +00:00
#include "basedisplay.h"
2020-07-06 20:46:14 +00:00
#include "physicaldisplay.h"
2017-02-20 18:55:16 +00:00
class BIOS;
class TeensyDisplay : public PhysicalDisplay {
friend class BIOS;
public:
TeensyDisplay();
virtual ~TeensyDisplay();
virtual void blit();
2022-01-31 01:26:12 +00:00
virtual void flush() { };
2017-02-20 18:55:16 +00:00
virtual void clrScr(uint8_t coloridx);
2017-02-20 18:55:16 +00:00
2022-01-26 18:49:28 +00:00
virtual void drawUIImage(uint8_t imageIdx);
2022-02-02 13:14:58 +00:00
virtual void drawDriveActivity(bool drive0, bool drive1);
virtual void drawImageOfSizeAt(const uint8_t *img, uint16_t sizex, uint16_t sizey, uint16_t wherex, uint16_t wherey);
2017-02-20 18:55:16 +00:00
virtual void cacheDoubleWidePixel(uint16_t x, uint16_t y, uint8_t color);
virtual void cachePixel(uint16_t x, uint16_t y, uint8_t color);
uint32_t frameCount();
2017-02-20 18:55:16 +00:00
private:
2018-01-07 19:43:17 +00:00
virtual void drawPixel(uint16_t x, uint16_t y, uint16_t color);
virtual void drawPixel(uint16_t x, uint16_t y, uint8_t r, uint8_t g, uint8_t b);
2017-02-20 18:55:16 +00:00
bool driveIndicator[2];
2022-01-26 18:49:28 +00:00
private:
const uint8_t *shellImage;
const uint16_t shellWidth, shellHeight;
const uint8_t *d1OpenImage;
const uint16_t driveWidth, driveHeight; // assume all the latches are the same width/height no matter what position
const uint8_t *d1ClosedImage;
const uint8_t *d2OpenImage;
const uint8_t *d2ClosedImage;
const uint8_t *appleImage;
const uint16_t appleImageWidth, appleImageHeight;
2022-01-31 01:26:12 +00:00
2022-02-02 13:14:58 +00:00
bool use8875;
2022-01-31 01:26:12 +00:00
BaseDisplay *tft;
2017-02-20 18:55:16 +00:00
};
#endif