This commit is contained in:
Mr.Blinky 2020-04-25 17:53:00 +02:00 committed by GitHub
parent 65193c1e07
commit 4c699c5fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -610,8 +610,8 @@ void Arduboy2Core::paintScreen(uint8_t image[], bool clear)
//bitbanging I2C ~2Mbps (8 cycles per bit / 78 cycles per byte)
asm volatile (
" dec %[clear] \n" // get clear mask 0:0xFF, 1:0x00
"1: \n"
" ld r24, %a[ptr] \n" // fetch display byte from buffer
"1: \n"
" mov r0, r24 \n" // move to shift register
" and r24, %[clear] \n" // apply clear mask
" st %a[ptr]+, r24 \n" // update buffer
@ -630,7 +630,7 @@ void Arduboy2Core::paintScreen(uint8_t image[], bool clear)
" \n"
" out %[port], %[sda0] \n" // clear SDA for ACK
" subi %A[len], 1 \n" // len-- part1 (moved here for 1 cycle delay)
"nop\n"
" ld r24, %a[ptr] \n" // fetch display byte from buffer (and delay)
" out %[pin], %[scl] \n" // set SCL (2 cycles required)
" sbci %B[len], 0 \n" // len-- part2 (moved here for 1 cycle delay)
" out %[pin], %[scl] \n" // clear SCL (2 cycles required)