mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
cleanup on the gc2145 driver
This commit is contained in:
parent
535153e0cb
commit
7ee15b874d
2 changed files with 8 additions and 5 deletions
|
|
@ -180,9 +180,11 @@ impl Gc2145 {
|
||||||
|
|
||||||
self.delay(30);
|
self.delay(30);
|
||||||
|
|
||||||
// divide the clock down
|
// divide the clock down, so that the system can keep up.
|
||||||
self.poke(i2c, 0xFA, 0x32);
|
// self.poke(i2c, 0xFA, 0x32); // this offers a higher frame rate, but a greater bus congestion -
|
||||||
// self.poke(i2c, 0xFA, 0x63);
|
// maybe available on NTO
|
||||||
|
// self.poke(i2c, 0xFA, 0x63); // this is necessary for MPW due to SPI backpressure bug
|
||||||
|
self.poke(i2c, 0xFA, 0x52); // this is necessary for MPW due to SPI backpressure bug
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
|
|
@ -191,11 +193,11 @@ impl Gc2145 {
|
||||||
self.poke(i2c, GC2145_REG_RESET, GC2145_REG_SW_RESET);
|
self.poke(i2c, GC2145_REG_RESET, GC2145_REG_SW_RESET);
|
||||||
self.delay(300); // wait for reset
|
self.delay(300); // wait for reset
|
||||||
|
|
||||||
// do the init pokes
|
// do the init pokes, these settings are from the zephyr-OS reference code
|
||||||
for &[adr, dat] in GC2145_INIT.iter() {
|
for &[adr, dat] in GC2145_INIT.iter() {
|
||||||
self.poke(i2c, adr, dat);
|
self.poke(i2c, adr, dat);
|
||||||
}
|
}
|
||||||
// setup AEC
|
// setup AEC, these settings are yanked out of the Linux kernel
|
||||||
for &[adr, dat] in GC2145_AEC.iter() {
|
for &[adr, dat] in GC2145_AEC.iter() {
|
||||||
self.poke(i2c, adr, dat);
|
self.poke(i2c, adr, dat);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
#![allow(dead_code)]
|
||||||
/*
|
/*
|
||||||
The constant tables below are derived from https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/video/gc2145.c
|
The constant tables below are derived from https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/video/gc2145.c
|
||||||
with the following license:
|
with the following license:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue