@@ -44,7 +44,7 @@ namespace pimoroni {
4444 };
4545
4646 bool Inky73::is_busy () {
47- return !(sr. read () & 128 );
47+ return !gpio_get (BUSY );
4848 }
4949
5050 void Inky73::busy_wait (uint timeout_ms) {
@@ -75,6 +75,10 @@ namespace pimoroni {
7575 gpio_set_dir (RESET, GPIO_OUT);
7676 gpio_put (RESET, 1 );
7777
78+ gpio_set_function (BUSY, GPIO_FUNC_SIO);
79+ gpio_set_dir (BUSY, GPIO_IN);
80+ gpio_set_pulls (BUSY, true , false );
81+
7882 gpio_set_function (SCK, GPIO_FUNC_SPI);
7983 gpio_set_function (MOSI, GPIO_FUNC_SPI);
8084 };
@@ -164,6 +168,12 @@ namespace pimoroni {
164168 gpio_put (CS, 0 );
165169 spi_write_blocking (spi, (const uint8_t *)graphics->frame_buffer , graphics->bounds .w * graphics->bounds .h / 2 );
166170 gpio_put (CS, 1 );
171+ } else if (graphics->pen_type == PicoGraphics::PEN_3BIT) {
172+ graphics->frame_convert (PicoGraphics::PEN_P4, [this ](void *buf, size_t length) {
173+ if (length > 0 ) {
174+ spi_write_blocking (spi, (const uint8_t *)buf, length);
175+ }
176+ });
167177 } else {
168178 graphics->frame_convert (PicoGraphics::PEN_INKY7, [this , &totalLength](void *buf, size_t length) {
169179 if (length > 0 ) {
@@ -175,7 +185,7 @@ namespace pimoroni {
175185 });
176186 }
177187
178- gpio_put (DC, 0 ); // data mode
188+ gpio_put (DC, 0 ); // command mode
179189
180190 gpio_put (CS, 1 );
181191
@@ -194,7 +204,8 @@ namespace pimoroni {
194204 }
195205
196206 bool Inky73::is_pressed (Button button) {
197- return sr.read () & button;
207+ // return sr.read() & button;
208+ return false ;
198209 }
199210
200211}
0 commit comments