diff --git a/firmware/common/portapack_io.hpp b/firmware/common/portapack_io.hpp index c84a3b2f..2c875cfd 100644 --- a/firmware/common/portapack_io.hpp +++ b/firmware/common/portapack_io.hpp @@ -130,7 +130,7 @@ public: ) { lcd_command(command); for(size_t i=0; i> 8; *(byte++) = word >> 0; word_count--; } if( byte_count & 1 ) { - const auto word = lcd_read_data_frame_memory(); + const auto word = lcd_read_data(); *(byte++) = word >> 8; } } @@ -311,42 +311,7 @@ private: lcd_wr_deassert(); /* Complete write operation */ } - uint32_t lcd_read_data_id() { - // NOTE: Assumes ADDR=1 from command phase. - dir_read(); - - /* Start read operation */ - lcd_rd_assert(); - /* Wait for passthrough data(15:8) to settle -- ~16ns (3 cycles) typical */ - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - const auto value_high = data_read(); - - /* Latch data[7:0] */ - lcd_rd_deassert(); - /* Wait for latched data[7:0] to settle -- ~26ns (5 cycles) typical */ - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - __asm__("nop"); - - const auto value_low = data_read(); - return (value_high << 8) | value_low; - } - - uint32_t lcd_read_data_frame_memory() { + uint32_t lcd_read_data() { // NOTE: Assumes ADDR=1 from command phase. dir_read();