Просмотр исходного кода

transferred u8g module documentation

devsaurus 8 лет назад
Родитель
Сommit
63ba40b791
2 измененных файлов с 273 добавлено и 111 удалено
  1. 0 111
      README.md
  2. 273 0
      docs/en/modules/u8g.md

+ 0 - 111
README.md

@@ -411,117 +411,6 @@ Victor Brutskiy's [ESPlorer](https://github.com/4refr0nt/ESPlorer) is written in
     package.loaded["ds18b20"]=nil
 ```
 
-####Operate a display with u8glib
-u8glib is a graphics library with support for many different displays. The nodemcu firmware supports a subset of these.
-Both I2C and SPI:
-* sh1106_128x64
-* ssd1306 - 128x64 and 64x48 variants
-* ssd1309_128x64
-* ssd1327_96x96_gr
-* uc1611 - dogm240 and dogxl240 variants
-
-SPI only:
-* ld7032_60x32
-* pcd8544_84x48
-* pcf8812_96x65
-* ssd1322_nhd31oled - bw and gr variants
-* ssd1325_nhd27oled - bw and gr variants
-* ssd1351_128x128 - gh and hicolor variants
-* st7565_64128n - variants 64128n, dogm128/132, lm6059/lm6063, c12832/c12864
-* uc1601_c128032
-* uc1608 - 240x128 and 240x64 variants
-* uc1610_dogxl160 - bw and gr variants
-* uc1611 - dogm240 and dogxl240 variants
-* uc1701 - dogs102 and mini12864 variants
-
-U8glib v1.18.1
-
-#####I2C connection
-Hook up SDA and SCL to any free GPIOs. Eg. [u8g_graphics_test.lua](lua_examples/u8glib/u8g_graphics_test.lua) expects SDA=5 (GPIO14) and SCL=6 (GPIO12). They are used to set up nodemcu's I2C driver before accessing the display:
-```lua
-sda = 5
-scl = 6
-i2c.setup(0, sda, scl, i2c.SLOW)
-```
-
-#####SPI connection
-The HSPI module is used, so certain pins are fixed:
-* HSPI CLK  = GPIO14
-* HSPI MOSI = GPIO13
-* HSPI MISO = GPIO12 (not used)
-
-All other pins can be assigned to any available GPIO:
-* CS
-* D/C
-* RES (optional for some displays)
-
-Also refer to the initialization sequence eg in [u8g_graphics_test.lua](lua_examples/u8glib/u8g_graphics_test.lua):
-```lua
-spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, 8, 8)
-```
-
-
-#####Library usage
-The Lua bindings for this library closely follow u8glib's object oriented C++ API. Based on the u8g class, you create an object for your display type.
-
-SSD1306 via I2C:
-```lua
-sla = 0x3c
-disp = u8g.ssd1306_128x64_i2c(sla)
-```
-SSD1306 via SPI:
-```lua
-cs  = 8 -- GPIO15, pull-down 10k to GND
-dc  = 4 -- GPIO2
-res = 0 -- GPIO16, RES is optional YMMV
-disp = u8g.ssd1306_128x64_hw_spi(cs, dc, res)
-```
-
-This object provides all of u8glib's methods to control the display.
-Again, refer to [u8g_graphics_test.lua](lua_examples/u8glib/u8g_graphics_test.lua) to get an impression how this is achieved with Lua code. Visit the [u8glib homepage](https://github.com/olikraus/u8glib) for technical details.
-
-#####Displays
-I2C and HW SPI based displays with support in u8glib can be enabled. To get access to the respective constructors, add the desired entries to the I2C or SPI display tables in [app/include/u8g_config.h](app/include/u8g_config.h):
-```c
-#define U8G_DISPLAY_TABLE_I2C                   \
-    U8G_DISPLAY_TABLE_ENTRY(ssd1306_128x64_i2c) \
-
-#define U8G_DISPLAY_TABLE_SPI                      \
-    U8G_DISPLAY_TABLE_ENTRY(ssd1306_128x64_hw_spi) \
-    U8G_DISPLAY_TABLE_ENTRY(pcd8544_84x48_hw_spi)  \
-    U8G_DISPLAY_TABLE_ENTRY(pcf8812_96x65_hw_spi)  \
-```
-An exhaustive list of available displays can be found in the [u8g module wiki entry](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#u8g-module).
-
-
-#####Fonts
-u8glib comes with a wide range of fonts for small displays. Since they need to be compiled into the firmware image, you'd need to include them in [app/include/u8g_config.h](app/include/u8g_config.h) and recompile. Simply add the desired fonts to the font table:
-```c
-#define U8G_FONT_TABLE \
-    U8G_FONT_TABLE_ENTRY(font_6x10)  \
-    U8G_FONT_TABLE_ENTRY(font_chikita)
-```
-They'll be available as `u8g.<font_name>` in Lua.
-
-#####Bitmaps
-Bitmaps and XBMs are supplied as strings to `drawBitmap()` and `drawXBM()`. This off-loads all data handling from the u8g module to generic methods for binary files. See [u8g_bitmaps.lua](lua_examples/u8glib/u8g_bitmaps.lua).
-In contrast to the source code based inclusion of XBMs into u8glib, it's required to provide precompiled binary files. This can be performed online with [Online-Utility's Image Converter](http://www.online-utility.org/image_converter.jsp): Convert from XBM to MONO format and upload the binary result with [nodemcu-uploader.py](https://github.com/kmpm/nodemcu-uploader).
-
-#####Unimplemented functions
-- [ ] Cursor handling
-  - [ ] disableCursor()
-  - [ ] enableCursor()
-  - [ ] setCursorColor()
-  - [ ] setCursorFont()
-  - [ ] setCursorPos()
-  - [ ] setCursorStyle()
-- [ ] General functions
-  - [ ] setContrast()
-  - [ ] setPrintPos()
-  - [ ] setHardwareBackup()
-  - [ ] setRGB()
-  - [ ] setDefaultMidColor()
-
 ####Operate a display with ucglib
 Ucglib is a graphics library with support for color TFT displays.
 

Разница между файлами не показана из-за своего большого размера
+ 273 - 0
docs/en/modules/u8g.md


Некоторые файлы не были показаны из-за большого количества измененных файлов