Skip to content

Commit

Permalink
grayscale
Browse files Browse the repository at this point in the history
  • Loading branch information
vk2seb committed Apr 3, 2024
1 parent 80acbf4 commit 1180766
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/litex
Submodule litex updated from 7af1e5 to 45db71
14 changes: 14 additions & 0 deletions firmware/litex-fw/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ unsafe fn irq_handler() {
let ix = ((ch0raw as i32 * (FB_SIZE_X) as i32) >> 16) as usize;
let iy = ((ch1raw as i32 * (FB_SIZE_Y) as i32) >> 16) as usize;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)) + (ix+FB_SIZE_X/2-FB_XOFFS))] = 0xFF;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2+1)) + (ix+FB_SIZE_X/2-FB_XOFFS))] = 0xFF;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2-1)) + (ix+FB_SIZE_X/2-FB_XOFFS))] = 0xFF;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)) + (ix+FB_SIZE_X/2-FB_XOFFS+1))] = 0xFF;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)) + (ix+FB_SIZE_X/2-FB_XOFFS-1))] = 0xFF;

/*
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)+1) + (ix+FB_SIZE_X/2-FB_XOFFS+1))] = 0x7F;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)+1) + (ix+FB_SIZE_X/2-FB_XOFFS-1))] = 0x7F;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)-1) + (ix+FB_SIZE_X/2-FB_XOFFS+1))] = 0x7F;
FB[((FB_SIZE_Y*(iy+FB_SIZE_Y/2)-1) + (ix+FB_SIZE_X/2-FB_XOFFS-1))] = 0x7F;
*/
}

peripherals.EURORACK_PMOD0.ev_pending().write(|w| w.bits(pending_subtype));
Expand Down Expand Up @@ -163,11 +174,14 @@ fn main() -> ! {
*/

for p in 0..(FB_SIZE_X*FB_SIZE_Y) {
/*
if FB[p] > 32 {
FB[p] -= 32;
} else {
FB[p] = 0;
}
*/
FB[p] >>= 1;
}
}

Expand Down

0 comments on commit 1180766

Please sign in to comment.