Skip to content

Commit

Permalink
remove address() (to be implemented in common graphics library as 'se…
Browse files Browse the repository at this point in the history
…t_address()'
  • Loading branch information
avsa242 committed Oct 6, 2023
1 parent 9833bc4 commit cdfb2f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
14 changes: 3 additions & 11 deletions display.oled.ssd130x.spin
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: Jesse Burt
Copyright (c) 2023
Created: Apr 26, 2018
Updated: Jul 23, 2023
Updated: Oct 6, 2023
See end of file for terms of use.
--------------------------------------------
}
Expand Down Expand Up @@ -118,7 +118,7 @@ PUB startx(SCL_PIN, SDA_PIN, RES_PIN, I2C_HZ, ADDR_BITS, DISP_WID, DISP_HT, ptr_
_buff_sz := (_disp_width * _disp_height) / 8
_bytesperln := _disp_width * BYTESPERPX

address(ptr_dispbuff) ' set display buffer address
set_address(ptr_dispbuff) ' set display buffer address
return
' if this point is reached, something above failed
' Re-check I/O pin assignments, bus speed, connections, power
Expand Down Expand Up @@ -159,7 +159,7 @@ PUB startx(CS_PIN, SCK_PIN, SDIN_PIN, DC_PIN, RES_PIN, DISP_WID, DISP_HT, ptr_di
_buff_sz := (_disp_width * _disp_height) / 8
_bytesperln := _disp_width * BYTESPERPX

address(ptr_dispbuff) ' set display buffer address
set_address(ptr_dispbuff) ' set display buffer address
return
' if this point is reached, something above failed
' Re-check I/O pin assignments, bus speed, connections, power
Expand Down Expand Up @@ -231,14 +231,6 @@ PUB preset_128x64{}
com_pin_cfg(1, 0)
powered(TRUE)

PUB address(addr): curr_addr
' Set framebuffer address
case addr
$0004..$7FFF-_buff_sz:
_ptr_drawbuffer := addr
other:
return _ptr_drawbuffer

PUB addr_mode(mode)
' Set Memory Addressing Mode
' Valid values:
Expand Down
15 changes: 3 additions & 12 deletions display.oled.ssd130x.spin2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: Jesse Burt
Copyright (c) 2023
Created: Apr 26, 2018
Updated: Jul 23, 2023
Updated: Oct 6, 2023
See end of file for terms of use.
--------------------------------------------
}
Expand Down Expand Up @@ -118,7 +118,7 @@ PUB startx(SCL_PIN, SDA_PIN, RES_PIN, I2C_HZ, ADDR_BITS, DISP_WID, DISP_HT, ptr_
_buff_sz := (_disp_width * _disp_height) / 8
_bytesperln := _disp_width * BYTESPERPX

address(ptr_dispbuff) ' set display buffer address
set_address(ptr_dispbuff) ' set display buffer address
return
' if this point is reached, something above failed
' Re-check I/O pin assignments, bus speed, connections, power
Expand Down Expand Up @@ -157,8 +157,7 @@ PUB startx(CS_PIN, SCK_PIN, SDIN_PIN, DC_PIN, RES_PIN, SCK_HZ, WIDTH, HEIGHT, pt
' calc display memory usage from dimensions and 1bpp depth
_buff_sz := (_disp_width * _disp_height) / 8
_bytesperln := _disp_width * BYTESPERPX

address(ptr_dispbuff) ' set display buffer address
set_address(ptr_dispbuff) ' set display buffer address
return
' if this point is reached, something above failed
' Re-check I/O pin assignments, bus speed, connections, power
Expand Down Expand Up @@ -230,14 +229,6 @@ PUB preset_128x64()
com_pin_cfg(1, 0)
powered(TRUE)

PUB address(addr): curr_addr
' Set framebuffer address
case addr
$0004..$7FFF-_buff_sz:
_ptr_drawbuffer := addr
other:
return _ptr_drawbuffer

PUB addr_mode(mode)
' Set Memory Addressing Mode
' Valid values:
Expand Down

0 comments on commit cdfb2f1

Please sign in to comment.