Skip to content

Instantly share code, notes, and snippets.

@tobozo
Created May 19, 2018 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobozo/b4568e806a5e9ce636def6d6967068a9 to your computer and use it in GitHub Desktop.
Save tobozo/b4568e806a5e9ce636def6d6967068a9 to your computer and use it in GitHub Desktop.
POC for endianness on M5Stack 0.1.9, see https://twitter.com/Tw_Mhage/status/997729726499180545
#include <M5Stack.h>
const uint16_t color = TFT_BLUE;
uint16_t bitmap[100][100];
void setup() {
M5.begin();
M5.Lcd.fillRect(30, 70, 100, 100, color);
for(int i=0; i<100; i++) for(int j=0; j<100; j++) bitmap[i][j]=color;
M5.Lcd.drawBitmap(160, 70, 100, 100, (uint16_t *)bitmap);
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment