Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
b06a3cd5
Commit
b06a3cd5
authored
Jan 09, 2016
by
devsaurus
Browse files
comply with new rules
parent
9ca35b1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/en/modules/u8g.md
View file @
b06a3cd5
...
...
@@ -112,10 +112,10 @@ Initialize a display via I2C.
`u8g.ssd1306_128x64_i2c(address)`
####Parameters
-
`address`
: I2C slave address of display
.
-
`address`
: I2C slave address of display
####Returns
u8g display object
.
u8g display object
####Example
...
...
@@ -129,9 +129,7 @@ disp = u8g.ssd1306_128x64_i2c(sla)
```
####See also
-
[
SPI Display Drivers
](
#spi-display-drivers
)
__
_
[
SPI Display Drivers
](
#spi-display-drivers
)
## SPI Display Drivers
Initialize a display via Hardware SPI.
...
...
@@ -180,7 +178,7 @@ Initialize a display via Hardware SPI.
-
`res`
: GPIO pin for /RES (optional)
#### Returns
u8g display object
.
u8g display object
#### Example
```
lua
...
...
@@ -193,7 +191,7 @@ disp = u8g.ssd1306_128x64_hw_spi(cs, dc, res)
```
#### See also
-
[
I2C Display Drivers
](
#i2c-display-drivers
)
[
I2C Display Drivers
](
#i2c-display-drivers
)
__
_
...
...
@@ -215,24 +213,20 @@ Parts of the bitmap may be outside the display boundaries. The bitmap is specifi
`disp:drawBitmap(x, y, cnt, h, bitmap)`
#### Parameters
-
`x`
: X-position (left position of the bitmap)
.
-
`y`
: Y-position (upper position of the bitmap)
.
-
`x`
: X-position (left position of the bitmap)
-
`y`
: Y-position (upper position of the bitmap)
-
`cnt`
: Number of bytes of the bitmap in horizontal direction. The width of the bitmap is cnt
*
8.
-
`h`
: Height of the bitmap
.
-
`bitmap`
: Bitmap data supplied as string
.
-
`h`
: Height of the bitmap
-
`bitmap`
: Bitmap data supplied as string
#### Returns
`nil`
#### Example
`lua_examples/u8glib/u8g_bitmaps.lua`
#### See also
-
[
u8glib drawBitmap()
](
https://github.com/olikraus/u8glib/wiki/userreference#drawbitmap
)
-
[
lua_examples/u8glib/u8g_bitmaps.lua
](
https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/u8glib/u8g_bitmaps.lua
)
-
[
u8g.disp:drawXBM()
](
#u8gdispdrawxbm
)
__
_
## [u8g.disp:drawBox()](https://github.com/olikraus/u8glib/wiki/userreference#drawbox)
## [u8g.disp:drawCircle()](https://github.com/olikraus/u8glib/wiki/userreference#drawcircle)
...
...
@@ -277,24 +271,20 @@ Bitmaps and XBMs are supplied as strings to `drawBitmap()` and `drawXBM()`. This
`disp:drawXBM(x, y, w, h, bitmap)`
#### Parameters
-
`x`
: X-position (left position of the bitmap)
.
-
`y`
: Y-position (upper position of the bitmap)
.
-
`w`
: Width of the bitmap
.
-
`h`
: Height of the bitmap
.
-
`bitmap`
: XBM data supplied as string
.
-
`x`
: X-position (left position of the bitmap)
-
`y`
: Y-position (upper position of the bitmap)
-
`w`
: Width of the bitmap
-
`h`
: Height of the bitmap
-
`bitmap`
: XBM data supplied as string
#### Returns
`nil`
#### Example
`lua_examples/u8glib/u8g_bitmaps.lua`
#### See also
-
[
u8glib drawXBM()
](
https://github.com/olikraus/u8glib/wiki/userreference#drawxbm
)
-
[
lua_examples/u8glib/u8g_bitmaps.lua
](
https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/u8glib/u8g_bitmaps.lua
)
-
[
u8g.disp:drawBitmap()
](
#u8gdispdrawbitmap
)
__
_
## [u8g.disp:firstPage()](https://github.com/olikraus/u8glib/wiki/userreference#firstpage)
## [u8g.disp:getColorIndex()](https://github.com/olikraus/u8glib/wiki/userreference#getcolorindex)
...
...
@@ -334,7 +324,7 @@ They'll be available as `u8g.<font_name>` in Lua.
`disp:setFont(font)`
#### Parameters
-
`font`
: Constant to indentify pre-compiled font
.
-
`font`
: Constant to indentify pre-compiled font
#### Returns
`nil`
...
...
@@ -347,8 +337,6 @@ disp:setFont(u8g.font_6x10)
#### See also
-
[
u8glib setFont()
](
https://github.com/olikraus/u8glib/wiki/userreference#setfont
)
__
_
## [u8g.disp:setFontLineSpacingFactor()](https://github.com/olikraus/u8glib/wiki/userreference#setfontlinespacingfactor)
## [u8g.disp:setFontPosBaseline()](https://github.com/olikraus/u8glib/wiki/userreference#setfontposbaseline)
...
...
docs/en/modules/ucg.md
View file @
b06a3cd5
...
...
@@ -83,12 +83,12 @@ Initialize a display via Hardware SPI.
`ucg.st7735_18x128x160_hw_spi(cs, dc, res)`
#### Parameters
-
`cs`
: GPIO pin for /CS
.
-
`dc`
: GPIO pin for DC
.
-
`res`
: GPIO pin for /RES (optional)
.
-
`cs`
: GPIO pin for /CS
-
`dc`
: GPIO pin for DC
-
`res`
: GPIO pin for /RES (optional)
#### Returns
ucg display object
.
ucg display object
#### Example
```
lua
...
...
@@ -189,7 +189,7 @@ disp:setFont(ucg.font_7x13B_tr)
```
#### See also
-
[
ucglib setFont()
](
https://github.com/olikraus/ucglib/wiki/reference#setfont
)
[
ucglib setFont()
](
https://github.com/olikraus/ucglib/wiki/reference#setfont
)
## [ucg.disp:setFontMode()](https://github.com/olikraus/ucglib/wiki/reference#setfontmode)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment