Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // This is all happening within an Object and scanLine is a method
  2. uint8_t scanwidth = 64;
  3. uint8_t sections = 32;
  4. NUMBYTES = scanwidth * sections * 4;
  5. matrixbuff = (uint32_t *)malloc(NUMBYTES);
  6. memset(matrixbuff, 255, NUMBYTES); // I set it to all white, just to make sure...
  7.  
  8. void scanLine() {
  9. uint32_t *matrixptr;
  10. uint8_t i, j;
  11. matrixbuff[0] = 0xFFFFFFFF; // I only use the first entry for testing purpose, enough for every 5th column
  12.  
  13. for (j=0; j<31; j++){
  14. for ( i=0; i<scanwidth/5; i++) {
  15. matrixbuff[0] = 0xFFFFFFFF; // When I comment this line out, the screen flickers!
  16. matrixptr = matrixbuff;
  17. data = *matrixptr++; // Again, I only use matrixbuff[0] for testing purpose
  18. /*
  19. ...
  20. ...
  21. */
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement