Small doc-syntax fixes
This commit is contained in:
parent
b06a3cd5e7
commit
243ba446aa
|
@ -112,13 +112,12 @@ Initialize a display via I2C.
|
||||||
`u8g.ssd1306_128x64_i2c(address)`
|
`u8g.ssd1306_128x64_i2c(address)`
|
||||||
|
|
||||||
####Parameters
|
####Parameters
|
||||||
- `address`: I2C slave address of display
|
`address` I2C slave address of display
|
||||||
|
|
||||||
####Returns
|
####Returns
|
||||||
u8g display object
|
u8g display object
|
||||||
|
|
||||||
####Example
|
####Example
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
sda = 5
|
sda = 5
|
||||||
scl = 6
|
scl = 6
|
||||||
|
@ -170,12 +169,12 @@ Initialize a display via Hardware SPI.
|
||||||
- `u8g.uc1701_mini12864_hw_spi()`
|
- `u8g.uc1701_mini12864_hw_spi()`
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`u8g.ssd1306_128x64_spi(cs, dc, res)`
|
`u8g.ssd1306_128x64_spi(cs, dc, [res])`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `cs`: GPIO pin for /CS
|
- `cs` GPIO pin for /CS
|
||||||
- `dc`: GPIO pin for DC
|
- `dc` GPIO pin for DC
|
||||||
- `res`: GPIO pin for /RES (optional)
|
- `res` GPIO pin for /RES (optional)
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
u8g display object
|
u8g display object
|
||||||
|
@ -213,11 +212,11 @@ Parts of the bitmap may be outside the display boundaries. The bitmap is specifi
|
||||||
`disp:drawBitmap(x, y, cnt, h, bitmap)`
|
`disp:drawBitmap(x, y, cnt, h, bitmap)`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `x`: X-position (left position of the bitmap)
|
- `x` X-position (left position of the bitmap)
|
||||||
- `y`: Y-position (upper 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.
|
- `cnt` number of bytes of the bitmap in horizontal direction. The width of the bitmap is cnt*8.
|
||||||
- `h`: Height of the bitmap
|
- `h` height of the bitmap
|
||||||
- `bitmap`: Bitmap data supplied as string
|
- `bitmap` bitmap data supplied as string
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
`nil`
|
`nil`
|
||||||
|
@ -271,11 +270,11 @@ Bitmaps and XBMs are supplied as strings to `drawBitmap()` and `drawXBM()`. This
|
||||||
`disp:drawXBM(x, y, w, h, bitmap)`
|
`disp:drawXBM(x, y, w, h, bitmap)`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `x`: X-position (left position of the bitmap)
|
- `x` X-position (left position of the bitmap)
|
||||||
- `y`: Y-position (upper position of the bitmap)
|
- `y` Y-position (upper position of the bitmap)
|
||||||
- `w`: Width of the bitmap
|
- `w` width of the bitmap
|
||||||
- `h`: Height of the bitmap
|
- `h` height of the bitmap
|
||||||
- `bitmap`: XBM data supplied as string
|
- `bitmap` XBM data supplied as string
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
`nil`
|
`nil`
|
||||||
|
@ -324,7 +323,7 @@ They'll be available as `u8g.<font_name>` in Lua.
|
||||||
`disp:setFont(font)`
|
`disp:setFont(font)`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `font`: Constant to indentify pre-compiled font
|
`font` Constant to indentify pre-compiled font
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
`nil`
|
`nil`
|
||||||
|
|
|
@ -47,7 +47,7 @@ This object provides all of ucglib's methods to control the display.
|
||||||
Again, refer to [GraphicsTest.lua](https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/ucglib/GraphicsTest.lua) to get an impression how this is achieved with Lua code. Visit the [ucglib homepage](https://github.com/olikraus/ucglib) for technical details.
|
Again, refer to [GraphicsTest.lua](https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/ucglib/GraphicsTest.lua) to get an impression how this is achieved with Lua code. Visit the [ucglib homepage](https://github.com/olikraus/ucglib) for technical details.
|
||||||
|
|
||||||
### Displays
|
### Displays
|
||||||
o get access to the display constructors, add the desired entries to the display table in [app/include/ucg_config.h](https://github.com/nodemcu/nodemcu-firmware/blob/master/app/include/ucg_config.h):
|
To get access to the display constructors, add the desired entries to the display table in [app/include/ucg_config.h](https://github.com/nodemcu/nodemcu-firmware/blob/master/app/include/ucg_config.h):
|
||||||
```c
|
```c
|
||||||
#define UCG_DISPLAY_TABLE \
|
#define UCG_DISPLAY_TABLE \
|
||||||
UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
|
UCG_DISPLAY_TABLE_ENTRY(ili9341_18x240x320_hw_spi, ucg_dev_ili9341_18x240x320, ucg_ext_ili9341_18) \
|
||||||
|
@ -80,12 +80,12 @@ Initialize a display via Hardware SPI.
|
||||||
- `st7735_18x128x160_hw_spi()`
|
- `st7735_18x128x160_hw_spi()`
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
`ucg.st7735_18x128x160_hw_spi(cs, dc, res)`
|
`ucg.st7735_18x128x160_hw_spi(cs, dc, [res])`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `cs`: GPIO pin for /CS
|
- `cs` GPIO pin for /CS
|
||||||
- `dc`: GPIO pin for DC
|
- `dc` GPIO pin for DC
|
||||||
- `res`: GPIO pin for /RES (optional)
|
- `res` GPIO pin for /RES (optional)
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
ucg display object
|
ucg display object
|
||||||
|
@ -178,7 +178,7 @@ They'll be available as `ucg.<font_name>` in Lua.
|
||||||
`disp:setFont(font)`
|
`disp:setFont(font)`
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
- `font`: Constant to identify pre-compiled font.
|
`font` constant to identify pre-compiled font
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
`nil`
|
`nil`
|
||||||
|
|
Loading…
Reference in New Issue