Difference: OledDisplay (30 vs. 31)

Revision 312022-09-26 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 21 to 21
 

OLED and I2C Words

Changed:
<
<
oled-emit works like the standard word emit. It blocks the calling thread, as long as the character is not written to the OLED display (less than 300 us for a 6x8 character and 400 kHz I2C). Horizontal (x) position is in pixel (0 to 127), vertical position (y) is in lines, a line consists of 8 pixels. Larger fonts takes more than one line.
>
>
oled-emit works like the standard word emit. It blocks the calling thread, as long as the character is not written to the OLED display (less than 300 us for a 6x8 character and 400 kHz I2C). Horizontal (x) position is in pixel (0 to 127), vertical position (y) is in lines, a line consists of 8 pixels. 0, 0 is upper left corner. Larger fonts takes more than one line.
 
oled-emit    ( Char -- )        Emits a character (writes a character to the OLED display)

Line: 31 to 31
 hook-emit? ( -- a-addr )

oledpos! ( x y -- ) Set OLED cursor position,

Changed:
<
<
x horizontal position, max. 127 y vertical position (a line consists of 8 pixels), max. 3 for 128x32 or 7 for 128x64 displays.
>
>
x (column) horizontal position, max. 127 y (row) vertical position (a line consists of 8 pixels), max. 3 for 128x32 or 7 for 128x64 displays.
 oledpos@ ( -- x y ) Get the current OLED cursor position oledcmd ( c-addr -- ) Send command to the OLED controller SSD1306. First byte contains the length of the command. oledclr ( -- ) Clears the OLED display, sets the cursor to 0, 0 oledfont ( u -- ) Select the font, u: 0 6x8, 1 8x8, 2 8X16 , 3 12X16
Changed:
<
<
oledcolumn! ( u -- ) Write a column (8 pixels) to the current position. Increment position
>
>
oledcolumn! ( u -- ) Write a column (8 pixels) to the current position. Increment position. Bit 0 on top
 oledcolumn@ ( -- u ) Read a column (8 pixels) from the current position

I2Cdev ( u -- ) Sets the 7-bit I2C address

Line: 45 to 45
 I2Cget ( c-addr u -- ) c-addr buffer address for the message to receive I2Cputget ( a1 u1 a2 u2 -- ) a1 buffer address for the message to send, a2 buffer address for the message to receive
Changed:
<
<
>oled ( -- addr1 addr2 ) redirect to oled
>term ( addr1 addr2 -- ) terminate redirection
>
>
>oled ( -- addr1 addr2 ) redirect to oled *)
>term ( addr1 addr2 -- ) terminate redirection *)

*) part of redirection.fs

 

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback