Small doc-syntax fixes

This commit is contained in:
Marcel Stör 2016-01-09 12:37:56 +01:00
parent b06a3cd5e7
commit 243ba446aa
2 changed files with 33 additions and 34 deletions

View File

@ -112,13 +112,12 @@ 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
####Example
```lua
sda = 5
scl = 6
@ -170,12 +169,12 @@ Initialize a display via Hardware SPI.
- `u8g.uc1701_mini12864_hw_spi()`
#### Syntax
`u8g.ssd1306_128x64_spi(cs, dc, res)`
`u8g.ssd1306_128x64_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
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)`
#### Parameters
- `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
- `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
#### Returns
`nil`
@ -271,11 +270,11 @@ 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`
@ -324,7 +323,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`
@ -371,15 +370,15 @@ disp:setFont(u8g.font_6x10)
## Unimplemented Functions
- Cursor handling
- disableCursor()
- enableCursor()
- setCursorColor()
- setCursorFont()
- setCursorPos()
- setCursorStyle()
- disableCursor()
- enableCursor()
- setCursorColor()
- setCursorFont()
- setCursorPos()
- setCursorStyle()
- General functions
- setContrast()
- setPrintPos()
- setHardwareBackup()
- setRGB()
- setDefaultMidColor()
- setContrast()
- setPrintPos()
- setHardwareBackup()
- setRGB()
- setDefaultMidColor()

View File

@ -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.
### 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
#define UCG_DISPLAY_TABLE \
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()`
#### Syntax
`ucg.st7735_18x128x160_hw_spi(cs, dc, res)`
`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
@ -178,7 +178,7 @@ They'll be available as `ucg.<font_name>` in Lua.
`disp:setFont(font)`
#### Parameters
- `font`: Constant to identify pre-compiled font.
`font` constant to identify pre-compiled font
#### Returns
`nil`