NuttX

Table of Contents

  • Home
  • Introduction
  • Getting Started
  • Contributing
  • The Inviolable Principles of NuttX
  • Supported Platforms
  • OS Components
  • Applications
    • Audio Utility libraries
    • Bootloader Utilities
    • Benchmark Applications
    • CAN Utilities
    • Cryptography Library Support
    • File System Utilities
    • Games
    • Graphics Support
    • Industrial Applications
    • Inertial Libraries Support
    • Interpreters
    • Logging Utilities
    • LTE Libraries and NSH Add-Ons
    • Math Library Support
    • Machine Learning Support
    • Network Utilities
    • NuttShell (NSH)
    • Software Define Radio Libraries
    • System Libraries and NSH Add-Ons
    • Testing
    • Host Side Tools
    • Wireless Libraries and NSH Add-Ons
    • Examples
      • Selecting Examples
      • Built-In Functions
      • Supported examples
        • abntcodi ABNT CODI example
        • adc Read from ADC
        • adjtime Ajdtime function example
        • adxl372_test ADXL372 test program
        • ajoystick Analog Joystick
        • alarm RTC Alarm
        • apa102 Rainbow on APA102 LED Strip
        • apds9960 APDS-9960 test application
        • audio_rttl Audio tone generator
        • bastest Bas BASIC Interpreter
        • battery Battery monitor example
        • bme680 BME680 sensor example
        • bmi160 BMI160 sensor example
        • bmp180 BMP180 Barometer sensor example
        • bmp280 BMP280 Barometer sensor example
        • bridge Network Bridge
        • buttons Read GPIO Buttons
        • calib_udelay Calibration tool for udelay
        • camera Camera Snapshot
        • can CAN Device Test
        • capture PWM Capture example
        • cbortest TinyCBOR Test Example
        • cctype Verify C++ cctype operations
        • chat AT over TTY
        • chrono Chronometer example to use with STM32LDiscover
        • configdata Config Data example / unit test
        • cordic CORDIC driver example
        • cpuhog Keep CPU Busy
        • cromfs CROMFS Example
        • dac Write to DAC
        • dhcpd DHCP Server
        • discover UDP Discover Daemon
        • djoystick Discrete Joystick
        • dronecan DroneCAN example
        • elf ELF loader
        • embedlog embedlog example
        • esp32_himem ESP32 HIMEM Example
        • etl Embedded Template Library (ETL) C++ example
        • fb Framebuffer
        • fboverlay Framebuffer overlay test tool
        • flash_test SMART Flash test
        • flowc Serial Hardware Flow Control
        • fmsynth FM Synthesizer examples
        • foc FOC motor controller example
        • ft80x FT80x GUI Chip
        • ftpc FTP Client
        • ftpd FTP daemon
        • fxos8700cq_test
        • gpio GPIO Read and Write
        • gps GPS example
        • hall Hall effect sensor example
        • hdc1008_demo HDC1008 driver example
        • hello Hello World
        • hello_nim Hello World in Nim
        • hello_wasm Hello World in WASM
        • hello_zig Hello World in Zig
        • helloxx Hello World in C++
        • hidkbd USB Host HID keyboard
        • hts221_reader HTS221 Humidity Sensor
        • i2cchar Transfer Through I2C
        • i2sloop I2S loopback test
        • igmp Trivial IGMP
        • ina219 Current/Power Monitor INA219
        • ina226 Current/Power Monitor INA226
        • ini_dumper ini dumper example
        • ipcfg IP Configuration file example
        • ipforward IP Forwarding Using TUN
        • json cJSON
        • keyboard
        • leds Toggle LEDs
        • leds_rust Toggle LEDs in Rust
        • leds_zig Toggle LEDs in Zig
        • libtest Static Library Test
        • lis3dsh_reader LIS3DSH Accelerometer
        • lp503x LP503X PWM LED example
        • lsm303_reader LSM303 Accelerometer/Magnetometer
        • lsm6dsl_reader LSM6DSL Accelerometer/Gyroscope
        • ltr308 LTR308 ambient light sensor example
        • lua_module Hello World Lua module
        • lvgldemo LVGL Demo
        • lvglterm LVGL Terminal for NuttShell (NSH)
        • max31855 max31855 example
        • mcuboot MCUboot examples
        • media Media test
        • mld MLD example
        • mlx90614 MLX90614 Test Example
        • mml_parser MML parser example
        • modbus FreeModbus demo example
        • modbusmaster Modbus Master example
        • module Loadable Module
        • mount Mount Filesystem
        • mqttc MQTT-C Example
        • mtdpart MTD Partition Test
        • mtdrwb MTD Read-ahead and Write Buffering
        • netlink_route Netlink NETLINK_ROUTE test
        • netloop Network loopback device
        • netpkt AF_PACKET Raw Sockets
        • nettest Client/Server Over TCP
        • nimble NimBLE example
        • nng_test NNG pubsub program
        • noteprintf “Note printf!” example
        • nrf24l01_btle Emulates a nRF8001 temperature beacon with nRF24L01
        • nrf24l01_term NRF24L01 Wireless Connection
        • null NULL example
        • nunchuck
        • nx NX graphics example
        • nxdemo NX Demo “Graphic test” example
        • nxflat NXFLAT Binary
        • nxhello NX graphics “Hello, World!” example
        • nximage Display NuttX Logo
        • nxlines NX Line Drawing
        • nxscope NxScope library example
        • nxterm Display NuttShell (NSH) as NX Console
        • nxtext Display NX Text
        • obd2 OBD-II application example
        • oneshot Oneshot Timer
        • opencyphal OpenCyphal Cyphal/CAN example
        • pca9635 PCA9635PW LED
        • pdcurses pdcurses demos
        • pf_ieee802154 PF_IEEE802154 example
        • pipe Pipe example
        • poll Poll example
        • popen popen() example
        • posix_spawn posix_spawn Unit Test
        • powerled Powerled driver example
        • powermonitor LTC4151 powermonitor example
        • pppd pppd client example
        • pty_test Pseudo-Terminals
        • pwfb NX Per-Window Framebuffer Text Example
        • pwlines NX Per-Window Framebuffer Graphics Example
        • pwm General PWM Example
        • qencoder Quadrature Encoder
        • random Random Numbers
        • relays Relays
        • rfid_readuid RFID example
        • rgbled RGB LED Using PWM
        • romfs File System
        • rpmsgsocket Rpmsg socket example
        • Rust Examples
        • sendmail SMTP Client
        • serialblaster Serial Blaster example
        • serialrx Serial RX example
        • serloop Serial Loopback
        • shm_test SHM example
        • sht3x SHT3x sensor example
        • slcd Alphanumeric Segment LCD
        • smps Switched-Mode Power Supply
        • sotest Shared Library Module Test
        • spislv SPI slave example
        • stat Test of stat(), fstat(), and statfs()
        • sx127x_demo SX127X Radio
        • system System() example
        • tcp_ipc_client Client for TCP IPC NuttX
        • tcp_ipc_server Server for TCP IPC NuttX
        • tcpblaster TCP Performance Test
        • tcpecho TCP Echo Server
        • telnetd Simple Telnet Shell
        • termios Simple Termios interface test
        • thttpd THTTPD server
        • tiff TIFF file generation example
        • timer Timer example
        • timer_gpio Timer GPIO example
        • touchscreen Touchscreen Events
        • udgram Unix domain datagram example
        • udp Client/Server Over UDP
        • udpblaster UDP blaster example
        • uid UID/GID example
        • unionfs Union File System
        • usbserial USB Serial Hello World
        • userfs UserFS File System
        • usrsocktest USRSOCK test example
        • ustream Unix Stream Sockets
        • veml6070 VEML6070 UltraViolet sensor example
        • watchdog Watchdog Timer
        • watcher Watcher & Watched
        • webserver Simple Webserver
        • wget Web Client
        • wgetjson GET JSON Using wget
        • wiegand Wiegand example
        • ws2812 ws2812 Demo
        • ws2812esp32rmt ws2812 Demo using ESP32_RMT
        • xbc_test XBox Controller Example
        • xmlrpc XML-RPC Server
        • zerocross Zero Crossing Device
  • Implementation Details
  • API Reference
  • FAQ
  • Debugging
  • Guides
  • Glossary
  • NuttX Logos
  • Tags
NuttX
  • Applications
  • Examples
  • nximage Display NuttX Logo
  • View page source

nximage Display NuttX Logo

This is a simple example that just puts the NuttX logo image in the center of the display. This only works for RGB23 (888), RGB16 (656), RGB8 (332), and 8-bit greyscale for now.

  • CONFIG_NSH_BUILTIN_APPS – Build the NXIMAGE example as a built-in that can be executed from the NSH command line.

  • CONFIG_EXAMPLES_NXIMAGE_VPLANE – The plane to select from the frame- buffer driver for use in the test. Default: 0.

  • CONFIG_EXAMPLES_NXIMAGE_DEVNO – The LCD device to select from the LCD driver for use in the test: Default: 0.

  • CONFIG_EXAMPLES_NXIMAGE_BPP – Pixels per pixel to use. Valid options include 8, 16 and 24. Default is 16.

  • CONFIG_EXAMPLES_NXIMAGE_XSCALEp5, CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5 or CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0 – The logo image width is 160 columns. One of these may be defined to rescale the image horizontally by .5, 1.5 or 2.0.

  • CONFIG_EXAMPLES_NXIMAGE_YSCALEp5, CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5 or CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 – The logo image height is 160 rows. One of these may be defined to rescale the image vertically by .5, 1.5 or 2.0.

  • CONFIG_EXAMPLES_NXIMAGE_GREYSCALE – Grey scale image. Default: RGB.

How was that run-length encoded image produced?

  1. I used GIMP output the image as a .c file.

  2. I added some C logic to palette-ize the RGB image in the GIMP .c file.

  3. Then I add some simple run-length encoding to palette-ized image.

But now there is a tool that can be found in the NxWidgets package at NxWidgets/tools/bitmap_converter.py that can be used to convert any graphics format to the NuttX RLE format.

Note: As of this writing, most of the pixel depth, scaling options, and combinations thereof have not been tested.

Previous Next

© Copyright 2023, The Apache Software Foundation.