diff options
author | Damien George <damien.p.george@gmail.com> | 2017-05-17 19:53:13 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-05-17 19:53:13 +1000 |
commit | f351c6db5e4c0bf75d5d647e69a047da739606a8 (patch) | |
tree | d7ead9b654c26ec61723e93c88a53dd876daef80 /docs/library | |
parent | e4a53570d08643d62ba8e2b72919ae1693162e9a (diff) | |
download | micropython-f351c6db5e4c0bf75d5d647e69a047da739606a8.tar.gz micropython-f351c6db5e4c0bf75d5d647e69a047da739606a8.zip |
drivers/display/lcd160cr: Fix get_line method and enhance screen_dump.
The docs are updated and describe the new behaviour of these methods.
Diffstat (limited to 'docs/library')
-rw-r--r-- | docs/library/lcd160cr.rst | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/docs/library/lcd160cr.rst b/docs/library/lcd160cr.rst index 76828d32da..bd47412986 100644 --- a/docs/library/lcd160cr.rst +++ b/docs/library/lcd160cr.rst @@ -150,11 +150,19 @@ The following methods manipulate individual pixels on the display. .. method:: LCD160CR.get_line(x, y, buf) - Get a line of pixels into the given buffer. - -.. method:: LCD160CR.screen_dump(buf) - - Dump the entire screen to the given buffer. + Low-level method to get a line of pixels into the given buffer. + To read `n` pixels `buf` should be `2*n+1` bytes in length. The first byte + is a dummy byte and should be ignored, and subsequent bytes represent the + pixels in the line starting at coordinate `(x, y)`. + +.. method:: LCD160CR.screen_dump(buf, x=0, y=0, w=None, h=None) + + Dump the contents of the screen to the given buffer. The parameters `x` and `y` + specify the starting coordinate, and `w` and `h` the size of the region. If `w` + or `h` are `None` then they will take on their maximum values, set by the size + of the screen minus the given `x` and `y` values. `buf` should be large enough + to hold `2*w*h` bytes. If it's smaller then only the initial horizontal lines + will be stored. .. method:: LCD160CR.screen_load(buf) |