From 3cccb0dd17368cad748dcf2afc04d3ced4cc623d Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 21 Oct 2023 12:24:43 +0200 Subject: [PATCH] Documentation: migrate apps/example/README.md --- .../applications/examples/abntcodi/index.rst | 4 + .../applications/examples/adc/index.rst | 22 +++++ .../applications/examples/adjtime/index.rst | 6 ++ .../examples/adxl372_test/index.rst | 4 + .../applications/examples/ajoystick/index.rst | 16 ++++ .../applications/examples/alarm/index.rst | 20 +++++ .../applications/examples/apa102/index.rst | 4 + .../applications/examples/apds9960/index.rst | 5 ++ .../examples/audio_rttl/index.rst | 4 + .../applications/examples/bastest/index.rst | 16 ++++ .../applications/examples/battery/index.rst | 4 + .../applications/examples/bme680/index.rst | 4 + .../applications/examples/bmi160/index.rst | 4 + .../applications/examples/bmp180/index.rst | 4 + .../applications/examples/bmp280/index.rst | 4 + .../applications/examples/bridge/index.rst | 40 +++++++++ .../applications/examples/buttons/index.rst | 4 + .../examples/calib_udelay/index.rst | 4 + .../applications/examples/camera/index.rst | 40 +++++++++ .../applications/examples/can/index.rst | 29 +++++++ .../applications/examples/capture/index.rst | 4 + .../applications/examples/cbortest/index.rst | 4 + .../applications/examples/cctype/index.rst | 4 + .../applications/examples/chat/index.rst | 16 ++++ .../applications/examples/chrono/index.rst | 4 + .../examples/configdata/index.rst | 4 + .../applications/examples/cordic/index.rst | 4 + .../applications/examples/cpuhog/index.rst | 6 ++ .../applications/examples/cromfs/index.rst | 4 + .../applications/examples/dac/index.rst | 4 + .../applications/examples/dhcpd/index.rst | 23 +++++ .../applications/examples/discover/index.rst | 21 +++++ .../applications/examples/djoystick/index.rst | 17 ++++ .../applications/examples/dronecan/index.rst | 4 + .../applications/examples/elf/index.rst | 61 ++++++++++++++ .../applications/examples/embedlog/index.rst | 4 + .../examples/esp32_himem/index.rst | 4 + .../applications/examples/etl/index.rst | 4 + .../applications/examples/fb/index.rst | 4 + .../applications/examples/fboverlay/index.rst | 4 + .../examples/flash_test/index.rst | 29 +++++++ .../applications/examples/flowc/index.rst | 18 ++++ .../applications/examples/fmsynth/index.rst | 4 + .../applications/examples/foc/index.rst | 83 +++++++++++++++++++ .../applications/examples/ft80x/index.rst | 6 ++ .../applications/examples/ftpc/index.rst | 40 +++++++++ .../applications/examples/ftpd/index.rst | 55 ++++++++++++ .../examples/fxos8700cq_test/index.rst | 4 + .../applications/examples/gpio/index.rst | 4 + .../applications/examples/gps/index.rst | 4 + .../applications/examples/hall/index.rst | 4 + .../examples/hdc1008_demo/index.rst | 4 + .../applications/examples/hello/index.rst | 9 ++ .../applications/examples/hello_nim/index.rst | 4 + .../examples/hello_rust/index.rst | 4 + .../examples/hello_wasm/index.rst | 4 + .../applications/examples/hello_zig/index.rst | 4 + .../applications/examples/helloxx/index.rst | 35 ++++++++ .../applications/examples/hidkbd/index.rst | 17 ++++ .../examples/hts221_reader/index.rst | 4 + .../applications/examples/i2cchar/index.rst | 52 ++++++++++++ .../applications/examples/i2sloop/index.rst | 4 + .../applications/examples/igmp/index.rst | 13 +++ .../applications/examples/ina219/index.rst | 5 ++ .../applications/examples/ina226/index.rst | 4 + Documentation/applications/examples/index.rst | 38 +++++++++ .../examples/ini_dumper/index.rst | 4 + .../applications/examples/ipcfg/index.rst | 4 + .../applications/examples/ipforward/index.rst | 6 ++ .../applications/examples/json/index.rst | 12 +++ .../applications/examples/keyboard/index.rst | 4 + .../applications/examples/leds/index.rst | 5 ++ .../applications/examples/libtest/index.rst | 18 ++++ .../examples/lis3dsh_reader/index.rst | 5 ++ .../applications/examples/lp503x/index.rst | 4 + .../examples/lsm303_reader/index.rst | 4 + .../examples/lsm6dsl_reader/index.rst | 4 + .../applications/examples/ltr308/index.rst | 4 + .../examples/lua_module/index.rst | 10 +++ .../applications/examples/lvgldemo/index.rst | 4 + .../applications/examples/lvglterm/index.rst | 13 +++ .../applications/examples/max31855/index.rst | 4 + .../applications/examples/mcuboot/index.rst | 4 + .../applications/examples/media/index.rst | 25 ++++++ .../applications/examples/mld/index.rst | 4 + .../applications/examples/mlx90614/index.rst | 4 + .../examples/mml_parser/index.rst | 4 + .../applications/examples/modbus/index.rst | 18 ++++ .../examples/modbusmaster/index.rst | 4 + .../applications/examples/module/index.rst | 61 ++++++++++++++ .../applications/examples/mount/index.rst | 18 ++++ .../applications/examples/mqttc/index.rst | 25 ++++++ .../applications/examples/mtdpart/index.rst | 28 +++++++ .../applications/examples/mtdrwb/index.rst | 24 ++++++ .../examples/netlink_route/index.rst | 4 + .../applications/examples/netloop/index.rst | 17 ++++ .../applications/examples/netpkt/index.rst | 4 + .../applications/examples/nettest/index.rst | 17 ++++ .../applications/examples/nimble/index.rst | 4 + .../applications/examples/nng_test/index.rst | 4 + .../examples/noteprintf/index.rst | 4 + .../examples/nrf24l01_btle/index.rst | 4 + .../examples/nrf24l01_term/index.rst | 10 +++ .../applications/examples/null/index.rst | 5 ++ .../applications/examples/nunchuck/index.rst | 4 + .../applications/examples/nx/index.rst | 38 +++++++++ .../applications/examples/nxdemo/index.rst | 4 + .../applications/examples/nxflat/index.rst | 7 ++ .../applications/examples/nxhello/index.rst | 22 +++++ .../applications/examples/nximage/index.rst | 35 ++++++++ .../applications/examples/nxlines/index.rst | 33 ++++++++ .../applications/examples/nxscope/index.rst | 4 + .../applications/examples/nxterm/index.rst | 46 ++++++++++ .../applications/examples/nxtext/index.rst | 54 ++++++++++++ .../applications/examples/obd2/index.rst | 4 + .../applications/examples/oneshot/index.rst | 4 + .../examples/opencyphal/index.rst | 4 + .../applications/examples/pca9635/index.rst | 4 + .../applications/examples/pdcurses/index.rst | 18 ++++ .../examples/pf_ieee802154/index.rst | 4 + .../applications/examples/pipe/index.rst | 7 ++ .../applications/examples/poll/index.rst | 49 +++++++++++ .../applications/examples/popen/index.rst | 4 + .../examples/posix_spawn/index.rst | 72 ++++++++++++++++ .../applications/examples/powerled/index.rst | 9 ++ .../examples/powermonitor/index.rst | 4 + .../applications/examples/pppd/index.rst | 4 + .../applications/examples/pty_test/index.rst | 4 + .../applications/examples/pwfb/index.rst | 16 ++++ .../applications/examples/pwlines/index.rst | 4 + .../applications/examples/pwm/index.rst | 28 +++++++ .../applications/examples/qencoder/index.rst | 26 ++++++ .../applications/examples/random/index.rst | 21 +++++ .../applications/examples/relays/index.rst | 10 +++ .../examples/rfid_readuid/index.rst | 4 + .../applications/examples/rgbled/index.rst | 5 ++ .../applications/examples/romfs/index.rst | 11 +++ .../examples/rpmsgsocket/index.rst | 4 + .../applications/examples/sendmail/index.rst | 38 +++++++++ .../examples/serialblaster/index.rst | 6 ++ .../applications/examples/serialrx/index.rst | 6 ++ .../applications/examples/serloop/index.rst | 8 ++ .../applications/examples/shm_test/index.rst | 4 + .../applications/examples/sht3x/index.rst | 4 + .../applications/examples/slcd/index.rst | 6 ++ .../applications/examples/smps/index.rst | 4 + .../applications/examples/sotest/index.rst | 59 +++++++++++++ .../applications/examples/stat/index.rst | 6 ++ .../examples/sx127x_demo/index.rst | 4 + .../applications/examples/system/index.rst | 9 ++ .../examples/tcp_ipc_client/index.rst | 29 +++++++ .../examples/tcp_ipc_server/index.rst | 31 +++++++ .../examples/tcpblaster/index.rst | 42 ++++++++++ .../applications/examples/tcpecho/index.rst | 19 +++++ .../applications/examples/telnetd/index.rst | 32 +++++++ .../applications/examples/termios/index.rst | 9 ++ .../applications/examples/thttpd/index.rst | 17 ++++ .../applications/examples/tiff/index.rst | 20 +++++ .../applications/examples/timer/index.rst | 23 +++++ .../examples/timer_gpio/index.rst | 35 ++++++++ .../examples/touchscreen/index.rst | 38 +++++++++ .../applications/examples/udgram/index.rst | 4 + .../applications/examples/udp/index.rst | 16 ++++ .../examples/udpblaster/index.rst | 5 ++ .../applications/examples/uid/index.rst | 4 + .../applications/examples/unionfs/index.rst | 28 +++++++ .../applications/examples/usbserial/index.rst | 69 +++++++++++++++ .../applications/examples/userfs/index.rst | 4 + .../examples/usrsocktest/index.rst | 4 + .../applications/examples/ustream/index.rst | 15 ++++ .../applications/examples/veml6070/index.rst | 4 + .../applications/examples/watchdog/index.rst | 26 ++++++ .../applications/examples/watcher/index.rst | 57 +++++++++++++ .../applications/examples/webserver/index.rst | 43 ++++++++++ .../applications/examples/wget/index.rst | 42 ++++++++++ .../applications/examples/wgetjson/index.rst | 7 ++ .../applications/examples/wiegand/index.rst | 4 + .../applications/examples/ws2812/index.rst | 4 + .../examples/ws2812esp32rmt/index.rst | 4 + .../applications/examples/xbc_test/index.rst | 4 + .../applications/examples/xmlrpc/index.rst | 22 +++++ .../applications/examples/zerocross/index.rst | 5 ++ Documentation/applications/index.rst | 12 +-- 183 files changed, 2681 insertions(+), 5 deletions(-) create mode 100644 Documentation/applications/examples/abntcodi/index.rst create mode 100644 Documentation/applications/examples/adc/index.rst create mode 100644 Documentation/applications/examples/adjtime/index.rst create mode 100644 Documentation/applications/examples/adxl372_test/index.rst create mode 100644 Documentation/applications/examples/ajoystick/index.rst create mode 100644 Documentation/applications/examples/alarm/index.rst create mode 100644 Documentation/applications/examples/apa102/index.rst create mode 100644 Documentation/applications/examples/apds9960/index.rst create mode 100644 Documentation/applications/examples/audio_rttl/index.rst create mode 100644 Documentation/applications/examples/bastest/index.rst create mode 100644 Documentation/applications/examples/battery/index.rst create mode 100644 Documentation/applications/examples/bme680/index.rst create mode 100644 Documentation/applications/examples/bmi160/index.rst create mode 100644 Documentation/applications/examples/bmp180/index.rst create mode 100644 Documentation/applications/examples/bmp280/index.rst create mode 100644 Documentation/applications/examples/bridge/index.rst create mode 100644 Documentation/applications/examples/buttons/index.rst create mode 100644 Documentation/applications/examples/calib_udelay/index.rst create mode 100644 Documentation/applications/examples/camera/index.rst create mode 100644 Documentation/applications/examples/can/index.rst create mode 100644 Documentation/applications/examples/capture/index.rst create mode 100644 Documentation/applications/examples/cbortest/index.rst create mode 100644 Documentation/applications/examples/cctype/index.rst create mode 100644 Documentation/applications/examples/chat/index.rst create mode 100644 Documentation/applications/examples/chrono/index.rst create mode 100644 Documentation/applications/examples/configdata/index.rst create mode 100644 Documentation/applications/examples/cordic/index.rst create mode 100644 Documentation/applications/examples/cpuhog/index.rst create mode 100644 Documentation/applications/examples/cromfs/index.rst create mode 100644 Documentation/applications/examples/dac/index.rst create mode 100644 Documentation/applications/examples/dhcpd/index.rst create mode 100644 Documentation/applications/examples/discover/index.rst create mode 100644 Documentation/applications/examples/djoystick/index.rst create mode 100644 Documentation/applications/examples/dronecan/index.rst create mode 100644 Documentation/applications/examples/elf/index.rst create mode 100644 Documentation/applications/examples/embedlog/index.rst create mode 100644 Documentation/applications/examples/esp32_himem/index.rst create mode 100644 Documentation/applications/examples/etl/index.rst create mode 100644 Documentation/applications/examples/fb/index.rst create mode 100644 Documentation/applications/examples/fboverlay/index.rst create mode 100644 Documentation/applications/examples/flash_test/index.rst create mode 100644 Documentation/applications/examples/flowc/index.rst create mode 100644 Documentation/applications/examples/fmsynth/index.rst create mode 100644 Documentation/applications/examples/foc/index.rst create mode 100644 Documentation/applications/examples/ft80x/index.rst create mode 100644 Documentation/applications/examples/ftpc/index.rst create mode 100644 Documentation/applications/examples/ftpd/index.rst create mode 100644 Documentation/applications/examples/fxos8700cq_test/index.rst create mode 100644 Documentation/applications/examples/gpio/index.rst create mode 100644 Documentation/applications/examples/gps/index.rst create mode 100644 Documentation/applications/examples/hall/index.rst create mode 100644 Documentation/applications/examples/hdc1008_demo/index.rst create mode 100644 Documentation/applications/examples/hello/index.rst create mode 100644 Documentation/applications/examples/hello_nim/index.rst create mode 100644 Documentation/applications/examples/hello_rust/index.rst create mode 100644 Documentation/applications/examples/hello_wasm/index.rst create mode 100644 Documentation/applications/examples/hello_zig/index.rst create mode 100644 Documentation/applications/examples/helloxx/index.rst create mode 100644 Documentation/applications/examples/hidkbd/index.rst create mode 100644 Documentation/applications/examples/hts221_reader/index.rst create mode 100644 Documentation/applications/examples/i2cchar/index.rst create mode 100644 Documentation/applications/examples/i2sloop/index.rst create mode 100644 Documentation/applications/examples/igmp/index.rst create mode 100644 Documentation/applications/examples/ina219/index.rst create mode 100644 Documentation/applications/examples/ina226/index.rst create mode 100644 Documentation/applications/examples/index.rst create mode 100644 Documentation/applications/examples/ini_dumper/index.rst create mode 100644 Documentation/applications/examples/ipcfg/index.rst create mode 100644 Documentation/applications/examples/ipforward/index.rst create mode 100644 Documentation/applications/examples/json/index.rst create mode 100644 Documentation/applications/examples/keyboard/index.rst create mode 100644 Documentation/applications/examples/leds/index.rst create mode 100644 Documentation/applications/examples/libtest/index.rst create mode 100644 Documentation/applications/examples/lis3dsh_reader/index.rst create mode 100644 Documentation/applications/examples/lp503x/index.rst create mode 100644 Documentation/applications/examples/lsm303_reader/index.rst create mode 100644 Documentation/applications/examples/lsm6dsl_reader/index.rst create mode 100644 Documentation/applications/examples/ltr308/index.rst create mode 100644 Documentation/applications/examples/lua_module/index.rst create mode 100644 Documentation/applications/examples/lvgldemo/index.rst create mode 100644 Documentation/applications/examples/lvglterm/index.rst create mode 100644 Documentation/applications/examples/max31855/index.rst create mode 100644 Documentation/applications/examples/mcuboot/index.rst create mode 100644 Documentation/applications/examples/media/index.rst create mode 100644 Documentation/applications/examples/mld/index.rst create mode 100644 Documentation/applications/examples/mlx90614/index.rst create mode 100644 Documentation/applications/examples/mml_parser/index.rst create mode 100644 Documentation/applications/examples/modbus/index.rst create mode 100644 Documentation/applications/examples/modbusmaster/index.rst create mode 100644 Documentation/applications/examples/module/index.rst create mode 100644 Documentation/applications/examples/mount/index.rst create mode 100644 Documentation/applications/examples/mqttc/index.rst create mode 100644 Documentation/applications/examples/mtdpart/index.rst create mode 100644 Documentation/applications/examples/mtdrwb/index.rst create mode 100644 Documentation/applications/examples/netlink_route/index.rst create mode 100644 Documentation/applications/examples/netloop/index.rst create mode 100644 Documentation/applications/examples/netpkt/index.rst create mode 100644 Documentation/applications/examples/nettest/index.rst create mode 100644 Documentation/applications/examples/nimble/index.rst create mode 100644 Documentation/applications/examples/nng_test/index.rst create mode 100644 Documentation/applications/examples/noteprintf/index.rst create mode 100644 Documentation/applications/examples/nrf24l01_btle/index.rst create mode 100644 Documentation/applications/examples/nrf24l01_term/index.rst create mode 100644 Documentation/applications/examples/null/index.rst create mode 100644 Documentation/applications/examples/nunchuck/index.rst create mode 100644 Documentation/applications/examples/nx/index.rst create mode 100644 Documentation/applications/examples/nxdemo/index.rst create mode 100644 Documentation/applications/examples/nxflat/index.rst create mode 100644 Documentation/applications/examples/nxhello/index.rst create mode 100644 Documentation/applications/examples/nximage/index.rst create mode 100644 Documentation/applications/examples/nxlines/index.rst create mode 100644 Documentation/applications/examples/nxscope/index.rst create mode 100644 Documentation/applications/examples/nxterm/index.rst create mode 100644 Documentation/applications/examples/nxtext/index.rst create mode 100644 Documentation/applications/examples/obd2/index.rst create mode 100644 Documentation/applications/examples/oneshot/index.rst create mode 100644 Documentation/applications/examples/opencyphal/index.rst create mode 100644 Documentation/applications/examples/pca9635/index.rst create mode 100644 Documentation/applications/examples/pdcurses/index.rst create mode 100644 Documentation/applications/examples/pf_ieee802154/index.rst create mode 100644 Documentation/applications/examples/pipe/index.rst create mode 100644 Documentation/applications/examples/poll/index.rst create mode 100644 Documentation/applications/examples/popen/index.rst create mode 100644 Documentation/applications/examples/posix_spawn/index.rst create mode 100644 Documentation/applications/examples/powerled/index.rst create mode 100644 Documentation/applications/examples/powermonitor/index.rst create mode 100644 Documentation/applications/examples/pppd/index.rst create mode 100644 Documentation/applications/examples/pty_test/index.rst create mode 100644 Documentation/applications/examples/pwfb/index.rst create mode 100644 Documentation/applications/examples/pwlines/index.rst create mode 100644 Documentation/applications/examples/pwm/index.rst create mode 100644 Documentation/applications/examples/qencoder/index.rst create mode 100644 Documentation/applications/examples/random/index.rst create mode 100644 Documentation/applications/examples/relays/index.rst create mode 100644 Documentation/applications/examples/rfid_readuid/index.rst create mode 100644 Documentation/applications/examples/rgbled/index.rst create mode 100644 Documentation/applications/examples/romfs/index.rst create mode 100644 Documentation/applications/examples/rpmsgsocket/index.rst create mode 100644 Documentation/applications/examples/sendmail/index.rst create mode 100644 Documentation/applications/examples/serialblaster/index.rst create mode 100644 Documentation/applications/examples/serialrx/index.rst create mode 100644 Documentation/applications/examples/serloop/index.rst create mode 100644 Documentation/applications/examples/shm_test/index.rst create mode 100644 Documentation/applications/examples/sht3x/index.rst create mode 100644 Documentation/applications/examples/slcd/index.rst create mode 100644 Documentation/applications/examples/smps/index.rst create mode 100644 Documentation/applications/examples/sotest/index.rst create mode 100644 Documentation/applications/examples/stat/index.rst create mode 100644 Documentation/applications/examples/sx127x_demo/index.rst create mode 100644 Documentation/applications/examples/system/index.rst create mode 100644 Documentation/applications/examples/tcp_ipc_client/index.rst create mode 100644 Documentation/applications/examples/tcp_ipc_server/index.rst create mode 100644 Documentation/applications/examples/tcpblaster/index.rst create mode 100644 Documentation/applications/examples/tcpecho/index.rst create mode 100644 Documentation/applications/examples/telnetd/index.rst create mode 100644 Documentation/applications/examples/termios/index.rst create mode 100644 Documentation/applications/examples/thttpd/index.rst create mode 100644 Documentation/applications/examples/tiff/index.rst create mode 100644 Documentation/applications/examples/timer/index.rst create mode 100644 Documentation/applications/examples/timer_gpio/index.rst create mode 100644 Documentation/applications/examples/touchscreen/index.rst create mode 100644 Documentation/applications/examples/udgram/index.rst create mode 100644 Documentation/applications/examples/udp/index.rst create mode 100644 Documentation/applications/examples/udpblaster/index.rst create mode 100644 Documentation/applications/examples/uid/index.rst create mode 100644 Documentation/applications/examples/unionfs/index.rst create mode 100644 Documentation/applications/examples/usbserial/index.rst create mode 100644 Documentation/applications/examples/userfs/index.rst create mode 100644 Documentation/applications/examples/usrsocktest/index.rst create mode 100644 Documentation/applications/examples/ustream/index.rst create mode 100644 Documentation/applications/examples/veml6070/index.rst create mode 100644 Documentation/applications/examples/watchdog/index.rst create mode 100644 Documentation/applications/examples/watcher/index.rst create mode 100644 Documentation/applications/examples/webserver/index.rst create mode 100644 Documentation/applications/examples/wget/index.rst create mode 100644 Documentation/applications/examples/wgetjson/index.rst create mode 100644 Documentation/applications/examples/wiegand/index.rst create mode 100644 Documentation/applications/examples/ws2812/index.rst create mode 100644 Documentation/applications/examples/ws2812esp32rmt/index.rst create mode 100644 Documentation/applications/examples/xbc_test/index.rst create mode 100644 Documentation/applications/examples/xmlrpc/index.rst create mode 100644 Documentation/applications/examples/zerocross/index.rst diff --git a/Documentation/applications/examples/abntcodi/index.rst b/Documentation/applications/examples/abntcodi/index.rst new file mode 100644 index 0000000000..4c8c895985 --- /dev/null +++ b/Documentation/applications/examples/abntcodi/index.rst @@ -0,0 +1,4 @@ +``abntcodi`` ABNT CODI example +============================== + +ABNT CODI example diff --git a/Documentation/applications/examples/adc/index.rst b/Documentation/applications/examples/adc/index.rst new file mode 100644 index 0000000000..c257fededc --- /dev/null +++ b/Documentation/applications/examples/adc/index.rst @@ -0,0 +1,22 @@ +``adc`` Read from ADC +===================== + +A mindlessly simple test of an ADC devices. It simply reads from the ADC device +and dumps the data to the console forever. + +This test depends on these specific ADC/NSH configurations settings (your +specific ADC settings might require additional settings). + +- ``CONFIG_ADC`` – Enabled ADC support. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the ADC test as an NSH built-in function. + Default: Built as a standalone program. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_ADC_DEVPATH`` – The default path to the ADC device. Default: + ``/dev/adc0``. +- ``CONFIG_EXAMPLES_ADC_NSAMPLES`` – This number of samples is collected and the + program terminates. Default: Samples are collected indefinitely. +- ``CONFIG_EXAMPLES_ADC_GROUPSIZE`` – The number of samples to read at once. + Default: ``4``. + diff --git a/Documentation/applications/examples/adjtime/index.rst b/Documentation/applications/examples/adjtime/index.rst new file mode 100644 index 0000000000..0dc641b88f --- /dev/null +++ b/Documentation/applications/examples/adjtime/index.rst @@ -0,0 +1,6 @@ +``adjtime`` Ajdtime function example +==================================== + +This application demonstrates the usage of adjtime() interface used to +synchronize system clock time if its value varies from real time (usually get by +external RTC). diff --git a/Documentation/applications/examples/adxl372_test/index.rst b/Documentation/applications/examples/adxl372_test/index.rst new file mode 100644 index 0000000000..9cefb5223e --- /dev/null +++ b/Documentation/applications/examples/adxl372_test/index.rst @@ -0,0 +1,4 @@ +``adxl372_test`` ADXL372 test program +===================================== + +ADXL372 test program diff --git a/Documentation/applications/examples/ajoystick/index.rst b/Documentation/applications/examples/ajoystick/index.rst new file mode 100644 index 0000000000..5c2688fdba --- /dev/null +++ b/Documentation/applications/examples/ajoystick/index.rst @@ -0,0 +1,16 @@ +``ajoystick`` Analog Joystick +============================= + +This is a simple test of the analog joystick driver. See details about this +driver in ``nuttx/include/nuttx/input/ajoystick.h``. + +Configuration Pre-requisites: + +- ``CONFIG_AJOYSTICK`` – The analog joystick driver. + +Example Configuration: +- ``CONFIG_EXAMPLES_AJOYSTICK`` – Enabled the analog joystick example. +- ``CONFIG_EXAMPLES_AJOYSTICK_DEVNAME`` – Joystick device name. Default: ``/dev/adjoy0``. +- ``CONFIG_EXAMPLES_AJOYSTICK_SIGNO`` – Signal used to signal the test +application. Default: ``32``. + diff --git a/Documentation/applications/examples/alarm/index.rst b/Documentation/applications/examples/alarm/index.rst new file mode 100644 index 0000000000..44e50ab53c --- /dev/null +++ b/Documentation/applications/examples/alarm/index.rst @@ -0,0 +1,20 @@ +``alarm`` RTC Alarm +=================== + +A simple example that tests the alarm IOCTLs of the RTC driver. + +Dependencies: + +- ``CONFIG_RTC_DRIVER`` – RTC driver must be initialized to allow user space + access to the RTC. +- ``CONFIG_RTC_ALARM`` – Support for RTC alarms must be enabled. + +Configuration: + +- ``CONFIG_EXAMPLES_ALARM`` – Enable the RTC driver alarm test. +- ``CONFIG_EXAMPLES_ALARM_PROGNAME`` – This is the name of the program that will + be used when the NSH ELF program is installed. +- ``CONFIG_EXAMPLES_ALARM_PRIORITY`` – Alarm daemon priority. +- ``CONFIG_EXAMPLES_ALARM_STACKSIZE`` – Alarm daemon stack size. +- ``CONFIG_EXAMPLES_ALARM_DEVPATH`` – RTC device path (``/dev/rtc0``). +- ``CONFIG_EXAMPLES_ALARM_SIGNO`` – Alarm signal. diff --git a/Documentation/applications/examples/apa102/index.rst b/Documentation/applications/examples/apa102/index.rst new file mode 100644 index 0000000000..de9c91ad13 --- /dev/null +++ b/Documentation/applications/examples/apa102/index.rst @@ -0,0 +1,4 @@ +``apa102`` Rainbow on ``APA102`` LED Strip +========================================== + +Rainbow example for ``APA102`` LED Strip. diff --git a/Documentation/applications/examples/apds9960/index.rst b/Documentation/applications/examples/apds9960/index.rst new file mode 100644 index 0000000000..ae1037eda0 --- /dev/null +++ b/Documentation/applications/examples/apds9960/index.rst @@ -0,0 +1,5 @@ +``apds9960`` APDS-9960 test pplication +====================================== + +APDS-9960 Test Application. + diff --git a/Documentation/applications/examples/audio_rttl/index.rst b/Documentation/applications/examples/audio_rttl/index.rst new file mode 100644 index 0000000000..2c43788199 --- /dev/null +++ b/Documentation/applications/examples/audio_rttl/index.rst @@ -0,0 +1,4 @@ +``audio_rttl`` Audio tone generator +=================================== + +Audio tone generator example (RTTL player). diff --git a/Documentation/applications/examples/bastest/index.rst b/Documentation/applications/examples/bastest/index.rst new file mode 100644 index 0000000000..023db369be --- /dev/null +++ b/Documentation/applications/examples/bastest/index.rst @@ -0,0 +1,16 @@ +``bastest`` Bas BASIC Interpreter +================================= + +This directory contains a small program that will mount a ROMFS file system +containing the BASIC test files extracted from the Bas ``2.4`` release. See +``examples/bastest/README.md`` for licensing and usage information. + +- ``CONFIG_EXAMPLES_BASTEST_DEVMINOR`` – The minor device number of the ROMFS + block driver. For example, the ``N`` in ``/dev/ramN``. Used for registering the + RAM block driver that will hold the ROMFS file system containing the BASIC + files to be tested. Default: ``0``. + +- ``CONFIG_EXAMPLES_BASTEST_DEVPATH`` – The path to the ROMFS block driver device. + This must match ``EXAMPLES_BASTEST_DEVMINOR``. Used for registering the RAM + block driver that will hold the ROMFS file system containing the BASIC files + to be tested. Default: ``/dev/ram0``. diff --git a/Documentation/applications/examples/battery/index.rst b/Documentation/applications/examples/battery/index.rst new file mode 100644 index 0000000000..2ecd9918e0 --- /dev/null +++ b/Documentation/applications/examples/battery/index.rst @@ -0,0 +1,4 @@ +``battery`` Battery monitor example +=================================== + +Battery monitor example. diff --git a/Documentation/applications/examples/bme680/index.rst b/Documentation/applications/examples/bme680/index.rst new file mode 100644 index 0000000000..f444642697 --- /dev/null +++ b/Documentation/applications/examples/bme680/index.rst @@ -0,0 +1,4 @@ +``bme680`` BME680 sensor example +================================ + +BME680 sensor example. diff --git a/Documentation/applications/examples/bmi160/index.rst b/Documentation/applications/examples/bmi160/index.rst new file mode 100644 index 0000000000..c6a641ea8f --- /dev/null +++ b/Documentation/applications/examples/bmi160/index.rst @@ -0,0 +1,4 @@ +``bmi160`` BMI160 sensor example +================================ + +BMI160 sensor example. diff --git a/Documentation/applications/examples/bmp180/index.rst b/Documentation/applications/examples/bmp180/index.rst new file mode 100644 index 0000000000..9284aaa285 --- /dev/null +++ b/Documentation/applications/examples/bmp180/index.rst @@ -0,0 +1,4 @@ +``bmp180`` BMP180 Barometer sensor example +========================================== + +BMP180 Barometer sensor example. diff --git a/Documentation/applications/examples/bmp280/index.rst b/Documentation/applications/examples/bmp280/index.rst new file mode 100644 index 0000000000..57361e4f01 --- /dev/null +++ b/Documentation/applications/examples/bmp280/index.rst @@ -0,0 +1,4 @@ +``bmp280`` BMP280 Barometer sensor example +========================================== + +BMP280 Barometer sensor example. diff --git a/Documentation/applications/examples/bridge/index.rst b/Documentation/applications/examples/bridge/index.rst new file mode 100644 index 0000000000..92b8d19e3c --- /dev/null +++ b/Documentation/applications/examples/bridge/index.rst @@ -0,0 +1,40 @@ +``bridge`` Network Bridge +========================= + +A simple test of a system with multiple networks. It simply echoes all UDP +packets received on network ``1`` and network ``2`` to network ``2`` and network ``1``, +respectively. Interface ``1`` and interface may or may not lie on the same +network. + +- ``CONFIG_EXAMPLES_BRIDGE`` – Enables the simple UDP bridge test. + +There identical configurations for each of the two networks, ``NETn`` where ``n`` +refers to the network being configured ``n={1,2}``. Let ``m`` refer to the other +network. + +- ``CONFIG_EXAMPLES_BRIDGE_NETn_IFNAME`` – The register name of the network ``n`` + device. Must match the previously registered driver name and must not be the + same as other network device name, ``CONFIG_EXAMPLES_BRIDGE_NETm_IFNAME``. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_RECVPORT`` – Network ``n`` listen port number. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_SNDPORT`` – Network ``2`` send port number. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_IOBUFIZE`` – Size of the network ``n`` UDP + send/receive I/O buffer. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_STACKSIZE`` – Network ``n`` daemon stacksize. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_PRIORITY`` – Network ``n`` daemon task priority. + +If used as a NSH add-on, then it is assumed that initialization of both networks +was performed externally prior to the time that this test was started. +Otherwise, the following options are available: + +- ``CONFIG_EXAMPLES_BRIDGE_NETn_NOMAC`` – Select of the network ``n`` hardware does + not have a built-in MAC address. If selected, the MAC address. provided by + ``CONFIG_EXAMPLES_BRIDGE_NETn_MACADDR`` will be used to assign the MAC address + to the network n device. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_DHCPC`` – Use DHCP Client to get the network n IP + address. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_IPADDR`` – If ``CONFIG_EXAMPLES_BRIDGE_NETn_DHCPC`` + is not selected, then this is the fixed IP address for network ``n``. +- ``CONFIG_EXAMPLES_BRIDGE_NETn_DRIPADDR`` – Network ``n`` default router IP address + (Gateway). +- ``CONFIG_EXAMPLES_BRIDGE_NETn_NETMASK`` – Network ``n`` mask. + diff --git a/Documentation/applications/examples/buttons/index.rst b/Documentation/applications/examples/buttons/index.rst new file mode 100644 index 0000000000..61074e920f --- /dev/null +++ b/Documentation/applications/examples/buttons/index.rst @@ -0,0 +1,4 @@ +``buttons`` Read GPIO Buttons +============================= + +Buttons driver example. diff --git a/Documentation/applications/examples/calib_udelay/index.rst b/Documentation/applications/examples/calib_udelay/index.rst new file mode 100644 index 0000000000..b51f622992 --- /dev/null +++ b/Documentation/applications/examples/calib_udelay/index.rst @@ -0,0 +1,4 @@ +``calib_udelay`` Calibration tool for udelay +============================================= + +Calibration tool for udelay. diff --git a/Documentation/applications/examples/camera/index.rst b/Documentation/applications/examples/camera/index.rst new file mode 100644 index 0000000000..56343d7340 --- /dev/null +++ b/Documentation/applications/examples/camera/index.rst @@ -0,0 +1,40 @@ +``camera`` Camera Snapshot +========================== + +This sample is implemented as ``camera`` command on NuttX Shell. The synopsis of +the command is as below.:: + + nsh> camera ([-jpg]) ([capture num]) + + -jpg : this option is set for storing JPEG file into a strage. + : If this option isn't set capturing raw RGB565 data in a file. + : raw RGB565 is default. + + capture num : this option instructs number of taking pictures. + : 10 is default. + +Storage will be selected automatically based on the available storage option. + +Execution example:: + + nsh> camera + nximage_listener: Connected + nximage_initialize: Screen resolution (320,240) + Take 10 pictures as RGB file in /mnt/sd0 after 5 seconds. + After finishing taking pictures, this app will be finished after 10 seconds. + Expier time is pasted. + Start capturing... + FILENAME:/mnt/sd0/VIDEO001.RGB + FILENAME:/mnt/sd0/VIDEO002.RGB + FILENAME:/mnt/sd0/VIDEO003.RGB + FILENAME:/mnt/sd0/VIDEO004.RGB + FILENAME:/mnt/sd0/VIDEO005.RGB + FILENAME:/mnt/sd0/VIDEO006.RGB + FILENAME:/mnt/sd0/VIDEO007.RGB + FILENAME:/mnt/sd0/VIDEO008.RGB + FILENAME:/mnt/sd0/VIDEO009.RGB + FILENAME:/mnt/sd0/VIDEO010.RGB + Finished capturing... + Expier time is pasted. + nximage_listener: Lost server connection: 117 + diff --git a/Documentation/applications/examples/can/index.rst b/Documentation/applications/examples/can/index.rst new file mode 100644 index 0000000000..2165e14a18 --- /dev/null +++ b/Documentation/applications/examples/can/index.rst @@ -0,0 +1,29 @@ +``can`` CAN Device Test +======================= + +If the CAN device is configured in loopback mode, then this example can be used +to test the CAN device in loop back mode. It simple sinces a sequence of CAN +messages and verifies that those messages are returned exactly as sent. + +This test depends on these specific CAN/NSH configurations settings (your +specific CAN settings might require additional settings). + +- ``CONFIG_CAN`` – Enables CAN support. +- ``CONFIG_CAN_LOOPBACK`` – A CAN driver may or may not support a loopback mode + for testing. The STM32 CAN driver does support loopback mode. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the CAN test as an NSH built-in function. + Default: Built as a standalone program. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_CAN_DEVPATH`` – The path to the CAN device. Default: + ``/dev/can0``. +- ``CONFIG_EXAMPLES_CAN_NMSGS`` – This number of CAN message is collected and the + program terminates. Default: messages are sent and received indefinitely. + +The default behavior assumes loopback mode. Messages are sent, then read and +verified. The behavior can be altered for other kinds of testing where the test +only sends or received (but does not verify) can messages. + +- ``CONFIG_EXAMPLES_CAN_READONLY`` – Only receive messages. +- ``CONFIG_EXAMPLES_CAN_WRITEONLY`` – Only send messages. diff --git a/Documentation/applications/examples/capture/index.rst b/Documentation/applications/examples/capture/index.rst new file mode 100644 index 0000000000..5d5d4e5d65 --- /dev/null +++ b/Documentation/applications/examples/capture/index.rst @@ -0,0 +1,4 @@ +``capture`` PWM Capture example +=============================== + +PWM Capture example. diff --git a/Documentation/applications/examples/cbortest/index.rst b/Documentation/applications/examples/cbortest/index.rst new file mode 100644 index 0000000000..7a22961bff --- /dev/null +++ b/Documentation/applications/examples/cbortest/index.rst @@ -0,0 +1,4 @@ +``cbortest`` TinyCBOR Test Example +================================== + +TinyCBOR Test Example diff --git a/Documentation/applications/examples/cctype/index.rst b/Documentation/applications/examples/cctype/index.rst new file mode 100644 index 0000000000..fd5f8ec45e --- /dev/null +++ b/Documentation/applications/examples/cctype/index.rst @@ -0,0 +1,4 @@ +``cctype`` Verify C++ cctype operations +======================================= + +Verifies all possible inputs for all functions defined in the header file ``cctype``. diff --git a/Documentation/applications/examples/chat/index.rst b/Documentation/applications/examples/chat/index.rst new file mode 100644 index 0000000000..a0712f1c45 --- /dev/null +++ b/Documentation/applications/examples/chat/index.rst @@ -0,0 +1,16 @@ +``chat`` AT over TTY +==================== + +Demonstrates AT chat functionality over a TTY device. This is useful with AT +modems, for example, to establish a ``pppd`` connection (see the related ``pppd`` +example). Moreover, some AT modems – such as ones made by u-blox – have an +internal TCP/IP stack, often with an implementation of TLS/SSL. In such cases +the chat utility can be used to configure the internal TCP/IP stack, establish +socket connections, set up security (e.g., download base64-encoded certificates +to the modem), and perform data exchange through sockets over the TTY device. + +Useful configuration parameters: + +- ``CONFIG_EXAMPLES_CHAT_PRESET[0..3]`` – preset chat scripts. +- ``CONFIG_EXAMPLES_CHAT_TTY_DEVNODE`` – TTY device node name. +- ``CONFIG_EXAMPLES_CHAT_TIMEOUT_SECONDS`` – default receive timeout. diff --git a/Documentation/applications/examples/chrono/index.rst b/Documentation/applications/examples/chrono/index.rst new file mode 100644 index 0000000000..d0f89d5942 --- /dev/null +++ b/Documentation/applications/examples/chrono/index.rst @@ -0,0 +1,4 @@ +``chrono`` Chronometer example to use with STM32LDiscover +========================================================= + +Chronometer example to use with STM32LDiscover. diff --git a/Documentation/applications/examples/configdata/index.rst b/Documentation/applications/examples/configdata/index.rst new file mode 100644 index 0000000000..20af13554c --- /dev/null +++ b/Documentation/applications/examples/configdata/index.rst @@ -0,0 +1,4 @@ +``configdata`` Config Data example / unit test +============================================== + +This is a Unit Test for the MTD configuration data driver. diff --git a/Documentation/applications/examples/cordic/index.rst b/Documentation/applications/examples/cordic/index.rst new file mode 100644 index 0000000000..16b9abd0a6 --- /dev/null +++ b/Documentation/applications/examples/cordic/index.rst @@ -0,0 +1,4 @@ +``cordic`` CORDIC driver example +================================ + +A simple test of the CORDIC character driver. diff --git a/Documentation/applications/examples/cpuhog/index.rst b/Documentation/applications/examples/cpuhog/index.rst new file mode 100644 index 0000000000..c63f407c3b --- /dev/null +++ b/Documentation/applications/examples/cpuhog/index.rst @@ -0,0 +1,6 @@ +``cpuhog`` Keep CPU Busy +======================== + +Attempts to keep the system busy by passing data through a pipe in loop back +mode. This may be useful if you are trying run down other problems that you +think might only occur when the system is very busy. diff --git a/Documentation/applications/examples/cromfs/index.rst b/Documentation/applications/examples/cromfs/index.rst new file mode 100644 index 0000000000..9c1493fcba --- /dev/null +++ b/Documentation/applications/examples/cromfs/index.rst @@ -0,0 +1,4 @@ +``cromfs`` CROMFS Example +========================= + +CROMFS Example. diff --git a/Documentation/applications/examples/dac/index.rst b/Documentation/applications/examples/dac/index.rst new file mode 100644 index 0000000000..c006913ccc --- /dev/null +++ b/Documentation/applications/examples/dac/index.rst @@ -0,0 +1,4 @@ +``dac`` Write to DAC +==================== + +This is a tool for writing values to DAC device. diff --git a/Documentation/applications/examples/dhcpd/index.rst b/Documentation/applications/examples/dhcpd/index.rst new file mode 100644 index 0000000000..598519eb99 --- /dev/null +++ b/Documentation/applications/examples/dhcpd/index.rst @@ -0,0 +1,23 @@ +``dhcpd`` DHCP Server +===================== + +This examples builds a tiny DHCP server for the target system. + +**Note**: For test purposes, this example can be built as a host-based DHCPD +server. This can be built as follows:: + + cd examples/dhcpd + make -f Makefile.host TOPDIR= + +NuttX configuration settings: + +- ``CONFIG_NET=y`` – of course. +- ``CONFIG_NET_UDP=y`` – UDP support is required for DHCP (as well as various + other UDP-related configuration settings). +- ``CONFIG_NET_BROADCAST=y`` – UDP broadcast support is needed. +- ``CONFIG_NETUTILS_NETLIB=y`` – The networking library is needed. +- ``CONFIG_EXAMPLES_DHCPD_NOMAC`` – (May be defined to use software assigned MAC) + +See also ``CONFIG_NETUTILS_DHCPD_*`` settings described elsewhere and used in +``netutils/dhcpd/dhcpd.c``. These settings are required to described the behavior +of the daemon. diff --git a/Documentation/applications/examples/discover/index.rst b/Documentation/applications/examples/discover/index.rst new file mode 100644 index 0000000000..aec1a9b3a1 --- /dev/null +++ b/Documentation/applications/examples/discover/index.rst @@ -0,0 +1,21 @@ +``discover`` UDP Discover Daemon +================================ + +This example exercises ``netutils/discover`` utility. This example initializes and +starts the UDP discover daemon. This daemon is useful for discovering devices in +local networks, especially with DHCP configured devices. It listens for UDP +broadcasts which also can include a device class so that groups of devices can +be discovered. It is also possible to address all classes with a kind of +broadcast discover. + +This example will automatically be built as an NSH built-in if +``CONFIG_NSH_BUILTIN_APPS`` is selected. Otherwise, it will be a standalone +program with entry point ``discover_main``. + +NuttX configuration settings: + +- ``CONFIG_EXAMPLES_DISCOVER_DHCPC`` – DHCP Client. +- ``CONFIG_EXAMPLES_DISCOVER_NOMAC`` – Use canned MAC address. +- ``CONFIG_EXAMPLES_DISCOVER_IPADDR`` – Target IP address. +- ``CONFIG_EXAMPLES_DISCOVER_DRIPADDR`` – Router IP address. +- ``CONFIG_EXAMPLES_DISCOVER_NETMASK`` – Network Mask. diff --git a/Documentation/applications/examples/djoystick/index.rst b/Documentation/applications/examples/djoystick/index.rst new file mode 100644 index 0000000000..182fdd789e --- /dev/null +++ b/Documentation/applications/examples/djoystick/index.rst @@ -0,0 +1,17 @@ +``djoystick`` Discrete Joystick +=============================== + +This is a simple test of the discrete joystick driver. See details about this +driver in ``nuttx/include/nuttx/input/djoystick.h``. + +Configuration Pre-requisites: + +- ``CONFIG_INPUT_DJOYSTICK`` – The discrete joystick driver. + +Example Configuration: + +- ``CONFIG_EXAMPLES_DJOYSTICK`` – Enabled the discrete joystick example. +- ``CONFIG_EXAMPLES_DJOYSTICK_DEVNAME`` – Joystick device name. Default + ``/dev/djoy0``. +- ``CONFIG_EXAMPLES_DJOYSTICK_SIGNO`` – Signal used to signal the test + application. Default ``32``. diff --git a/Documentation/applications/examples/dronecan/index.rst b/Documentation/applications/examples/dronecan/index.rst new file mode 100644 index 0000000000..b0865652b5 --- /dev/null +++ b/Documentation/applications/examples/dronecan/index.rst @@ -0,0 +1,4 @@ +``dronecan`` DroneCAN example +============================= + +DroneCAN example. diff --git a/Documentation/applications/examples/elf/index.rst b/Documentation/applications/examples/elf/index.rst new file mode 100644 index 0000000000..3463c19714 --- /dev/null +++ b/Documentation/applications/examples/elf/index.rst @@ -0,0 +1,61 @@ +``elf`` ELF loader +================== + +This example builds a small ELF loader test case. This includes several test +programs under ``examples/elf`` tests. These tests are build using the relocatable +ELF format and installed in a ROMFS file system. At run time, each program in +the ROMFS file system is executed. Requires ``CONFIG_ELF``. Other configuration +options: + +- ``CONFIG_EXAMPLES_ELF_DEVMINOR`` – The minor device number of the ROMFS block + driver. For example, the ``N`` in ``/dev/ramN``. Used for registering the RAM + block driver that will hold the ROMFS file system containing the ELF + executables to be tested. Default: ``0``. + +- ``CONFIG_EXAMPLES_ELF_DEVPATH`` – The path to the ROMFS block driver device. + This must match ``EXAMPLES_ELF_DEVMINOR``. Used for registering the RAM block + driver that will hold the ROMFS file system containing the ELF executables to + be tested. Default: ``/dev/ram0``. + +**Notes**: + +1. ``CFLAGS`` should be provided in ``CELFFLAGS``. RAM and FLASH memory regions may + require long allcs. For ARM, this might be:: + + CELFFLAGS = $(CFLAGS) -mlong-calls + + Similarly for C++ flags which must be provided in ``CXXELFFLAGS``. + +2. Your top-level ``nuttx/Make.defs`` file must also include an appropriate + definition, ``LDELFFLAGS``, to generate a relocatable ELF object. With GNU LD, + this should include ``-r`` and ``-e main`` (or ``_main`` on some platforms).:: + + LDELFFLAGS = -r -e main + + If you use GCC to link, you make also need to include ``-nostdlib``. + +3. This example also requires ``genromfs``. ``genromfs`` can be build as part of the + nuttx toolchain. Or can built from the ``genromfs`` sources that can be found + in the NuttX tools repository (``genromfs-0.5.2.tar.gz``). In any event, the + ``PATH`` variable must include the path to the genromfs executable. + +4. ELF size: The ELF files in this example are, be default, quite large because + they include a lot of build garbage. You can greatly reduce the size of the + ELF binaries are using the ``objcopy --strip-unneeded`` command to remove + un-necessary information from the ELF files. + +5. Simulator. You cannot use this example with the NuttX simulator on Cygwin. + That is because the Cygwin GCC does not generate ELF file but rather some + Windows-native binary format. + + If you really want to do this, you can create a NuttX x86 buildroot toolchain + and use that be build the ELF executables for the ROMFS file system. + +6. Linker scripts. You might also want to use a linker scripts to combine + sections better. An example linker script is at + ``nuttx/binfmt/libelf/gnu-elf.ld``. That example might have to be tuned for + your particular linker output to position additional sections correctly. The + GNU LD ``LDELFFLAGS`` then might be:: + + LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/libelf/gnu-elf.ld + diff --git a/Documentation/applications/examples/embedlog/index.rst b/Documentation/applications/examples/embedlog/index.rst new file mode 100644 index 0000000000..b8c527763d --- /dev/null +++ b/Documentation/applications/examples/embedlog/index.rst @@ -0,0 +1,4 @@ +``embedlog`` embedlog example +============================= + +embedlog example. diff --git a/Documentation/applications/examples/esp32_himem/index.rst b/Documentation/applications/examples/esp32_himem/index.rst new file mode 100644 index 0000000000..942cb780a9 --- /dev/null +++ b/Documentation/applications/examples/esp32_himem/index.rst @@ -0,0 +1,4 @@ +``esp32_himem`` ESP32 HIMEM Example +=================================== + +ESP32 HIMEM Example. diff --git a/Documentation/applications/examples/etl/index.rst b/Documentation/applications/examples/etl/index.rst new file mode 100644 index 0000000000..241eaae82b --- /dev/null +++ b/Documentation/applications/examples/etl/index.rst @@ -0,0 +1,4 @@ +``etl`` Embedded Template Library (ETL) C++ example +=================================================== + +Embedded Template Library (ETL) C++ example diff --git a/Documentation/applications/examples/fb/index.rst b/Documentation/applications/examples/fb/index.rst new file mode 100644 index 0000000000..91fe778e37 --- /dev/null +++ b/Documentation/applications/examples/fb/index.rst @@ -0,0 +1,4 @@ +``fb`` Framebuffer +================== + +A simple test of the framebuffer character driver. diff --git a/Documentation/applications/examples/fboverlay/index.rst b/Documentation/applications/examples/fboverlay/index.rst new file mode 100644 index 0000000000..4cca8d170f --- /dev/null +++ b/Documentation/applications/examples/fboverlay/index.rst @@ -0,0 +1,4 @@ +``fboverlay`` Framebuffer overlay test tool +=========================================== + +Framebuffer overlay test tool. diff --git a/Documentation/applications/examples/flash_test/index.rst b/Documentation/applications/examples/flash_test/index.rst new file mode 100644 index 0000000000..fd0390ee2a --- /dev/null +++ b/Documentation/applications/examples/flash_test/index.rst @@ -0,0 +1,29 @@ +``flash_test`` SMART Flash test +=============================== + +Author: Ken Pettit, Date: April 24, 2013 + +This example performs a SMART flash block device test. This test performs a +sector allocate, read, write, free and garbage collection test on a SMART MTD +block device. + +- ``CONFIG_EXAMPLES_FLASH_TEST=y`` – Enables the FLASH Test. + +Dependencies: + +- ``CONFIG_MTD_SMART=y`` – SMART block driver support. +- ``CONFIG_BUILD_PROTECTED=n`` and ``CONFIG_BUILD_KERNEL=n`` – This test uses + internal OS interfaces and so is not available in the NUTTX kernel builds. + +This application performs a SMART flash block device test. This test performs a +sector allocate, read, write, free and garbage collection test on a SMART MTD +block device. This test can be built only as an NSH command + +**Note**: This test uses internal OS interfaces and so is not available in the +NUTTX kernel build:: + + Usage: + flash_test mtdblock_device + + Additional options: + --force to replace existing installation diff --git a/Documentation/applications/examples/flowc/index.rst b/Documentation/applications/examples/flowc/index.rst new file mode 100644 index 0000000000..c6bcbce5e7 --- /dev/null +++ b/Documentation/applications/examples/flowc/index.rst @@ -0,0 +1,18 @@ +``flowc`` Serial Hardware Flow Control +====================================== + +A simple test of serial hardware flow control. + +General Usage Instructions: + +1. The receiver side enter, start the receiver program. The receiver is now + waiting to receive data on the configured serial port. +2. On the sender side start the sender program. This will send data to the + receiver which will verify that no data is lost. + +On Linux, you can alternatively do:: + + $ stty -F /dev/ttyACM0 crtscts + $ cat testdata.dat >/dev/ttyACM0 + +where you need to replace ``/dev/ttyACM0`` with your selected serial device. diff --git a/Documentation/applications/examples/fmsynth/index.rst b/Documentation/applications/examples/fmsynth/index.rst new file mode 100644 index 0000000000..92c6772740 --- /dev/null +++ b/Documentation/applications/examples/fmsynth/index.rst @@ -0,0 +1,4 @@ +``fmsynth`` FM Synthesizer examples +=================================== + +FM Synthesizer examples. diff --git a/Documentation/applications/examples/foc/index.rst b/Documentation/applications/examples/foc/index.rst new file mode 100644 index 0000000000..5c2303553e --- /dev/null +++ b/Documentation/applications/examples/foc/index.rst @@ -0,0 +1,83 @@ +``foc`` FOC motor controller example +==================================== + +The main purpose of this example is to provide a universal template to +implement the motor controller based on the kernel-side FOC device and +the application-side FOC library. + +At the moment, this example implements a simple open-loop velocity controller. + +Hardware setup +-------------- + +This example has not yet implemented any mechanism to protect the +powered device. This means that there is no overtemeprature +protection, no overcurrent protection and no overvoltage protection. + +Make sure that you power the device properly and provide current +limits on your own so as not to break your hardware. + +Configuration +------------- + +The FOC PI current controller parameters can be obtained from the given +equations:: + + Kp = ccb * Ls; + pp = Rs / Ls; + Ki = pp * Kp * T; + +where: + - Kp - PI proportional coefficient + - Ki - PI integral coefficient + - Rs - average phase serial resistance + - Ls - average phase serial inductance + - pp - pole plant + - ccb - current control bandwidth + - T - sampling period + +Sample parameters for some commercially available motors +-------------------------------------------------------- + +========================== == ========== ========= ======= ===== +Motor model p Rs Ls i_max v_max +========================== == ========== ========= ======= ===== +Odrive D6374 150KV 7 0.0254 Ohm 8.73 uH ? ? +Linix 45ZWN24-40 2 0.5 Ohm 0.400 mH 2.34A 24V +Bull-Running BR2804-1700 7 0.11 Ohm 0.018 mH 1.2A 12V +iPower GBM2804H-100T 7 5.29 Ohm 1.05 mH 0.15A 12V +========================== == ========== ========= ======= ===== + +* Odrive D6374 150KV + +====== =========== ===== ======== ====== +f_PWM f_notifier ccb Kp Ki +====== =========== ===== ======== ====== +20kHz 10kHz 1000 0.0087 0.0025 +====== =========== ===== ======== ====== + + +* Linix 45ZWN24-40 (PMSM motor dedicated for NXP FRDM-MC-LVMTR kit) + +====== =========== ===== ======== ====== +f_PWM f_notifier ccb Kp Ki +====== =========== ===== ======== ====== +10kHz 5kHz 1000 0.4 0.1 +====== =========== ===== ======== ====== + +* Bull-Running BR2804-1700 kV (motor provided with the ST P-NUCLEO-IHM07 kit) + +====== =========== ===== ======== ====== +f_PWM f_notifier ccb Kp Ki +====== =========== ===== ======== ====== +20kHz 10kHz 200 0.036 0.022 +====== =========== ===== ======== ====== + + +* iPower GBM2804H-100T (gimbal motor provided with the ST P-NUCLEO-IHM03 kit) + +====== =========== ===== ======== ====== +f_PWM f_notifier ccb Kp Ki +====== =========== ===== ======== ====== +20kHz 10kHz TODO TODO TODO +====== =========== ===== ======== ====== diff --git a/Documentation/applications/examples/ft80x/index.rst b/Documentation/applications/examples/ft80x/index.rst new file mode 100644 index 0000000000..936dc38a1b --- /dev/null +++ b/Documentation/applications/examples/ft80x/index.rst @@ -0,0 +1,6 @@ +``ft80x`` FT80x GUI Chip +======================== + +This examples has ports of several FTDI demos for the FTDI/BridgeTek FT80x GUI +chip. As an example configuration, see +``nuttx/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig``. diff --git a/Documentation/applications/examples/ftpc/index.rst b/Documentation/applications/examples/ftpc/index.rst new file mode 100644 index 0000000000..9641f0bb5d --- /dev/null +++ b/Documentation/applications/examples/ftpc/index.rst @@ -0,0 +1,40 @@ +``ftpc`` FTP Client +=================== + +This is a simple FTP client shell used to exercise the capabilities of the FTPC +library (``apps/netutils/ftpc``). + +From NSH, the startup command sequence is as follows. This is only an example, +your configuration could have different mass storage devices, mount paths, and +FTP directories:: + + nsh> mount -t vfat /dev/mmcsd0 /tmp # Mount the SD card at /tmp + nsh> cd /tmp # cd into the /tmp directory + nsh> ftpc # Start the FTP client + nfc> login # Log into the FTP server + nfc> help # See a list of FTP commands + +where ```` is the IP address or hostname of the FTP server and ```` is +an optional port number. + +**Note**: By default, FTPC uses ``readline`` to get data from ``stdin``. So your +defconfig file must have the following build path:: + + CONFIG_SYSTEM_READLINE=y + +**Note**: If you use the ftpc task over a telnet NSH connection, then you should +set the following configuration item:: + + CONFIG_EXAMPLES_FTPC_FGETS=y + +By default, the FTPC client will use ``readline()`` to get characters from the +console. Readline includes and command-line editor and echos characters received +in stdin back through ``stdout``. Neither of these behaviors are desire-able if +Telnet is used. + +You may also want to define the following in your configuration file. Otherwise, +you will have not feedback about what is going on:: + + CONFIG_DEBUG_FEATURES=y + CONFIG_DEBUG_INFO=y + CONFIG_DEBUG_FTPC=y diff --git a/Documentation/applications/examples/ftpd/index.rst b/Documentation/applications/examples/ftpd/index.rst new file mode 100644 index 0000000000..c66d775e47 --- /dev/null +++ b/Documentation/applications/examples/ftpd/index.rst @@ -0,0 +1,55 @@ +``ftpd`` FTP daemon +=================== + +This example exercises the FTPD daemon at ``apps/netutils/ftpd``. Below are +configurations specific to the FTPD example (the FTPD daemon itself may require +other configuration options as well). + +- ``CONFIG_EXAMPLES_FTPD`` – Enable the FTPD example. +- ``CONFIG_EXAMPLES_FTPD_PRIO`` – Priority of the FTP daemon. Default: + ``SCHED_PRIORITY_DEFAULT``. +- ``CONFIG_EXAMPLES_FTPD_STACKSIZE`` – Stack size allocated for the FTP daemon. + Default: ``2048``. +- ``CONFIG_EXAMPLES_FTPD_NONETINIT`` – Define to suppress configuration of the + network by ``apps/examples/ftpd``. You would need to suppress network + configuration if the network is configuration prior to running the example. + +NSH always initializes the network so if ``CONFIG_NSH_NETINIT`` is defined, so is +``CONFIG_EXAMPLES_FTPD_NONETINIT`` (se it does not explicitly need to be defined +in that case): + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the FTPD daemon example test as an NSH + built-in function. By default the FTPD daemon will be built as a standalone + application. + +If ``CONFIG_EXAMPLES_FTPD_NONETINIT`` is not defined, then the following may be +specified to customized the network configuration: + +- ``CONFIG_EXAMPLES_FTPD_NOMAC`` – If the hardware has no MAC address of its own, + define this ``=y`` to provide a bogus address for testing. +- ``CONFIG_EXAMPLES_FTPD_IPADDR`` – The target IP address. Default ``10.0.0.2``. +- ``CONFIG_EXAMPLES_FTPD_DRIPADDR`` – The default router address. Default: + ``10.0.0.1``. +- ``CONFIG_EXAMPLES_FTPD_NETMASK`` – The network mask. Default: ``255.255.255.0``. + +TCP networking support is required. So are pthreads so this must be set to 'n': + +- ``CONFIG_DISABLE_PTHREAD`` – ``pthread`` support is required. + +Other FTPD configuration options they may be of interest: + +- ``CONFIG_FTPD_VENDORID`` – The vendor name to use in FTP communications. + Default: ``NuttX``. +- ``CONFIG_FTPD_SERVERID`` – The server name to use in FTP communications. + Default: ``NuttX FTP Server``. +- ``CONFIG_FTPD_CMDBUFFERSIZE`` – The maximum size of one command. Default: ``512`` + bytes. +- ``CONFIG_FTPD_DATABUFFERSIZE`` – The size of the I/O buffer for data transfers. + Default: ``2048`` bytes. +- ``CONFIG_FTPD_WORKERSTACKSIZE`` – The stacksize to allocate for each FTP daemon + worker thread. Default: ``2048`` bytes. + +The following netutils libraries should be enabled in your ``defconfig`` file: :: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETUTILS_FTPD=y diff --git a/Documentation/applications/examples/fxos8700cq_test/index.rst b/Documentation/applications/examples/fxos8700cq_test/index.rst new file mode 100644 index 0000000000..d2cd149341 --- /dev/null +++ b/Documentation/applications/examples/fxos8700cq_test/index.rst @@ -0,0 +1,4 @@ +``fxos8700cq_test`` +=================== + +TODO diff --git a/Documentation/applications/examples/gpio/index.rst b/Documentation/applications/examples/gpio/index.rst new file mode 100644 index 0000000000..2a6c70f57b --- /dev/null +++ b/Documentation/applications/examples/gpio/index.rst @@ -0,0 +1,4 @@ +``gpio`` GPIO Read and Write +---------------------------- + +A simple ``test/example`` of the NuttX GPIO driver. diff --git a/Documentation/applications/examples/gps/index.rst b/Documentation/applications/examples/gps/index.rst new file mode 100644 index 0000000000..24b794bfd0 --- /dev/null +++ b/Documentation/applications/examples/gps/index.rst @@ -0,0 +1,4 @@ +``gps`` GPS example +=================== + +GPS example. diff --git a/Documentation/applications/examples/hall/index.rst b/Documentation/applications/examples/hall/index.rst new file mode 100644 index 0000000000..c9687633d5 --- /dev/null +++ b/Documentation/applications/examples/hall/index.rst @@ -0,0 +1,4 @@ +``hall`` Hall effect sensor example +=================================== + +Hall effect sensor example. diff --git a/Documentation/applications/examples/hdc1008_demo/index.rst b/Documentation/applications/examples/hdc1008_demo/index.rst new file mode 100644 index 0000000000..b527183120 --- /dev/null +++ b/Documentation/applications/examples/hdc1008_demo/index.rst @@ -0,0 +1,4 @@ +``hdc1008_demo`` HDC1008 driver example +======================================= + +HDC1008 driver example. diff --git a/Documentation/applications/examples/hello/index.rst b/Documentation/applications/examples/hello/index.rst new file mode 100644 index 0000000000..262f827e72 --- /dev/null +++ b/Documentation/applications/examples/hello/index.rst @@ -0,0 +1,9 @@ +``hello`` Hello World +===================== + +This is the mandatory, "Hello, World" example. It is little more than +``examples/null`` with a single ``printf`` statement. Really useful only for +bringing up new NuttX architectures. + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the "Hello, World" example as an NSH + built-in application. diff --git a/Documentation/applications/examples/hello_nim/index.rst b/Documentation/applications/examples/hello_nim/index.rst new file mode 100644 index 0000000000..2c55ee36b7 --- /dev/null +++ b/Documentation/applications/examples/hello_nim/index.rst @@ -0,0 +1,4 @@ +``hello_nim`` Hello World in Nim +================================ + +Hello World in Nim. diff --git a/Documentation/applications/examples/hello_rust/index.rst b/Documentation/applications/examples/hello_rust/index.rst new file mode 100644 index 0000000000..2e23e5ee67 --- /dev/null +++ b/Documentation/applications/examples/hello_rust/index.rst @@ -0,0 +1,4 @@ +``hello_rust`` Hello World in Rust +================================== + +Hello World in Rust. diff --git a/Documentation/applications/examples/hello_wasm/index.rst b/Documentation/applications/examples/hello_wasm/index.rst new file mode 100644 index 0000000000..66090084c4 --- /dev/null +++ b/Documentation/applications/examples/hello_wasm/index.rst @@ -0,0 +1,4 @@ +``hello_wasm`` Hello World in WASM +================================== + +Hello World in WASM. diff --git a/Documentation/applications/examples/hello_zig/index.rst b/Documentation/applications/examples/hello_zig/index.rst new file mode 100644 index 0000000000..238aca90a4 --- /dev/null +++ b/Documentation/applications/examples/hello_zig/index.rst @@ -0,0 +1,4 @@ +``hello_zig`` Hello World in Zig +================================ + +Hello World in Zig. diff --git a/Documentation/applications/examples/helloxx/index.rst b/Documentation/applications/examples/helloxx/index.rst new file mode 100644 index 0000000000..34cd52a853 --- /dev/null +++ b/Documentation/applications/examples/helloxx/index.rst @@ -0,0 +1,35 @@ +``helloxx`` Hello World in C++ +============================== + +This is C++ version of the "Hello, World" example. It is intended only to +verify that the C++ compiler is functional, that basic C++ library support is +available, and that class are instantiated correctly. + +NuttX configuration prerequisites: + +- ``CONFIG_HAVE_CXX`` – Enable C++ Support. + +Optional NuttX configuration settings: + +- ``CONFIG_HAVE_CXXINITIALIZE`` – Enable support for static constructors (may not + be available on all platforms). + +NuttX configuration settings specific to this example: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the helloxx example as a built-in that can + be executed from the NSH command line. + +Also needed: + +- ``CONFIG_HAVE_CXX=y`` + +And you may have to tinker with the following to get libxx to compile properly: + +- ``CCONFIG_ARCH_SIZET_LONG=y`` or ``=n``. + +The argument of the ``new`` operators should take a type of ``size_t``. But ``size_t`` +has an unknown underlying. In the nuttx ``sys/types.h`` header file, ``size_t`` is +typed as ``uint32_t`` (which is determined by architecture-specific logic). But +the C++ compiler may believe that ``size_t`` is of a different type resulting in +compilation errors in the operator. Using the underlying integer type Instead of +``size_t`` seems to resolve the compilation issues. diff --git a/Documentation/applications/examples/hidkbd/index.rst b/Documentation/applications/examples/hidkbd/index.rst new file mode 100644 index 0000000000..26cbf46d1e --- /dev/null +++ b/Documentation/applications/examples/hidkbd/index.rst @@ -0,0 +1,17 @@ +``hidkbd`` USB Host HID keyboard +================================ + +This is a simple test to ``debug/verify`` the USB host HID keyboard class driver. + +- ``CONFIG_EXAMPLES_HIDKBD_DEFPRIO`` – Priority of waiter thread. Default: ``50``. +- ``CONFIG_EXAMPLES_HIDKBD_STACKSIZE`` – Stacksize of waiter thread. Default + ``1024``. +- ``CONFIG_EXAMPLES_HIDKBD_DEVNAME`` – Name of keyboard device to be used. + Default: ``/dev/kbda``. +- ``CONFIG_EXAMPLES_HIDKBD_ENCODED`` – Decode special key press events in the + user buffer. In this case, the example coded will use the interfaces defined + in ``include/nuttx/input/kbd_codec.h`` to decode the returned keyboard data. + These special keys include such things as up/down arrows, home and end keys, + etc. If this not defined, only 7-bit printable and control ASCII characters + will be provided to the user. Requires ``CONFIG_HIDKBD_ENCODED`` and + ``CONFIG_LIBC_KBDCODEC``. diff --git a/Documentation/applications/examples/hts221_reader/index.rst b/Documentation/applications/examples/hts221_reader/index.rst new file mode 100644 index 0000000000..dc111c3b98 --- /dev/null +++ b/Documentation/applications/examples/hts221_reader/index.rst @@ -0,0 +1,4 @@ +``hts221_reader`` ``HTS221`` Humidity Sensor +============================================ + +A simple reader example for the ``HTS221`` humidity sensor. diff --git a/Documentation/applications/examples/i2cchar/index.rst b/Documentation/applications/examples/i2cchar/index.rst new file mode 100644 index 0000000000..3593ca2f6a --- /dev/null +++ b/Documentation/applications/examples/i2cchar/index.rst @@ -0,0 +1,52 @@ +``i2cchar`` Transfer Through I2C +================================ + +A mindlessly simple test of an I2C driver. It reads an write garbage data to the +I2C transmitter and/or received as fast possible. + +This test depends on these specific I2S/AUDIO/NSH configurations settings (your +specific I2S settings might require additional settings). + +- ``CONFIG_I2S`` – Enabled I2S support. +- ``CONFIG_AUDIO`` – Enabled audio support. +- ``CONFIG_DRIVERS_AUDIO`` – Enable audio device support. +- ``CONFIG_AUDIO_I2SCHAR`` – Enabled support for the I2S character device. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the I2S test as an NSH built-in function. + Default: Built as a standalone program. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_I2SCHAR`` – Enables the I2C test. + +- ``CONFIG_EXAMPLES_I2SCHAR_DEVPATH`` – The default path to the ADC device. + Default: ``/dev/i2schar0``. + +- ``CONFIG_EXAMPLES_I2SCHAR_TX`` – This should be set if the I2S device supports a + transmitter. + +- ``CONFIG_EXAMPLES_I2SCHAR_TXBUFFERS`` – This is the default number of audio + buffers to send before the TX transfers terminate. When both TX and RX + transfers terminate, the task exits (and, if an NSH builtin, the ``i2schar`` + command returns). This number can be changed from the NSH command line. + +- ``CONFIG_EXAMPLES_I2SCHAR_TXSTACKSIZE`` – This is the stack size to use when + starting the transmitter thread. Default ``1536``. + +- ``CONFIG_EXAMPLES_I2SCHAR_RX`` – This should be set if the I2S device supports a + transmitter. + +- ``CONFIG_EXAMPLES_I2SCHAR_RXBUFFERS`` – This is the default number of audio + buffers to receive before the RX transfers terminate. When both TX and RX + transfers terminate, the task exits (and, if an NSH builtin, the ``i2schar`` + command returns). This number can be changed from the NSH command line. + +- ``CONFIG_EXAMPLES_I2SCHAR_RXSTACKSIZE`` – This is the stack size to use when + starting the receiver thread. Default ``1536``. + +- ``CONFIG_EXAMPLES_I2SCHAR_BUFSIZE`` – The size of the data payload in one audio + buffer. Applies to both TX and RX audio buffers. + +- ``CONFIG_EXAMPLES_I2SCHAR_DEVINIT`` – Define if architecture-specific I2S device + initialize is available. If defined, the platform specific code must provide a + function ``i2schar_devinit()`` that will be called each time that this test + executes. Not available in the kernel build mode. diff --git a/Documentation/applications/examples/i2sloop/index.rst b/Documentation/applications/examples/i2sloop/index.rst new file mode 100644 index 0000000000..ebd527c555 --- /dev/null +++ b/Documentation/applications/examples/i2sloop/index.rst @@ -0,0 +1,4 @@ +``i2sloop`` I2S loopback test +============================= + +I2S loopback test. diff --git a/Documentation/applications/examples/igmp/index.rst b/Documentation/applications/examples/igmp/index.rst new file mode 100644 index 0000000000..1c0c859dd2 --- /dev/null +++ b/Documentation/applications/examples/igmp/index.rst @@ -0,0 +1,13 @@ +``igmp`` Trivial IGMP +===================== + +This is a trivial test of the NuttX IGMP capability. It present it does not do +much of value – Much more is needed in order to verify the IGMP features! + +- ``CONFIG_EXAMPLES_IGMP_NOMAC`` – Set if the hardware has no MAC address; one + will be assigned. +- ``CONFIG_EXAMPLES_IGMP_IPADDR`` – Target board IP address. +- ``CONFIG_EXAMPLES_IGMP_DRIPADDR`` – Default router address. +- ``CONFIG_EXAMPLES_IGMP_NETMASK`` – Network mask. +- ``CONFIG_EXAMPLES_IGMP_GRPADDR`` – Multicast group address. +- ``CONFIG_EXAMPLES_NETLIB`` – The networking library is needed. diff --git a/Documentation/applications/examples/ina219/index.rst b/Documentation/applications/examples/ina219/index.rst new file mode 100644 index 0000000000..c5f6c9a276 --- /dev/null +++ b/Documentation/applications/examples/ina219/index.rst @@ -0,0 +1,5 @@ +``ina219`` Current/Power Monitor INA219 +======================================= + +This is a simple infinite loop that polls the ``INA219`` sensor and displays the +measurements. diff --git a/Documentation/applications/examples/ina226/index.rst b/Documentation/applications/examples/ina226/index.rst new file mode 100644 index 0000000000..fea20e31d0 --- /dev/null +++ b/Documentation/applications/examples/ina226/index.rst @@ -0,0 +1,4 @@ +``ina226`` +========== + +TODO diff --git a/Documentation/applications/examples/index.rst b/Documentation/applications/examples/index.rst new file mode 100644 index 0000000000..9d7cb53f7a --- /dev/null +++ b/Documentation/applications/examples/index.rst @@ -0,0 +1,38 @@ +Examples +======== + +Selecting Examples +------------------ + +The examples directory contains several sample applications that can be linked +with NuttX. The specific example is selected in the +``boards////configs//defconfig`` file +via the ``CONFIG_EXAMPLES_xyz`` setting where ``xyz`` is the name of the example. +For example:: + + CONFIG_EXAMPLES_HELLO=y + +Selects the ``examples/hello`` "Hello, World!" example. + +Built-In Functions +------------------ + +Some of the examples may be built as built-in functions that can be executed +at run time (rather than as NuttX main programs). These built-in examples +can be also be executed from the NuttShell (NSH) command line. In order to +configure these built-in NSH functions, you have to set up the following: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Enable support for external registered, named + applications that can be executed from the NSH command line (see + ``apps/README.md`` for more information). + + +Supported examples +------------------ + +.. toctree:: + :glob: + :maxdepth: 3 + :titlesonly: + + */* diff --git a/Documentation/applications/examples/ini_dumper/index.rst b/Documentation/applications/examples/ini_dumper/index.rst new file mode 100644 index 0000000000..0320eb02e9 --- /dev/null +++ b/Documentation/applications/examples/ini_dumper/index.rst @@ -0,0 +1,4 @@ +``ini_dumper`` +============== + +TODO diff --git a/Documentation/applications/examples/ipcfg/index.rst b/Documentation/applications/examples/ipcfg/index.rst new file mode 100644 index 0000000000..c6d3dcd705 --- /dev/null +++ b/Documentation/applications/examples/ipcfg/index.rst @@ -0,0 +1,4 @@ +``ipcfg`` +========= + +TODO diff --git a/Documentation/applications/examples/ipforward/index.rst b/Documentation/applications/examples/ipforward/index.rst new file mode 100644 index 0000000000..189b5ee3dd --- /dev/null +++ b/Documentation/applications/examples/ipforward/index.rst @@ -0,0 +1,6 @@ +``ipforward`` IP Forwarding Using TUN +===================================== + +A simple test of IP forwarding using TUN devices. This can be used on any +platform, but was intended for use on the simulation platform because it +performs a test of IP forwarding without the use of hardware. diff --git a/Documentation/applications/examples/json/index.rst b/Documentation/applications/examples/json/index.rst new file mode 100644 index 0000000000..6e43570001 --- /dev/null +++ b/Documentation/applications/examples/json/index.rst @@ -0,0 +1,12 @@ +``json`` cJSON +============== + +This example exercises the cJSON implementation at ``apps/netutils/json``. This +example contains logic taken from the cJSON project: + +http://sourceforge.net/projects/cjson/ + +The example corresponds to SVN revision ``r42`` (with lots of changes for NuttX +coding standards). As of ``r42``, the SVN repository was last updated on +``2011-10-10`` so I presume that the code is stable and there is no risk of +maintaining duplicate logic in the NuttX repository. diff --git a/Documentation/applications/examples/keyboard/index.rst b/Documentation/applications/examples/keyboard/index.rst new file mode 100644 index 0000000000..4af85b29ab --- /dev/null +++ b/Documentation/applications/examples/keyboard/index.rst @@ -0,0 +1,4 @@ +``keyboard`` +============ + +TODO diff --git a/Documentation/applications/examples/leds/index.rst b/Documentation/applications/examples/leds/index.rst new file mode 100644 index 0000000000..53a80d3f9c --- /dev/null +++ b/Documentation/applications/examples/leds/index.rst @@ -0,0 +1,5 @@ +``leds`` Toggle LEDs +==================== + +This is a simple test of the board LED driver at +``nuttx/drivers/leds/userled_*.c``. diff --git a/Documentation/applications/examples/libtest/index.rst b/Documentation/applications/examples/libtest/index.rst new file mode 100644 index 0000000000..f7e55425e3 --- /dev/null +++ b/Documentation/applications/examples/libtest/index.rst @@ -0,0 +1,18 @@ +``libtest`` Static Library Test +=============================== + +This example illustrates how you may create a static library. It does the +following: + +It creates a static library called libtest.a that contains an object that provides +the symbol library_test(). + +At adds the library as an EXTRA_LIB in the build:: + + EXTRA_LIBS += -ltest + EXTRA_LIBPATHS += -L$(APPDIR)/examples/libtest + +And optionally, it can be configured to: + +Generate a built-in command that can be executed by NSH. This command logic links +with the symbol library_test() that will provided by the libtest.a static library. diff --git a/Documentation/applications/examples/lis3dsh_reader/index.rst b/Documentation/applications/examples/lis3dsh_reader/index.rst new file mode 100644 index 0000000000..09c9e648bb --- /dev/null +++ b/Documentation/applications/examples/lis3dsh_reader/index.rst @@ -0,0 +1,5 @@ +``lis3dsh_reader`` ``LIS3DSH`` Accelerometer +============================================ + +A simple reader example for the ``LIS3DSH`` acceleration sensor as found on +STM32F4Discovery rev. C. diff --git a/Documentation/applications/examples/lp503x/index.rst b/Documentation/applications/examples/lp503x/index.rst new file mode 100644 index 0000000000..64da9b69c0 --- /dev/null +++ b/Documentation/applications/examples/lp503x/index.rst @@ -0,0 +1,4 @@ +``lp503x`` +=========== + +TODO diff --git a/Documentation/applications/examples/lsm303_reader/index.rst b/Documentation/applications/examples/lsm303_reader/index.rst new file mode 100644 index 0000000000..edb4990ba7 --- /dev/null +++ b/Documentation/applications/examples/lsm303_reader/index.rst @@ -0,0 +1,4 @@ +``lsm303_reader`` ``LSM303`` Accelerometer/Magnetometer +======================================================= + +A simple reader example for the ``LSM303`` acc-mag sensor. diff --git a/Documentation/applications/examples/lsm6dsl_reader/index.rst b/Documentation/applications/examples/lsm6dsl_reader/index.rst new file mode 100644 index 0000000000..5989031073 --- /dev/null +++ b/Documentation/applications/examples/lsm6dsl_reader/index.rst @@ -0,0 +1,4 @@ +``lsm6dsl_reader`` ``LSM6DSL`` Accelerometer/Gyroscope +====================================================== + +A simple reader example for the ``LSM6DSL`` acc-gyro sensor. diff --git a/Documentation/applications/examples/ltr308/index.rst b/Documentation/applications/examples/ltr308/index.rst new file mode 100644 index 0000000000..ef372e0d6f --- /dev/null +++ b/Documentation/applications/examples/ltr308/index.rst @@ -0,0 +1,4 @@ +``ltr308`` +=========== + +TODO diff --git a/Documentation/applications/examples/lua_module/index.rst b/Documentation/applications/examples/lua_module/index.rst new file mode 100644 index 0000000000..9519417da0 --- /dev/null +++ b/Documentation/applications/examples/lua_module/index.rst @@ -0,0 +1,10 @@ +``lua_module`` Hello World Lua module +===================================== + +A Lua C module showing how to add built-in modules to the Lua interpreter. +Usage: + +.. code-block:: lua + + > hello.say_hello() + "Hello World!" diff --git a/Documentation/applications/examples/lvgldemo/index.rst b/Documentation/applications/examples/lvgldemo/index.rst new file mode 100644 index 0000000000..c202e55125 --- /dev/null +++ b/Documentation/applications/examples/lvgldemo/index.rst @@ -0,0 +1,4 @@ +``lvgldemo`` +============ + +TODO diff --git a/Documentation/applications/examples/lvglterm/index.rst b/Documentation/applications/examples/lvglterm/index.rst new file mode 100644 index 0000000000..8dbc06b8e9 --- /dev/null +++ b/Documentation/applications/examples/lvglterm/index.rst @@ -0,0 +1,13 @@ +``lvglterm`` LVGL Terminal for NuttShell (NSH) +============================================== + +LVGL application that executes NuttShell (NSH) commands entered with a +Touchscreen Keyboard and displays the NSH output. Prerequisite configuration +settings: + +- ``CONFIG_NSH_ARCHINIT=n`` – NSH architecture initialization must be disabled. +- ``CONFIG_NSH_CONSOLE=y`` – NSH must be configured to use a console. +- ``CONFIG_LIBC_EXECFUNCS=y`` – posix_spawn() must be enabled. +- ``CONFIG_PIPES=y`` – Pipes must be enabled. +- ``CONFIG_GRAPHICS_LVGL=y`` – LVGL graphics must be enabled. +- ``CONFIG_LV_FONT_UNSCII_16=y`` – LVGL font UNSCII 16 must be enabled. diff --git a/Documentation/applications/examples/max31855/index.rst b/Documentation/applications/examples/max31855/index.rst new file mode 100644 index 0000000000..ecf20d814b --- /dev/null +++ b/Documentation/applications/examples/max31855/index.rst @@ -0,0 +1,4 @@ +``max31855`` +============ + +TODO diff --git a/Documentation/applications/examples/mcuboot/index.rst b/Documentation/applications/examples/mcuboot/index.rst new file mode 100644 index 0000000000..fa3661d1ab --- /dev/null +++ b/Documentation/applications/examples/mcuboot/index.rst @@ -0,0 +1,4 @@ +``mcuboot`` +=========== + +TODO diff --git a/Documentation/applications/examples/media/index.rst b/Documentation/applications/examples/media/index.rst new file mode 100644 index 0000000000..d85522a0c9 --- /dev/null +++ b/Documentation/applications/examples/media/index.rst @@ -0,0 +1,25 @@ +``media`` +========= + +The media test simply writes values onto the media hidden behind a character +driver and verifies that the media can be successfully written and read. This +low level test is useful in the early phases of the bringup of a new block or +mtd driver because it avoids the complexity of a file system. + +This test uses a character driver and cannot directly access block or mtd +drivers. This test is suitable for use EEPROM character drivers (see +``nuttx/drivers/eeprom``), or with block drivers wrapped as character drivers (see +``nuttx/drivers/bch``) + +.. code-block:: C + + int ret = bchdev_register(, , + false); + +MTD drivers need an additional wrapper layer, the FTL wrapper must first be used +to convert the MTD driver to a block device: + +.. code-block:: C + + int ret = ftl_initialize(, mtd); + ret = bchdev_register(/dev/mtdblock, , false); diff --git a/Documentation/applications/examples/mld/index.rst b/Documentation/applications/examples/mld/index.rst new file mode 100644 index 0000000000..6718f8d9a0 --- /dev/null +++ b/Documentation/applications/examples/mld/index.rst @@ -0,0 +1,4 @@ +``mld`` +======= + +TODO diff --git a/Documentation/applications/examples/mlx90614/index.rst b/Documentation/applications/examples/mlx90614/index.rst new file mode 100644 index 0000000000..ee5ff86500 --- /dev/null +++ b/Documentation/applications/examples/mlx90614/index.rst @@ -0,0 +1,4 @@ +``mlx90614`` +============ + +TODO diff --git a/Documentation/applications/examples/mml_parser/index.rst b/Documentation/applications/examples/mml_parser/index.rst new file mode 100644 index 0000000000..db9041df77 --- /dev/null +++ b/Documentation/applications/examples/mml_parser/index.rst @@ -0,0 +1,4 @@ +``mml_parser`` +============== + +TODO diff --git a/Documentation/applications/examples/modbus/index.rst b/Documentation/applications/examples/modbus/index.rst new file mode 100644 index 0000000000..fef63bc10d --- /dev/null +++ b/Documentation/applications/examples/modbus/index.rst @@ -0,0 +1,18 @@ +``modbus`` FreeModbus +===================== + +This is a port of the FreeModbus Linux demo. It derives from the demos/LINUX +directory of the FreeModBus version ``1.5.0`` (June 6, 2010) that can be +downloaded in its entirety from +http://developer.berlios.de/project/showfiles.php?group_id=6120. + +- ``CONFIG_EXAMPLES_MODBUS_PORT``, Default ``0`` (for ``/dev/ttyS0``). +- ``CONFIG_EXAMPLES_MODBUS_BAUD``, Default B``38400``. +- ``CONFIG_EXAMPLES_MODBUS_PARITY``, Default ``MB_PAR_EVEN``. +- ``CONFIG_EXAMPLES_MODBUS_REG_INPUT_START``, Default ``1000``. +- ``CONFIG_EXAMPLES_MODBUS_REG_INPUT_NREGS``, Default ``4``. +- ``CONFIG_EXAMPLES_MODBUS_REG_HOLDING_START``, Default ``2000``. +- ``CONFIG_EXAMPLES_MODBUS_REG_HOLDING_NREGS``, Default ``130``. + +The FreeModBus library resides at ``apps/modbus``. See ``apps/modbus/README.txt`` +for additional configuration information. diff --git a/Documentation/applications/examples/modbusmaster/index.rst b/Documentation/applications/examples/modbusmaster/index.rst new file mode 100644 index 0000000000..f7d573dcaa --- /dev/null +++ b/Documentation/applications/examples/modbusmaster/index.rst @@ -0,0 +1,4 @@ +``modbusmaster`` +================ + +TODO diff --git a/Documentation/applications/examples/module/index.rst b/Documentation/applications/examples/module/index.rst new file mode 100644 index 0000000000..78978945c3 --- /dev/null +++ b/Documentation/applications/examples/module/index.rst @@ -0,0 +1,61 @@ +``module`` Loadable Module +========================== + +This example builds a small loadable module test case. This includes a character +driver under ``examples/module/drivers``. This driver is built using the +relocatable ELF format and installed in a ROMFS file system. At run time, the +driver module is loaded and exercised. Requires ``CONFIG_MODULE``. Other +configuration options: + +- ``CONFIG_EXAMPLES_ELF_DEVMINOR`` – The minor device number of the ROMFS block + driver. For example, the ``N`` in ``/dev/ramN``. Used for registering the RAM + block driver that will hold the ROMFS file system containing the ELF + executables to be tested. Default: ``0``. + +- ``CONFIG_EXAMPLES_ELF_DEVPATH`` – The path to the ROMFS block driver device. + This must match ``EXAMPLES_ELF_DEVMINOR``. Used for registering the RAM block + driver that will hold the ROMFS file system containing the ELF executables to + be tested. Default: ``/dev/ram0``. + +**Notes**: + +1. ``CFLAGS`` should be provided in ``CMODULEFLAGS``. RAM and FLASH memory regions + may require long allcs. For ARM, this might be:: + + CMODULEFLAGS = $(CFLAGS) -mlong-calls + + Similarly for C++ flags which must be provided in ``CXXMODULEFLAGS``. + +2. Your top-level ``nuttx/Make.defs`` file must also include an appropriate + definition, LDMODULEFLAGS, to generate a relocatable ELF object. With GNU LD, + this should include ``-r`` and ``-e ``.:: + + LDMODULEFLAGS = -r -e module_initialize + + If you use GCC to link, you make also need to include ``-nostdlib``. + +3. This example also requires ``genromfs``. ``genromfs`` can be build as part of the + nuttx toolchain. Or can built from the ``genromfs`` sources that can be found + in the NuttX tools repository (``genromfs-0.5.2.tar.gz``). In any event, the + PATH variable must include the path to the ``genromfs`` executable. + +4. ELF size: The ELF files in this example are, be default, quite large because + they include a lot of build garbage. You can greatly reduce the size of the + ELF binaries are using the ``objcopy --strip-unneeded`` command to remove + un-necessary information from the ELF files. + +5. Simulator. You cannot use this example with the NuttX simulator on Cygwin. + That is because the Cygwin GCC does not generate ELF file but rather some + Windows-native binary format. + + If you really want to do this, you can create a NuttX x86 ``buildroot`` + toolchain and use that be build the ELF executables for the ROMFS file + system. + +6. Linker scripts. You might also want to use a linker scripts to combine + sections better. An example linker script is at + ``nuttx/libc/modlib/gnu-elf.ld``. That example might have to be tuned for your + particular linker output to position additional sections correctly. The GNU + LD ``LDMODULEFLAGS`` then might be:: + + LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld diff --git a/Documentation/applications/examples/mount/index.rst b/Documentation/applications/examples/mount/index.rst new file mode 100644 index 0000000000..bb72176ced --- /dev/null +++ b/Documentation/applications/examples/mount/index.rst @@ -0,0 +1,18 @@ +``mount`` Mount Filesystem +========================== + +This contains a simple test of filesystem mountpoints. + +- ``CONFIG_EXAMPLES_MOUNT_DEVNAME`` – The name of the user-provided block device + to mount. If ``CONFIG_EXAMPLES_MOUNT_DEVNAME`` is not provided, then a RAM disk + will be configured. + +- ``CONFIG_EXAMPLES_MOUNT_NSECTORS`` – The number of sectors in the RAM disk + used when ``CONFIG_EXAMPLES_MOUNT_DEVNAME`` is not defined. + +- ``CONFIG_EXAMPLES_MOUNT_SECTORSIZE`` – The size of each sectors in the RAM disk + used when ``CONFIG_EXAMPLES_MOUNT_DEVNAME`` is not defined. + +- ``CONFIG_EXAMPLES_MOUNT_RAMDEVNO`` – The RAM device minor number used to mount + the RAM disk used when ``CONFIG_EXAMPLES_MOUNT_DEVNAME`` is not defined. The + default is zero (meaning that ``/dev/ram0`` will be used). diff --git a/Documentation/applications/examples/mqttc/index.rst b/Documentation/applications/examples/mqttc/index.rst new file mode 100644 index 0000000000..e33eadc75b --- /dev/null +++ b/Documentation/applications/examples/mqttc/index.rst @@ -0,0 +1,25 @@ +``mqttc`` +========= + +This is a simple MQTT publisher example using MQTT-C + +By default it publishes to the "test" topic and exits. Default behaviour +including, host, port, topic, message and loop count can be changed through +different arguments. + +To test: +From the host start an MQTT broker and subscribe to the "test" topic. Here +mosquitto is used:: + + mosquitto& + mosquitto_sub -t test + +Make sure that mosquitto is not configured in local mode only. + +From the nsh: + +Launch the built-in app ``mqttc_pub`` specifying the host:: + + mqttc_pub -h HOST + +The target will publish the message "test". diff --git a/Documentation/applications/examples/mtdpart/index.rst b/Documentation/applications/examples/mtdpart/index.rst new file mode 100644 index 0000000000..119a7cf173 --- /dev/null +++ b/Documentation/applications/examples/mtdpart/index.rst @@ -0,0 +1,28 @@ +``mtdpart`` MTD Partition Test +============================== + +This examples provides a simple test of MTD partition logic. + +- ``CONFIG_EXAMPLES_MTDPART`` – Enables the MTD partition test example. + +- ``CONFIG_EXAMPLES_MTDPART_ARCHINIT`` – The default is to use the RAM MTD device + at ``drivers/mtd/rammtd.c``. But an architecture-specific MTD driver can be used + instead by defining ``CONFIG_EXAMPLES_MTDPART_ARCHINIT``. In this case, the + initialization logic will call ``mtdpart_archinitialize()`` to obtain the MTD + driver instance. + +- ``CONFIG_EXAMPLES_MTDPART_NPARTITIONS`` – This setting provides the number of + partitions to test. The test will divide the reported size of the MTD device + into equal-sized sub-regions for each test partition. Default: ``3``. + +When ``CONFIG_EXAMPLES_MTDPART_ARCHINIT`` is not defined, this test will use the +RAM MTD device at ``drivers/mtd/rammtd.c`` to simulate FLASH. The size of the +allocated RAM drive will be: ``CONFIG_EXMPLES_RAMMTD_ERASESIZE * +CONFIG_EXAMPLES_MTDPART_NEBLOCKS``. + +* ``CONFIG_EXAMPLES_MTDPART_ERASESIZE`` – This value gives the size of one erase + block in the MTD RAM device. This must exactly match the default configuration + in ``drivers/mtd/rammtd.c``! + +* ``CONFIG_EXAMPLES_MTDPART_NEBLOCKS`` – This value gives the number of erase + blocks in MTD RAM device. diff --git a/Documentation/applications/examples/mtdrwb/index.rst b/Documentation/applications/examples/mtdrwb/index.rst new file mode 100644 index 0000000000..e723e46712 --- /dev/null +++ b/Documentation/applications/examples/mtdrwb/index.rst @@ -0,0 +1,24 @@ +``mtdrwb`` MTD Read-ahead and Write Buffering +============================================= + +This examples provides a simple test of MTD Read-Ahead/Write buffering logic. + +- ``CONFIG_EXAMPLES_MTDRWB`` – Enables the MTD R/W buffering test example. + +- ``CONFIG_EXAMPLES_MTDRWB_ARCHINIT`` – The default is to use the RAM MTD device + at ``drivers/mtd/rammtd.c``. But an architecture-specific MTD driver can be used + instead by defining ``CONFIG_EXAMPLES_MTDRWB_ARCHINIT``. In this case, the + initialization logic will call ``mtdrwb_archinitialize()`` to obtain the MTD + driver instance. + +When ``CONFIG_EXAMPLES_MTDRWB_ARCHINIT`` is not defined, this test will use the +RAM MTD device at ``drivers/mtd/rammtd.c`` to simulate FLASH. The size of the +allocated RAM drive will be: ``CONFIG_EXMPLES_RAMMTD_ERASESIZE * +CONFIG_EXAMPLES_MTDRWB_NEBLOCKS`` + +- ``CONFIG_EXAMPLES_MTDRWB_ERASESIZE`` – This value gives the size of one erase + block in the MTD RAM device. This must exactly match the default configuration + in ``drivers/mtd/rammtd.c``! + +- ``CONFIG_EXAMPLES_MTDRWB_NEBLOCKS`` – This value gives the number of erase + blocks in MTD RAM device. diff --git a/Documentation/applications/examples/netlink_route/index.rst b/Documentation/applications/examples/netlink_route/index.rst new file mode 100644 index 0000000000..1a6ffff4b3 --- /dev/null +++ b/Documentation/applications/examples/netlink_route/index.rst @@ -0,0 +1,4 @@ +``netlink_route`` +================= + +TODO diff --git a/Documentation/applications/examples/netloop/index.rst b/Documentation/applications/examples/netloop/index.rst new file mode 100644 index 0000000000..1cd02e0795 --- /dev/null +++ b/Documentation/applications/examples/netloop/index.rst @@ -0,0 +1,17 @@ +``netloop`` Network loopback device +=================================== + +This is a simple test of the netwok loopback device. ``examples/nettest`` can also +be configured to provide (better) test of local loopback transfers. This version +derives from ``examples/poll`` and is focused on testing ``poll()`` with loopback +devices. + +- ``CONFIG_EXAMPLES_NETLOOP=y`` – Enables the nettest example. + +Dependencies: + +- ``CONFIG_NET_LOOPBACK`` – Requires local loopback support. +- ``CONFIG_NET_TCP`` – Requires TCP support with the following: + - ``CONFIG_NET_TCPBACKLOG`` + - ``CONFIG_NET_TCP_WRITE_BUFFERS`` +- ``CONFIG_NET_IPv4`` – Currently supports only IPv4. diff --git a/Documentation/applications/examples/netpkt/index.rst b/Documentation/applications/examples/netpkt/index.rst new file mode 100644 index 0000000000..5eb6357d7a --- /dev/null +++ b/Documentation/applications/examples/netpkt/index.rst @@ -0,0 +1,4 @@ +``netpkt`` ``AF_PACKET`` Raw Sockets +==================================== + +A test of ``AF_PACKET``, raw sockets. Contributed by Lazlo Sitzer. diff --git a/Documentation/applications/examples/nettest/index.rst b/Documentation/applications/examples/nettest/index.rst new file mode 100644 index 0000000000..fd365069e0 --- /dev/null +++ b/Documentation/applications/examples/nettest/index.rst @@ -0,0 +1,17 @@ +``nettest`` Client/Server Over TCP +================================== + +This is a simple network test for verifying client- and server- functionality in +a TCP/IP connection. + +- ``CONFIG_EXAMPLES_NETTEST=y`` – Enables the nettest example. +- ``CONFIG_EXAMPLES_NETLIB=y`` – The networking library in needed. + +Configurations: + +- Server on target hardware; client on host. +- Client on target hardware; server on host. +- Server and Client on different targets. +- Loopback configuration with both client and server on the same target. + +See also ``examples/tcpecho``. diff --git a/Documentation/applications/examples/nimble/index.rst b/Documentation/applications/examples/nimble/index.rst new file mode 100644 index 0000000000..65ef4e7758 --- /dev/null +++ b/Documentation/applications/examples/nimble/index.rst @@ -0,0 +1,4 @@ +``nimble`` +========== + +TODO diff --git a/Documentation/applications/examples/nng_test/index.rst b/Documentation/applications/examples/nng_test/index.rst new file mode 100644 index 0000000000..567fbf1253 --- /dev/null +++ b/Documentation/applications/examples/nng_test/index.rst @@ -0,0 +1,4 @@ +``nng_test`` +============ + +TODO diff --git a/Documentation/applications/examples/noteprintf/index.rst b/Documentation/applications/examples/noteprintf/index.rst new file mode 100644 index 0000000000..bb20f177ee --- /dev/null +++ b/Documentation/applications/examples/noteprintf/index.rst @@ -0,0 +1,4 @@ +``noteprintf`` +============== + +TODO diff --git a/Documentation/applications/examples/nrf24l01_btle/index.rst b/Documentation/applications/examples/nrf24l01_btle/index.rst new file mode 100644 index 0000000000..475d5e0a8a --- /dev/null +++ b/Documentation/applications/examples/nrf24l01_btle/index.rst @@ -0,0 +1,4 @@ +``nrf24l01_btle`` +================= + +TODO diff --git a/Documentation/applications/examples/nrf24l01_term/index.rst b/Documentation/applications/examples/nrf24l01_term/index.rst new file mode 100644 index 0000000000..4ae4593c80 --- /dev/null +++ b/Documentation/applications/examples/nrf24l01_term/index.rst @@ -0,0 +1,10 @@ +``nrf24l01_term`` NRF24L01 Wireless Connection +============================================== + +These is a simple test of NRF24L01-based wireless connectivity. Enabled with: + +- ``CONFIG_EXAMPLES_NRF24L01TERM`` + +Options: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Built as an NSH built-in applications. diff --git a/Documentation/applications/examples/null/index.rst b/Documentation/applications/examples/null/index.rst new file mode 100644 index 0000000000..0eefcebeaf --- /dev/null +++ b/Documentation/applications/examples/null/index.rst @@ -0,0 +1,5 @@ +``null`` +======== + +This is the do nothing application. It is only used for bringing up new NuttX +architectures in the most minimal of environments. diff --git a/Documentation/applications/examples/nunchuck/index.rst b/Documentation/applications/examples/nunchuck/index.rst new file mode 100644 index 0000000000..9cc3ffb594 --- /dev/null +++ b/Documentation/applications/examples/nunchuck/index.rst @@ -0,0 +1,4 @@ +``nunchuck`` +============ + +TODO diff --git a/Documentation/applications/examples/nx/index.rst b/Documentation/applications/examples/nx/index.rst new file mode 100644 index 0000000000..a561cf9de3 --- /dev/null +++ b/Documentation/applications/examples/nx/index.rst @@ -0,0 +1,38 @@ +``nx`` +====== + +This directory contains a simple test of a subset of the NX APIs defined in +``include/nuttx/nx/nx.h``. The following configuration options can be selected: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the NX example as a built-in that can be + executed from the NSH command line +- ``CONFIG_EXAMPLES_NX_BGCOLOR`` – The color of the background. Default depends on + ``CONFIG_EXAMPLES_NX_BPP``. +- ``CONFIG_EXAMPLES_NX_COLOR1`` – The color of window 1. Default depends on + ``CONFIG_EXAMPLES_NX_BPP``. +- ``CONFIG_EXAMPLES_NX_COLOR2`` – The color of window 2. Default depends on + ``CONFIG_EXAMPLES_NX_BPP``. +- ``CONFIG_EXAMPLES_NX_TBCOLOR`` – The color of the toolbar. Default depends on + ``CONFIG_EXAMPLES_NX_BPP``. +- ``CONFIG_EXAMPLES_NX_FONTID`` – Selects the font (see font ID numbers in + ``include/nuttx/nx/nxfonts.h``). +- ``CONFIG_EXAMPLES_NX_FONTCOLOR`` – The color of the fonts. Default depends on + ``CONFIG_EXAMPLES_NX_BPP``. +- ``CONFIG_EXAMPLES_NX_BPP`` – Pixels per pixel to use. Valid options include ``2``, + ``4``, ``8``, ``16``, ``24`` and ``32``. Default is ``32``. +- ``CONFIG_EXAMPLES_NX_RAWWINDOWS`` – Use raw windows; Default is to use pretty, + framed NXTK windows with toolbars. +- ``CONFIG_EXAMPLES_NX_STACKSIZE`` – The stacksize to use when creating the NX + server. Default ``2048``. +- ``CONFIG_EXAMPLES_NX_CLIENTPRIO`` – The client priority. Default: ``100`` +- ``CONFIG_EXAMPLES_NX_SERVERPRIO`` – The server priority. Default: ``120`` +- ``CONFIG_EXAMPLES_NX_LISTENERPRIO`` – The priority of the event listener thread. + Default ``80``. + +The example also has the following settings and will generate an error if they +are not as expected:: + + CONFIG_DISABLE_MQUEUE=n + CONFIG_DISABLE_PTHREAD=n + CONFIG_NX_BLOCKING=y + CONFIG_BOARDCTL=y diff --git a/Documentation/applications/examples/nxdemo/index.rst b/Documentation/applications/examples/nxdemo/index.rst new file mode 100644 index 0000000000..c3cf6352e7 --- /dev/null +++ b/Documentation/applications/examples/nxdemo/index.rst @@ -0,0 +1,4 @@ +``nxdemo`` +========== + +TODO diff --git a/Documentation/applications/examples/nxflat/index.rst b/Documentation/applications/examples/nxflat/index.rst new file mode 100644 index 0000000000..787fbabbea --- /dev/null +++ b/Documentation/applications/examples/nxflat/index.rst @@ -0,0 +1,7 @@ +``nxflat`` NXFLAT Binary +======================== + +This example builds a small NXFLAT test case. This includes several test +programs under ``examples/nxflat`` tests. These tests are build using the NXFLAT +format and installed in a ROMFS file system. At run time, each program in the +ROMFS file system is executed. Requires ``CONFIG_NXFLAT``. diff --git a/Documentation/applications/examples/nxhello/index.rst b/Documentation/applications/examples/nxhello/index.rst new file mode 100644 index 0000000000..152da5c96f --- /dev/null +++ b/Documentation/applications/examples/nxhello/index.rst @@ -0,0 +1,22 @@ +``nxhello`` +=========== + +A very simple graphics example that just says Hello, World! in the center of +the display. + +The following configuration options can be selected: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the ``NXHELLO`` example as a built-in that + can be executed from the NSH command line +- ``CONFIG_EXAMPLES_NXHELLO_VPLANE`` – The plane to select from the frame- buffer + driver for use in the test. Default: ``0``. +- ``CONFIG_EXAMPLES_NXHELLO_DEVNO`` – The LCD device to select from the LCD driver + for use in the test. Default: ``0``. +- ``CONFIG_EXAMPLES_NXHELLO_BGCOLOR`` – The color of the background. Default + depends on ``CONFIG_EXAMPLES_NXHELLO_BPP``. +- ``CONFIG_EXAMPLES_NXHELLO_FONTID`` – Selects the font (see font ID numbers in + include/nuttx/nx/nxfonts.h). +- ``CONFIG_EXAMPLES_NXHELLO_FONTCOLOR`` – The color of the fonts used in the + background window. Default depends on ``CONFIG_EXAMPLES_NXHELLO_BPP``. +- ``CONFIG_EXAMPLES_NXHELLO_BPP`` – Pixels per pixel to use. Valid options include + ``2``, ``4``, ``8``, ``16``, ``24`` and ``32``. Default: ``32``. diff --git a/Documentation/applications/examples/nximage/index.rst b/Documentation/applications/examples/nximage/index.rst new file mode 100644 index 0000000000..af2af721f8 --- /dev/null +++ b/Documentation/applications/examples/nximage/index.rst @@ -0,0 +1,35 @@ +``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. diff --git a/Documentation/applications/examples/nxlines/index.rst b/Documentation/applications/examples/nxlines/index.rst new file mode 100644 index 0000000000..d24225ad84 --- /dev/null +++ b/Documentation/applications/examples/nxlines/index.rst @@ -0,0 +1,33 @@ +``nxlines`` NX Line Drawing +=========================== + +A very simple graphics example that just exercised the NX line drawing logic. + +The following configuration options can be selected: + +- ``CONFIG_EXAMPLES_NXLINES_VPLANE`` – The plane to select from the frame- buffer + driver for use in the test. Default: ``0``. +- ``CONFIG_EXAMPLES_NXLINES_DEVNO`` – The LCD device to select from the LCD driver + for use in the test: Default: ``0``. +- ``CONFIG_EXAMPLES_NXLINES_BGCOLOR`` – The color of the background. Default + depends on ``CONFIG_EXAMPLES_NXLINES_BPP``. +- ``CONFIG_EXAMPLES_NXLINES_LINEWIDTH`` – Selects the width of the lines in pixels + (default: ``16``). +- ``CONFIG_EXAMPLES_NXLINES_LINECOLOR`` – The color of the central lines drawn in + the background window. Default depends on ``CONFIG_EXAMPLES_NXLINES_BPP`` (there + really is no meaningful default). +- ``CONFIG_EXAMPLES_NXLINES_BORDERWIDTH`` – The width of the circular border drawn + in the background window. (default: ``16``). +- ``CONFIG_EXAMPLES_NXLINES_BORDERCOLOR`` – The color of the circular border drawn + in the background window. Default depends on ``CONFIG_EXAMPLES_NXLINES_BPP`` + (there really is no meaningful default). +- ``CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR`` – The color of the circular region + filled in the background window. Default depends on + ``CONFIG_EXAMPLES_NXLINES_BPP`` (there really is no meaningful default). +- ``CONFIG_EXAMPLES_NXLINES_BORDERCOLOR`` – The color of the lines drawn in the + background window. Default depends on ``CONFIG_EXAMPLES_NXLINES_BPP`` (there + really is no meaningful default). +- ``CONFIG_EXAMPLES_NXLINES_BPP`` – Pixels per pixel to use. Valid options include + ``2``, ``4``, ``8``, ``16``, ``24``, and ``32``. Default is ``16``. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the NX lines examples as an NSH built-in + function. diff --git a/Documentation/applications/examples/nxscope/index.rst b/Documentation/applications/examples/nxscope/index.rst new file mode 100644 index 0000000000..cd6fc11dd8 --- /dev/null +++ b/Documentation/applications/examples/nxscope/index.rst @@ -0,0 +1,4 @@ +``nxscope`` +=========== + +TODO diff --git a/Documentation/applications/examples/nxterm/index.rst b/Documentation/applications/examples/nxterm/index.rst new file mode 100644 index 0000000000..1d24821efd --- /dev/null +++ b/Documentation/applications/examples/nxterm/index.rst @@ -0,0 +1,46 @@ +``nxterm`` Display NuttShell (NSH) as NX Console +================================================ + +This directory contains yet another version of the NuttShell (NSH). This version +uses the NX console device defined in ``include/nuttx/nx/nxterm.h`` for output. +the result is that the NSH input still come from the standard console input +(probably a serial console). But the text output will go to an NX winbdow. +Prerequisite configuration settings for this test include: + +- ``CONFIG_NX=y`` – NX graphics must be enabled +- ``CONFIG_NXTERM=y`` – The NX console driver must be built +- ``CONFIG_DISABLE_MQUEUE=n`` – Message queue support must be available. +- ``CONFIG_DISABLE_PTHREAD=n`` – pthreads are needed +- ``CONFIG_NX_BLOCKING=y`` – pthread APIs must be blocking +- ``CONFIG_NSH_CONSOLE=y`` – NSH must be configured to use a console. + +The following configuration options can be selected to customize the test: + +- ``CONFIG_EXAMPLES_NXTERM_BGCOLOR`` – The color of the background. Default + Default is a darker royal blue. +- ``CONFIG_EXAMPLES_NXTERM_WCOLOR`` – The color of the window. Default is a light + slate blue. +- ``CONFIG_EXAMPLES_NXTERM_FONTID`` – Selects the font (see font ID numbers in + ``include/nuttx/nx/nxfonts.h``). +- ``CONFIG_EXAMPLES_NXTERM_FONTCOLOR`` – The color of the fonts. Default is black. +- ``CONFIG_EXAMPLES_NXTERM_BPP`` – Pixels per pixel to use. Valid options include + ``2``, ``4``, ``8``, ``16``, ``24`` and ``32``. Default is ``32``. +- ``CONFIG_EXAMPLES_NXTERM_TOOLBAR_HEIGHT`` – The height of the toolbar. Default: + ``16``. +- ``CONFIG_EXAMPLES_NXTERM_TBCOLOR`` – The color of the toolbar. Default is a + medium grey. +- ``CONFIG_EXAMPLES_NXTERM_MINOR`` – The NX console device minor number. Default + is ``0`` corresponding to ``/dev/nxterm0``. +- ``CONFIG_EXAMPLES_NXTERM_DEVNAME`` – The quoted, full path to the NX console + device corresponding to ``CONFIG_EXAMPLES_NXTERM_MINOR``. Default: + ``/dev/nxterm0``. +- ``CONFIG_EXAMPLES_NXTERM_PRIO`` – Priority of the NxTerm task. Default: + ``SCHED_PRIORITY_DEFAULT``. +- ``CONFIG_EXAMPLES_NXTERM_STACKSIZE`` – Stack size allocated for the NxTerm task. + Default: ``2048``. +- ``CONFIG_EXAMPLES_NXTERM_STACKSIZE`` – The stacksize to use when creating the NX + server. Default: ``2048``. +- ``CONFIG_EXAMPLES_NXTERM_CLIENTPRIO`` – The client priority. Default: ``100``. +- ``CONFIG_EXAMPLES_NXTERM_SERVERPRIO`` – The server priority. Default: ``120``. +- ``CONFIG_EXAMPLES_NXTERM_LISTENERPRIO`` – The priority of the event listener + thread. Default: ``80``. diff --git a/Documentation/applications/examples/nxtext/index.rst b/Documentation/applications/examples/nxtext/index.rst new file mode 100644 index 0000000000..445d345fb0 --- /dev/null +++ b/Documentation/applications/examples/nxtext/index.rst @@ -0,0 +1,54 @@ +``nxtext`` Display NX Text +========================== + +This directory contains another simple test of a subset of the NX APIs defined +in ``include/nuttx/nx/nx.h``. This text focuses on text displays on the display +background combined with pop-up displays over the text. The text display will +continue to update while the pop-up is visible. + +**Note**: This example will **only** work with FB drivers and with LCD drivers +that support reading the contents of the internal LCD memory **unless** you +define ``CONFIG_EXAMPLES_NXTEXT_NOGETRUN``. If you notice garbage on the display +or a failure at the point where the display should scroll, it is probably +because you have an LCD driver that is write-only. + +The following configuration options can be selected: + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the ``NXTEXT`` example as a built-in that + can be executed from the NSH command line. +- ``CONFIG_EXAMPLES_NXTEXT_BGCOLOR`` – The color of the background. Default + depends on ``CONFIG_EXAMPLES_NXTEXT_BPP``. +- ``CONFIG_EXAMPLES_NXTEXT_BGFONTID`` – Selects the font to use in the background + text (see font ID numbers in ``include/nuttx/nx/nxfonts.h``). +- ``CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR`` – The color of the fonts used in the + background window. Default depends on ``CONFIG_EXAMPLES_NXTEXT_BPP``. +- ``CONFIG_EXAMPLES_NXTEXT_PUCOLOR`` – The color of the pop-up window. Default + depends on ``CONFIG_EXAMPLES_NXTEXT_BPP``. +- ``CONFIG_EXAMPLES_NXTEXT_PUFONTID`` – Selects the font to use in the pop-up + windows (see font ID numbers in ``include/nuttx/nx/nxfonts.h``). +- ``CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR`` – The color of the fonts used in the + background window. Default depends on ``CONFIG_EXAMPLES_NXTEXT_BPP``. +- ``CONFIG_EXAMPLES_NXTEXT_BPP`` – Pixels per pixel to use. Valid options include + ``2``, ``4``, ``8``, ``16``, ``24`` and ``32``. Default is ``32``. +- ``CONFIG_EXAMPLES_NXTEXT_NOGETRUN`` – If your display is read-only OR if reading + is not reliable, then select this configuration to avoid reading from the + display. +- ``CONFIG_EXAMPLES_NXTEXT_BMCACHE`` – The maximum number of characters that can + be put in the background window. Default is ``128``. +- ``CONFIG_EXAMPLES_NXTEXT_GLCACHE`` – The maximum number of pre-rendered fonts + that can be retained for the background window. +- ``CONFIG_EXAMPLES_NXTEXT_STACKSIZE`` – The stacksize to use when creating the NX + server. Default ``2048``. +- ``CONFIG_EXAMPLES_NXTEXT_CLIENTPRIO`` – The client priority. Default: ``100``. +- ``CONFIG_EXAMPLES_NXTEXT_SERVERPRIO`` – The server priority. Default: ``120``. +- ``CONFIG_EXAMPLES_NXTEXT_LISTENERPRIO`` – The priority of the event listener + thread. Default: ``80``. +- ``CONFIG_EXAMPLES_NXTEXT_NOTIFYSIGNO`` – The signal number to use with + ``nx_eventnotify()``. Default: ``32``. + +The example also expects the following settings and will generate an error if +they are not as expected:: + + CONFIG_DISABLE_MQUEUE=n + CONFIG_DISABLE_PTHREAD=n + CONFIG_NX_BLOCKING=y diff --git a/Documentation/applications/examples/obd2/index.rst b/Documentation/applications/examples/obd2/index.rst new file mode 100644 index 0000000000..4c5c7e6a6f --- /dev/null +++ b/Documentation/applications/examples/obd2/index.rst @@ -0,0 +1,4 @@ +``obd2`` +======== + +A simple test of ``apps/canutils/libobd2``. diff --git a/Documentation/applications/examples/oneshot/index.rst b/Documentation/applications/examples/oneshot/index.rst new file mode 100644 index 0000000000..95ce9ae54b --- /dev/null +++ b/Documentation/applications/examples/oneshot/index.rst @@ -0,0 +1,4 @@ +``oneshot`` Oneshot Timer +========================= + +Simple test of a oneshot driver. diff --git a/Documentation/applications/examples/opencyphal/index.rst b/Documentation/applications/examples/opencyphal/index.rst new file mode 100644 index 0000000000..465c11b464 --- /dev/null +++ b/Documentation/applications/examples/opencyphal/index.rst @@ -0,0 +1,4 @@ +``opencyphal`` +============== + +TODO diff --git a/Documentation/applications/examples/pca9635/index.rst b/Documentation/applications/examples/pca9635/index.rst new file mode 100644 index 0000000000..bb53be3644 --- /dev/null +++ b/Documentation/applications/examples/pca9635/index.rst @@ -0,0 +1,4 @@ +``pca9635`` ``PCA9635PW`` LED +============================= + +A simple test of the ``PCA9635PW`` LED driver. diff --git a/Documentation/applications/examples/pdcurses/index.rst b/Documentation/applications/examples/pdcurses/index.rst new file mode 100644 index 0000000000..9ceb8801a0 --- /dev/null +++ b/Documentation/applications/examples/pdcurses/index.rst @@ -0,0 +1,18 @@ +``pdcurses`` +============ + +This directory contains demonstration programs to show and test the capabilities +of ``pdcurses`` libraries. Some of them predate PDCurses, PCcurses or even +``pcurses``/``ncurses``. Although some PDCurses-specific code has been added, all +programs remain portable to other implementations (at a minimum, to ``ncurses``). + +## Building + +The demos are built by the platform-specific makefiles, in the platform +directories. There are no dependencies besides curses and the standard C +library, and no configuration is needed. + +## Distribution Status + +Public Domain, except for ``rain_main.c`` and ``worm_main.c``, which are under the +ncurses license (MIT-like). diff --git a/Documentation/applications/examples/pf_ieee802154/index.rst b/Documentation/applications/examples/pf_ieee802154/index.rst new file mode 100644 index 0000000000..a097706fe3 --- /dev/null +++ b/Documentation/applications/examples/pf_ieee802154/index.rst @@ -0,0 +1,4 @@ +``pf_ieee802154`` +================= + +TODO diff --git a/Documentation/applications/examples/pipe/index.rst b/Documentation/applications/examples/pipe/index.rst new file mode 100644 index 0000000000..f65f2c914e --- /dev/null +++ b/Documentation/applications/examples/pipe/index.rst @@ -0,0 +1,7 @@ +``pipe`` +======== + +A test of the ``mkfifo()`` and ``pipe()`` APIs. Requires ``CONFIG_PIPES`` + +- ``CONFIG_EXAMPLES_PIPE_STACKSIZE`` – Sets the size of the stack to use when + creating the child tasks. The default size is ``1024``. diff --git a/Documentation/applications/examples/poll/index.rst b/Documentation/applications/examples/poll/index.rst new file mode 100644 index 0000000000..96c87898fc --- /dev/null +++ b/Documentation/applications/examples/poll/index.rst @@ -0,0 +1,49 @@ +``poll`` +======== + +A test of the ``poll()`` and ``select()`` APIs using FIFOs and, if available, +``stdin``, and a TCP/IP socket. In order to use the TCP/IP select test, you must +have the following things selected in your NuttX configuration file: + +- ``CONFIG_NET`` – Defined for general network support. +- ``CONFIG_NET_TCP`` – Defined for TCP/IP support. +- ``CONFIG_NET_NTCP_READAHEAD_BUFFERS`` – Defined to be greater than zero. +- ``CONFIG_EXAMPLES_POLL_NOMAC`` – (May be defined to use software assigned + MAC) +- ``CONFIG_EXAMPLES_POLL_IPADDR`` – Target IP address. +- ``CONFIG_EXAMPLES_POLL_DRIPADDR`` – Default router IP address. +- ``CONFIG_EXAMPLES_POLL_NETMASK`` – Network mask. + +In order to for select to work with incoming connections, you must also select: + +- ``CONFIG_NET_TCPBACKLOG`` – Incoming connections pend in a backlog until + ``accept()`` is called. + +In additional to the target device-side example, there is also a host-side +application in this directory. It can be compiled under Linux or Cygwin as +follows:: + + cd examples/usbserial + make -f Makefile.host TOPDIR= TARGETIP= + +Where ```` is the IP address of your target board. + +This will generate a small program called 'host'. Usage: + +1. Build the ``examples/poll`` target program with TCP/IP poll support and start + the target. + +2. Then start the host application:: + + ./host + +The host and target will exchange are variety of small messages. Each message +sent from the host should cause the select to return in target. The target +example should read the small message and send it back to the host. The host +should then receive the echo'ed message. + +If networking is enabled, applications using this example will need to provide +the following definition in the ``defconfig`` file to enable the networking +library: + +- ``CONFIG_NETUTILS_NETLIB=y`` diff --git a/Documentation/applications/examples/popen/index.rst b/Documentation/applications/examples/popen/index.rst new file mode 100644 index 0000000000..5f3ec21aa5 --- /dev/null +++ b/Documentation/applications/examples/popen/index.rst @@ -0,0 +1,4 @@ +``popen`` +========= + +TODO diff --git a/Documentation/applications/examples/posix_spawn/index.rst b/Documentation/applications/examples/posix_spawn/index.rst new file mode 100644 index 0000000000..01288d7eac --- /dev/null +++ b/Documentation/applications/examples/posix_spawn/index.rst @@ -0,0 +1,72 @@ +``posix_spawn`` +=============== + +This is a simple test of the ``posix_spawn()`` API. The example derives from +``examples/elf``. As a result, these tests are built using the relocatable ELF +format installed in a ROMFS file system. At run time, the test program in the +ROMFS file system is spawned using ``posix_spawn()``. + +Requires: + +- ``CONFIG_BINFMT_DISABLE=n`` – Don't disable the binary loader. +- ``CONFIG_ELF=y`` – Enable ELF binary loader. +- ``CONFIG_LIBC_EXECFUNCS=y`` – Enable support for posix_spawn. +- ``CONFIG_EXECFUNCS_SYMTAB_ARRAY="g_spawn_exports"`` – The name of the symbol + table created by the test. +- ``CONFIG_EXECFUNCS_NSYMBOLS_VAR="g_spawn_nexports"`` – Name of variable holding + the number of symbols. +- ``CONFIG_POSIX_SPAWN_STACKSIZE=768`` – This default setting. + +Test-specific configuration options: + +- ``CONFIG_EXAMPLES_POSIXSPAWN_DEVMINOR`` – The minor device number of the ROMFS + block. driver. For example, the ``N`` in ``/dev/ramN``. Used for registering the + RAM block driver that will hold the ROMFS file system containing the ELF + executables to be tested. Default: ``0``. + +- ``CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH`` – The path to the ROMFS block driver + device. This must match ``EXAMPLES_POSIXSPAWN_DEVMINOR``. Used for registering + the RAM block driver that will hold the ROMFS file system containing the ELF + executables to be tested. Default: ``/dev/ram0``. + +**Notes**: + +1. ``CFLAGS`` should be provided in ``CELFFLAGS``. RAM and FLASH memory regions may + require long allcs. For ARM, this might be:: + + CELFFLAGS = $(CFLAGS) -mlong-calls + + Similarly for C++ flags which must be provided in ``CXXELFFLAGS``. + +2. Your top-level ``nuttx/Make.defs`` file must also include an appropriate + definition, ``LDELFFLAGS``, to generate a relocatable ELF object. With GNU LD, + this should include ``-r`` and ``-e main`` (or ``_main`` on some platforms).:: + + LDELFFLAGS = -r -e main + + If you use GCC to link, you make also need to include ``-nostdlib``. + +3. This example also requires ``genromfs``. ``genromfs`` can be build as part of the + nuttx toolchain. Or can built from the ``genromfs`` sources that can be found + in the NuttX tools repository (``genromfs-0.5.2.tar.gz``). In any event, the + ``PATH`` variable must include the path to the ``genromfs`` executable. + +4. ELF size: The ELF files in this example are, be default, quite large because + they include a lot of build garbage. You can greatly reduce the size of the + ELF binaries are using the ``objcopy --strip-unneeded`` command to remove + un-necessary information from the ELF files. + +5. Simulator. You cannot use this example with the NuttX simulator on Cygwin. + That is because the Cygwin GCC does not generate ELF file but rather some + Windows-native binary format. + + If you really want to do this, you can create a NuttX x86 buildroot toolchain + and use that be build the ELF executables for the ROMFS file system. + +6. Linker scripts. You might also want to use a linker scripts to combine + sections better. An example linker script is at + ``nuttx/binfmt/libelf/gnu-elf.ld``. That example might have to be tuned for + your particular linker output to position additional sections correctly. The + GNU LD ``LDELFFLAGS`` then might be:: + + LDELFFLAGS = -r -e main -T$(TOPDIR)/binfmt/libelf/gnu-elf.ld diff --git a/Documentation/applications/examples/powerled/index.rst b/Documentation/applications/examples/powerled/index.rst new file mode 100644 index 0000000000..ae55179377 --- /dev/null +++ b/Documentation/applications/examples/powerled/index.rst @@ -0,0 +1,9 @@ +``powerled`` +============ + +This is a powerled driver example application. This application support three +operation modes which can be selected from NSH command line: + +1. Demo mode. +2. Continuous mode. +3. Flash mode. diff --git a/Documentation/applications/examples/powermonitor/index.rst b/Documentation/applications/examples/powermonitor/index.rst new file mode 100644 index 0000000000..61e368a42f --- /dev/null +++ b/Documentation/applications/examples/powermonitor/index.rst @@ -0,0 +1,4 @@ +``powermonitor`` +================ + +TODO diff --git a/Documentation/applications/examples/pppd/index.rst b/Documentation/applications/examples/pppd/index.rst new file mode 100644 index 0000000000..306b0e24c7 --- /dev/null +++ b/Documentation/applications/examples/pppd/index.rst @@ -0,0 +1,4 @@ +``pppd`` +======== + +TODO diff --git a/Documentation/applications/examples/pty_test/index.rst b/Documentation/applications/examples/pty_test/index.rst new file mode 100644 index 0000000000..1b751aeda7 --- /dev/null +++ b/Documentation/applications/examples/pty_test/index.rst @@ -0,0 +1,4 @@ +``pty_test`` Pseudo-Terminals +============================= + +A test of NuttX pseudo-terminals. Provided by Alan Carvalho de Assis. diff --git a/Documentation/applications/examples/pwfb/index.rst b/Documentation/applications/examples/pwfb/index.rst new file mode 100644 index 0000000000..9176065f10 --- /dev/null +++ b/Documentation/applications/examples/pwfb/index.rst @@ -0,0 +1,16 @@ +``pwfb`` +======== + +A graphics example using pre-window frame buffers. The example shows three +windows containing text moving around, crossing each other from above and from +_below_. The example application is NOT updating the windows any anyway! The +application is only changing the window position. The windows are being updated +from the per-winidow framebuffers automatically. + +This example is reminiscent of Pong: Each window travels in straight line until +it hits an edge, then it bounces off. The window is also raised when it hits the +edge (gets focus). This tests all combinations of overap. + +**Note**: A significant amount of RAM, usually external SDRAM, is required to +run this demo. At 16bpp and a 480x272 display, each window requires about 70Kb +of RAM for its framebuffer. diff --git a/Documentation/applications/examples/pwlines/index.rst b/Documentation/applications/examples/pwlines/index.rst new file mode 100644 index 0000000000..c21547b52f --- /dev/null +++ b/Documentation/applications/examples/pwlines/index.rst @@ -0,0 +1,4 @@ +``pwlines`` +=========== + +TODO diff --git a/Documentation/applications/examples/pwm/index.rst b/Documentation/applications/examples/pwm/index.rst new file mode 100644 index 0000000000..8b6da9f21e --- /dev/null +++ b/Documentation/applications/examples/pwm/index.rst @@ -0,0 +1,28 @@ +``pwm`` General PWM Example +=========================== + +A test of a PWM device driver. It simply enables a pulsed output for a specified +frequency and duty for a specified period of time. This example can ONLY be +built as an NSH built-in function. + +This test depends on these specific PWM/NSH configurations settings (your +specific PWM settings might require additional settings). + +- ``CONFIG_PWM`` – Enables PWM support. +- ``CONFIG_PWM_PULSECOUNT`` – Enables PWM pulse count support (if the hardware + supports it). +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the PWM test as an NSH built-in function. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_PWM_DEVPATH`` – The path to the default PWM device. Default: + ``/dev/pwm0``. +- ``CONFIG_EXAMPLES_PWM_FREQUENCY`` – The initial PWM frequency. Default: ``100`` Hz +- ``CONFIG_EXAMPLES_PWM_DUTYPCT`` – The initial PWM duty as a percentage. Default: + ``50%``. +- ``CONFIG_EXAMPLES_PWM_DURATION`` – The initial PWM pulse train duration in + seconds. Used only if the current pulse count is zero (pulse count is only + supported if ``CONFIG_PWM_PULSECOUNT`` is defined). Default: ``5`` seconds. +- ``CONFIG_EXAMPLES_PWM_PULSECOUNT`` – The initial PWM pulse count. This option is + only available if ``CONFIG_PWM_PULSECOUNT`` is non-zero. Default: ``0`` (i.e., use + the duration, not the count). diff --git a/Documentation/applications/examples/qencoder/index.rst b/Documentation/applications/examples/qencoder/index.rst new file mode 100644 index 0000000000..5a0435bf61 --- /dev/null +++ b/Documentation/applications/examples/qencoder/index.rst @@ -0,0 +1,26 @@ +``qencoder`` Quadrature Encoder +=============================== + +This example is a simple test of a Quadrature Encoder driver. It simply reads +positional data from the encoder and prints it., + +This test depends on these specific QE/NSH configurations settings (your +specific PWM settings might require additional settings). + +- ``CONFIG_SENSORS_QENCODER`` – Enables quadrature encoder support (upper-half + driver). +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the QE test as an NSH built-in function. + Default: Built as a standalone program. + +Additional configuration options will mostly likely be required for the board- +specific lower-half driver. See the ``README.txt`` file in your board +configuration directory. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_QENCODER_DEVPATH`` – The path to the QE device. Default: + ``/dev/qe0``. +- ``CONFIG_EXAMPLES_QENCODER_NSAMPLES`` – This number of samples is collected and + the program terminates. Default: Samples are collected indefinitely. +- ``CONFIG_EXAMPLES_QENCODER_DELAY`` – This value provides the delay (in + milliseconds) between each sample. Default: ``100`` milliseconds. diff --git a/Documentation/applications/examples/random/index.rst b/Documentation/applications/examples/random/index.rst new file mode 100644 index 0000000000..eeeda94892 --- /dev/null +++ b/Documentation/applications/examples/random/index.rst @@ -0,0 +1,21 @@ +``random`` Random Numbers +========================= + +This is a very simply test of ``/dev/random``. It simple collects random numbers +and displays them on the console. + +Prerequistes: + +- ``CONFIG_DEV_RANDOM`` – Support for ``/dev/random`` must be enabled in order to + select this example. + +Configuration: + +- ``CONFIG_EXAMPLES_RANDOM`` – Enables the ``/dev/random`` test. +- ``CONFIG_EXAMPLES_MAXSAMPLES`` – This is the size of the ``/dev/random`` I/O + buffer in units of 32-bit samples. Careful! This buffer is allocated on the + stack as needed! Default ``64``. +- ``CONFIG_EXAMPLES_NSAMPLES`` – When you execute the ``rand`` command, a number of + samples ranging from ``1`` to ``EXAMPLES_MAXSAMPLES`` may be specified. If no + argument is specified, this is the default number of samples that will be + collected and displayed. Default ``8``. diff --git a/Documentation/applications/examples/relays/index.rst b/Documentation/applications/examples/relays/index.rst new file mode 100644 index 0000000000..b7ab5b929e --- /dev/null +++ b/Documentation/applications/examples/relays/index.rst @@ -0,0 +1,10 @@ +``relays`` Relays +================= + +Requires ``CONFIG_ARCH_RELAYS``. Contributed by Darcy Gong. + +**Note**: This test exercises internal relay driver interfaces. As such, it +relies on internal OS interfaces that are not normally available to a user-space +program. As a result, this example cannot be used if a NuttX is built as a +protected, supervisor kernel (``CONFIG_BUILD_PROTECTED`` or +``CONFIG_BUILD_KERNEL``). diff --git a/Documentation/applications/examples/rfid_readuid/index.rst b/Documentation/applications/examples/rfid_readuid/index.rst new file mode 100644 index 0000000000..cebc71eafe --- /dev/null +++ b/Documentation/applications/examples/rfid_readuid/index.rst @@ -0,0 +1,4 @@ +``rfid_readuid`` RFID example +============================= + +RFID ``READUID`` example. diff --git a/Documentation/applications/examples/rgbled/index.rst b/Documentation/applications/examples/rgbled/index.rst new file mode 100644 index 0000000000..c2ffe2da41 --- /dev/null +++ b/Documentation/applications/examples/rgbled/index.rst @@ -0,0 +1,5 @@ +``rgbled`` RGB LED Using PWM +============================ + +This example demonstrates the use of the RGB led driver to drive an RGB LED with +PWM outputs so that all color characteristcs of RGB LED can be controlled. diff --git a/Documentation/applications/examples/romfs/index.rst b/Documentation/applications/examples/romfs/index.rst new file mode 100644 index 0000000000..03c408b68a --- /dev/null +++ b/Documentation/applications/examples/romfs/index.rst @@ -0,0 +1,11 @@ +``romfs`` File System +===================== + +This example exercises the romfs filesystem. Configuration options include: + +- ``CONFIG_EXAMPLES_ROMFS_RAMDEVNO`` – The minor device number to use for the ROM + disk. The default is ``1`` (meaning ``/dev/ram1``). +- ``CONFIG_EXAMPLES_ROMFS_SECTORSIZE`` – The ROM disk sector size to use. Default + is ``64``. +- ``CONFIG_EXAMPLES_ROMFS_MOUNTPOINT`` – The location to mount the ROM disk. + Default: ``/usr/local/share``. diff --git a/Documentation/applications/examples/rpmsgsocket/index.rst b/Documentation/applications/examples/rpmsgsocket/index.rst new file mode 100644 index 0000000000..1a5400f3bc --- /dev/null +++ b/Documentation/applications/examples/rpmsgsocket/index.rst @@ -0,0 +1,4 @@ +``rpmsgsocket`` +=============== + +TODO diff --git a/Documentation/applications/examples/sendmail/index.rst b/Documentation/applications/examples/sendmail/index.rst new file mode 100644 index 0000000000..e23215d429 --- /dev/null +++ b/Documentation/applications/examples/sendmail/index.rst @@ -0,0 +1,38 @@ +``sendmail`` SMTP Client +======================== + +This examples exercises the uIP SMTP logic by sending a test message to a +selected recipient. This test can also be built to execute on the Cygwin/Linux +host environment:: + + cd examples/sendmail + make -f Makefile.host TOPDIR= + +Settings unique to this example include: + +- ``CONFIG_EXAMPLES_SENDMAIL_NOMAC`` – May be defined to use software assigned + MAC (optional) +- ``CONFIG_EXAMPLES_SENDMAIL_IPADDR`` – Target IP address (required) +- ``CONFIG_EXAMPLES_SENDMAIL_DRIPADDR`` – Default router IP address (required) +- ``CONFIG_EXAMPLES_SENDMAILT_NETMASK`` – Network mask (required) +- ``CONFIG_EXAMPLES_SENDMAIL_RECIPIENT`` – The recipient of the email (required) +- ``CONFIG_EXAMPLES_SENDMAIL_SENDER`` – Optional. Default: + ``nuttx-testing@example.com`` +- ``CONFIG_EXAMPLES_SENDMAIL_SUBJECT`` – Optional. Default: ``Testing SMTP from + NuttX`` +- ``CONFIG_EXAMPLES_SENDMAIL_BODY`` – Optional. Default: ``Test message sent + by NuttX`` + +**Note 1**: This test has not been verified on the NuttX target environment. As +of this writing, unit-tested in the Cygwin/Linux host environment. + +**Note 2**: This sendmail example only works for the simplest of environments. +Virus protection software on your host may have to be disabled to allow you to +send messages. Only very open, unprotected recipients can be used. Most will +protect themselves from this test email because it looks like SPAM. + +Applications using this example will need to enable the following netutils +libraries in their defconfig file: :: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETUTILS_SMTP=y diff --git a/Documentation/applications/examples/serialblaster/index.rst b/Documentation/applications/examples/serialblaster/index.rst new file mode 100644 index 0000000000..67ca1471b9 --- /dev/null +++ b/Documentation/applications/examples/serialblaster/index.rst @@ -0,0 +1,6 @@ +``serialblaster`` +================= + +Sends a repeating pattern (the alphabet) out a serial port continuously. This +may be useful if you are trying run down other problems that you think might +only occur when the serial port usage is high. diff --git a/Documentation/applications/examples/serialrx/index.rst b/Documentation/applications/examples/serialrx/index.rst new file mode 100644 index 0000000000..1592e1b545 --- /dev/null +++ b/Documentation/applications/examples/serialrx/index.rst @@ -0,0 +1,6 @@ +``serialrx`` +============ + +Constant receives serial data. This is the complement to ``serialblaster``. This +may be useful if you are trying run down other problems that you think might +only occur when the serial port usage is high. diff --git a/Documentation/applications/examples/serloop/index.rst b/Documentation/applications/examples/serloop/index.rst new file mode 100644 index 0000000000..48ca279dff --- /dev/null +++ b/Documentation/applications/examples/serloop/index.rst @@ -0,0 +1,8 @@ +``serloop`` Serial Loopback +=========================== + +This is a mindlessly simple loopback test on the console. Useful for testing new +serial drivers. Configuration options include: + +- ``CONFIG_EXAMPLES_SERLOOP_BUFIO`` – Use C buffered I/O (``getchar``/``putchar``) vs. + raw console I/O (read/read). diff --git a/Documentation/applications/examples/shm_test/index.rst b/Documentation/applications/examples/shm_test/index.rst new file mode 100644 index 0000000000..fedfb0f2d1 --- /dev/null +++ b/Documentation/applications/examples/shm_test/index.rst @@ -0,0 +1,4 @@ +``shm_test`` +============ + +TODO diff --git a/Documentation/applications/examples/sht3x/index.rst b/Documentation/applications/examples/sht3x/index.rst new file mode 100644 index 0000000000..c7932e5d6c --- /dev/null +++ b/Documentation/applications/examples/sht3x/index.rst @@ -0,0 +1,4 @@ +``sht3x`` +========= + +TODO diff --git a/Documentation/applications/examples/slcd/index.rst b/Documentation/applications/examples/slcd/index.rst new file mode 100644 index 0000000000..16e9fc65fc --- /dev/null +++ b/Documentation/applications/examples/slcd/index.rst @@ -0,0 +1,6 @@ +``slcd`` Alphanumeric Segment LCD +================================= + +A simple test of alphanumeric, segment LCDs (SLCDs). + +- ``CONFIG_EXAMPLES_SLCD`` – Enable the SLCD test diff --git a/Documentation/applications/examples/smps/index.rst b/Documentation/applications/examples/smps/index.rst new file mode 100644 index 0000000000..2b0b652207 --- /dev/null +++ b/Documentation/applications/examples/smps/index.rst @@ -0,0 +1,4 @@ +``smps`` Switched-Mode Power Supply +=================================== + +This is a SMPS (Switched-mode power supply) driver example application. diff --git a/Documentation/applications/examples/sotest/index.rst b/Documentation/applications/examples/sotest/index.rst new file mode 100644 index 0000000000..cf39999af9 --- /dev/null +++ b/Documentation/applications/examples/sotest/index.rst @@ -0,0 +1,59 @@ +``sotest`` Shared Library Module Test +===================================== + +This example builds a small shared library module test case. The test shared +library is built using the relocatable ELF format and installed in a ROMFS file +system. At run time, the shared library is installed and exercised. Requires +``CONFIG_LIBC_DLFCN``. Other configuration options: + +- ``CONFIG_EXAMPLES_SOTEST_DEVMINOR`` – The minor device number of the ROMFS block + driver. For example, the ``N`` in ``/dev/ramN``. Used for registering the RAM + block driver that will hold the ROMFS file system containing the ELF + executables to be tested. Default: ``0``. + +- ``CONFIG_EXAMPLES_SOTEST_DEVPATH`` – The path to the ROMFS block driver device. + This must match ``EXAMPLES_ELF_DEVMINOR``. Used for registering the RAM block + driver that will hold the ROMFS file system containing the ELF executables to + be tested. Default: ``/dev/ram0``. + +**Notes**: + +1. ``CFLAGS`` should be provided in ``CMODULEFLAGS``. RAM and FLASH memory regions + may require long allcs. For ARM, this might be:: + + CMODULEFLAGS = $(CFLAGS) -mlong-calls + + Similarly for C++ flags which must be provided in ``CXXMODULEFLAGS``. + +2. Your top-level ``nuttx/Make.defs`` file must also include an appropriate + definition, ``LDMODULEFLAGS``, to generate a relocatable ELF object. With GNU + LD, this should include ``-r`` and ``-e ``.:: + + LDMODULEFLAGS = -r -e module_initialize + + If you use GCC to link, you make also need to include ``-nostdlib``. + +3. This example also requires ``genromfs``. ``genromfs`` can be build as part of the + nuttx toolchain. Or can built from the ``genromfs`` sources that can be found + in the NuttX tools repository (``genromfs-0.5.2.tar.gz``). In any event, the + ``PATH`` variable must include the path to the ``genromfs`` executable. + +4. ELF size: The ELF files in this example are, be default, quite large because + they include a lot of build garbage. You can greatly reduce the size of the + ELF binaries are using the ``objcopy --strip-unneeded`` command to remove + un-necessary information from the ELF files. + +5. Simulator. You cannot use this example with the NuttX simulator on Cygwin. + That is because the Cygwin GCC does not generate ELF file but rather some + Windows-native binary format. + + If you really want to do this, you can create a NuttX x86 buildroot toolchain + and use that be build the ELF executables for the ROMFS file system. + +6. Linker scripts. You might also want to use a linker scripts to combine + sections better. An example linker script is at + ``nuttx/libc/modlib/gnu-elf.ld``. That example might have to be tuned for your + particular linker output to position additional sections correctly. The GNU + LD ``LDMODULEFLAGS`` then might be:: + + LDMODULEFLAGS = -r -e module_initialize -T$(TOPDIR)/libc/modlib/gnu-elf.ld diff --git a/Documentation/applications/examples/stat/index.rst b/Documentation/applications/examples/stat/index.rst new file mode 100644 index 0000000000..053a43b803 --- /dev/null +++ b/Documentation/applications/examples/stat/index.rst @@ -0,0 +1,6 @@ +``stat`` +======== + +A simple test of ``stat()``, ``fstat()``, and ``statfs()``. This is useful primarily +for bringing up a new file system and verifying the correctness of these +operations. diff --git a/Documentation/applications/examples/sx127x_demo/index.rst b/Documentation/applications/examples/sx127x_demo/index.rst new file mode 100644 index 0000000000..fc4c725793 --- /dev/null +++ b/Documentation/applications/examples/sx127x_demo/index.rst @@ -0,0 +1,4 @@ +``sx127x_demo`` ``SX127X`` Radio +================================ + +This example demonstrates the use of the ``SX127X`` radio. diff --git a/Documentation/applications/examples/system/index.rst b/Documentation/applications/examples/system/index.rst new file mode 100644 index 0000000000..6b3ffaf2ff --- /dev/null +++ b/Documentation/applications/examples/system/index.rst @@ -0,0 +1,9 @@ +``system`` +========== + +This is a simple test of the ``system()`` command. The test simply executes this +``system`` command: + +.. code-block:: C + + ret = system("ls -Rl /"); diff --git a/Documentation/applications/examples/tcp_ipc_client/index.rst b/Documentation/applications/examples/tcp_ipc_client/index.rst new file mode 100644 index 0000000000..f70d0f62bf --- /dev/null +++ b/Documentation/applications/examples/tcp_ipc_client/index.rst @@ -0,0 +1,29 @@ +``tcp_ipc_client`` +================== + +What's this? +------------ + +This program consists of a client socket & custom messages that send data (hex-string formatted data) to a server (tcp_ipc_server). +Then, tcp_ipc_server send this data over LoraWAN (using Radioenge LoRaWAN module). It means using TCP/IP sockets as IPC channel to ensure controlled access to LoRaWAN connectivity. +The goals of using this approach to send LoRaWAN data are: + +- Having a solid and reliable infrastructure to ensure IPC works fine for multiple applications simultaneously +- Having the possibility to host different IoT projects and solutions that use LPWAN in a single ESP32 +- Having the possibility to validate, test and debug multiple IoT projects and solutions at the same time, under the same connectivity conditions (same signal strength, same antenna, same modem/transceiver, etc.) + +Both client and server work on local network scope. + +How do I use this? +------------------ + +In order to test tcp_ipc_client & tcp_ipc_server together, there are two ways to proceed: + +- Init server manually (command: SERVER &), and after successfull server init, also init client manually (CLIENT 127.0.0.1) +- init server automatically after boot using NuttShell start up scripts (check: https://nuttx.apache.org/docs/latest/applications/nsh/installation.html#nuttshell-start-up-scripts ) + +Additional info +--------------- + +Both tcp_ipc_client and tcp_ipc_server examples have been full covered in NuttX International Workshop 2022. You can watch the full presentation here: https://www.youtube.com/watch?v=hr0OfTt1KeY +The tcp_ipc_server and tcp_ipc_client examples have been developed by Flavio Ipirranga and Pedro Bertoleti from Instituto de Pesquisas Eldorado (IPE) in Brazil. diff --git a/Documentation/applications/examples/tcp_ipc_server/index.rst b/Documentation/applications/examples/tcp_ipc_server/index.rst new file mode 100644 index 0000000000..b176e5546e --- /dev/null +++ b/Documentation/applications/examples/tcp_ipc_server/index.rst @@ -0,0 +1,31 @@ +``tcp_ipc_server`` +================== + +What's this? +------------ + +This program consists of a server socket & custom messages to establish IPC for multiple applications (client_tcp) and one process that controls LoRaWAN connectivity (server_tcp). +For more details about client side, please see client_tcp example. + +This approach using TCP/IP sockets as IPC channel ensures controlled access to LoRaWAN connectivity. +The goals of using this approach are: + +- Having a solid and reliable infrastructure to ensure IPC works fine for multiple applications simultaneously +- Having the possibility to host different IoT projects and solutions that use LPWAN in a single ESP32 +- Having the possibility to validate, test and debug multiple IoT projects and solutions at the same time, under the same connectivity conditions (same signal strength, same antenna, same modem/transceiver, etc.) + +Both client and server work on local network scope. + +How do I use this? +------------------- + +In order to test client_tcp & server_tcp together, there are two ways to proceed: + +- Init server manually (command: SERVER &), and after successfull server init, also init client manually (CLIENT 127.0.0.1) +- init server automatically after boot using NuttShell start up scripts (check: https://nuttx.apache.org/docs/latest/applications/nsh/installation.html#nuttshell-start-up-scripts ) + +Additional info +--------------- + +Both client_tcp and server_tcp examples have been full covered in NuttX International Workshop 2022. You can watch the full presentation here: https://www.youtube.com/watch?v=hr0OfTt1KeY +The server_tcp and client_tcp examples have been developed by Flavio Ipirranga and Pedro Bertoleti from Instituto de Pesquisas Eldorado (IPE) in Brazil. diff --git a/Documentation/applications/examples/tcpblaster/index.rst b/Documentation/applications/examples/tcpblaster/index.rst new file mode 100644 index 0000000000..06700a06d2 --- /dev/null +++ b/Documentation/applications/examples/tcpblaster/index.rst @@ -0,0 +1,42 @@ +``tcpblaster`` TCP Performance Test +=================================== + +The ``tcpblaster`` example derives from the ``nettest`` example and basically +duplicates that example when the ``nettest`` PERFORMANCE option is selected. +``tcpblaster`` has a little better reporting of performance stats, however. + +To set up, do ``make menuconfig`` and select the Apps → Examples → tcpblaster. +By default, nuttx will the be the client which sends data; and the +host computer (Linux, macOS, or Windows) will be the server. + +Set up networking so the nuttx computer can ping the host, and the host can ping +nuttx. Now you are ready to run the test. + +On host:: + + $ ./tcpserver + Binding to IPv4 Address: 00000000 + server: Accepting connections on port 5471 + +On nuttx:: + + nsh> tcpclient + Connecting to IPv4 Address: 0100000a + client: Connected + [2014-07-31 00:16:15.000] 0: Sent 200 4096-byte buffers: 800.0 KB (avg 4.0 KB) in 0.18 seconds (4444.4 KB/second) + +Now on the host you should see something like:: + + $ ./tcpserver + Binding to IPv4 Address: 00000000 + server: Accepting connections on port 5471 + server: Connection accepted -- receiving + [2020-02-22 16:17:07.000] 0: Received 200 buffers: 502.9 KB (buffer average size: 2.5 KB) in 0.12 seconds (4194.8 KB/second) + [2020-02-22 16:17:07.000] 1: Received 200 buffers: 393.1 KB (buffer average size: 2.0 KB) in 0.09 seconds (4299.4 KB/second) + +This will tell you the link speed in KB/sec – kilobytes per second. If you want +kilobits, multiply by ``8``. + +You can use the ``make menuconfig`` to reverse the setup, and have nuttx be the +server, and the host be the client. If you do that, start the server first +(nuttx), then start the client (host). diff --git a/Documentation/applications/examples/tcpecho/index.rst b/Documentation/applications/examples/tcpecho/index.rst new file mode 100644 index 0000000000..afdbdc6a13 --- /dev/null +++ b/Documentation/applications/examples/tcpecho/index.rst @@ -0,0 +1,19 @@ +``tcpecho`` TCP Echo Server +=========================== + +Simple single threaded, poll based TCP echo server. This example implements the +TCP Echo Server from W. Richard Stevens "UNIX Network Programming" Book. +Contributed by Max Holtberg. + +See also ``examples/nettest`` + +- ``CONFIG_EXAMPLES_TCPECHO=y`` – Enables the TCP echo server. +- ``CONFIG_XAMPLES_TCPECHO_PORT`` – Server Port, default ``80``. +- ``CONFIG_EXAMPLES_TCPECHO_BACKLOG`` – Listen Backlog, default ``8``. +- ``CONFIG_EXAMPLES_TCPECHO_NCONN`` – Number of Connections, default ``8``. +- ``CONFIG_EXAMPLES_TCPECHO_DHCPC`` – DHCP Client, default ``n``. +- ``CONFIG_EXAMPLES_TCPECHO_NOMAC`` – Use Canned MAC Address, default ``n``. +- ``CONFIG_EXAMPLES_TCPECHO_IPADDR`` – Target IP address, default ``0x0a000002``. +- ``CONFIG_EXAMPLES_TCPECHO_DRIPADDR`` – Default Router IP address (Gateway), + default ``0x0a000001``. +- ``CONFIG_EXAMPLES_TCPECHO_NETMASK`` – Network Mask, default ``0xffffff00``. diff --git a/Documentation/applications/examples/telnetd/index.rst b/Documentation/applications/examples/telnetd/index.rst new file mode 100644 index 0000000000..a43d7619a9 --- /dev/null +++ b/Documentation/applications/examples/telnetd/index.rst @@ -0,0 +1,32 @@ +``telnetd`` Simple Telnet Shell +=============================== + +This directory contains a functional port of the tiny uIP shell. In the NuttX +environment, the NuttShell (at ``apps/nshlib``) supersedes this tiny shell and +also supports ``telnetd``. + +- ``CONFIG_EXAMPLES_TELNETD`` – Enable the Telnetd example. +- ``CONFIG_NETUTILS_NETLIB``, ``CONFIG_NETUTILS_TELNETD`` – Enable netutils libraries + needed by the Telnetd example. +- ``CONFIG_EXAMPLES_TELNETD_DAEMONPRIO`` – Priority of the Telnet daemon. Default: + ``SCHED_PRIORITY_DEFAULT``. +- ``CONFIG_EXAMPLES_TELNETD_DAEMONSTACKSIZE`` – Stack size allocated for the + Telnet daemon. Default: ``2048``. +- ``CONFIG_EXAMPLES_TELNETD_CLIENTPRIO`` – Priority of the Telnet client. Default: + ``SCHED_PRIORITY_DEFAULT``. +- ``CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE`` – Stack size allocated for the + Telnet client. Default: ``2048``. +- ``CONFIG_EXAMPLES_TELNETD_NOMAC`` – If the hardware has no MAC address of its + own, define this ``=y`` to provide a bogus address for testing. +- ``CONFIG_EXAMPLES_TELNETD_IPADDR`` – The target IP address. Default ``10.0.0.2``. +- ``CONFIG_EXAMPLES_TELNETD_DRIPADDR`` – The default router address. Default + ``10.0.0.1``. +- ``CONFIG_EXAMPLES_TELNETD_NETMASK`` – The network mask. Default: + ``255.255.255.0``. + +Also, make sure that you have the following set in the NuttX configuration file +or else the performance will be very bad (because there will be only one +character per TCP transfer): + +- ``CONFIG_STDIO_BUFFER_SIZE`` – Some value ``>= 64`` +- ``CONFIG_STDIO_LINEBUFFER=y`` diff --git a/Documentation/applications/examples/termios/index.rst b/Documentation/applications/examples/termios/index.rst new file mode 100644 index 0000000000..a0fc8ce56e --- /dev/null +++ b/Documentation/applications/examples/termios/index.rst @@ -0,0 +1,9 @@ +``termios`` Simple Termios interface test +========================================= + +This directory contains a simple application that uses the termios interface +to change serial parameters. Just import a ``nsh`` config and enable the +following symbols: + +- ``CONFIG_SERIAL_TERMIOS`` – Enable the termios support. +- ``CONFIG_EXAMPLES_TERMIOS`` – Enable the example itself. diff --git a/Documentation/applications/examples/thttpd/index.rst b/Documentation/applications/examples/thttpd/index.rst new file mode 100644 index 0000000000..d449026c92 --- /dev/null +++ b/Documentation/applications/examples/thttpd/index.rst @@ -0,0 +1,17 @@ +``thttpd`` THTTPD server +======================== + +An example that builds ``netutils/thttpd`` with some simple NXFLAT CGI programs. +See ``boards/README.txt`` for most THTTPD settings. In addition to those, this +example accepts: + +- ``CONFIG_EXAMPLES_THTTPD_NOMAC`` – (May be defined to use software assigned + MAC) +- ``CONFIG_EXAMPLES_THTTPD_DRIPADDR`` – Default router IP address. +- ``CONFIG_EXAMPLES_THTTPD_NETMASK`` – Network mask. + +Applications using this example will need to enable the following ``netutils`` +libraries in the ``defconfig`` file: :: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETUTILS_THTTPD=y diff --git a/Documentation/applications/examples/tiff/index.rst b/Documentation/applications/examples/tiff/index.rst new file mode 100644 index 0000000000..bad9860f70 --- /dev/null +++ b/Documentation/applications/examples/tiff/index.rst @@ -0,0 +1,20 @@ +``tiff`` +======== + +This is a simple unit test for the TIFF creation library at ``apps/graphic/tiff``. +It is configured to work in the Linux user-mode simulation and has not been +tested in any other environment. + +At a minimum, to run in an embedded environment, you will probably have to +change the configured paths to the TIFF files defined in the example. + +- ``CONFIG_EXAMPLES_TIFF_OUTFILE`` – Name of the resulting TIFF file. Default is + ``/tmp/result.tif``. +- ``CONFIG_EXAMPLES_TIFF_TMPFILE1/2`` – Names of two temporaries files that will + be used in the file creation. Defaults are ``/tmp/tmpfile1.dat`` and + ``/tmp/tmpfile2.dat``. + +The following must also be defined in your ``apps/`` configuration file: :: + + CONFIG_EXAMPLES_TIFF=y + CONFIG_GRAPHICS_TIFF=y diff --git a/Documentation/applications/examples/timer/index.rst b/Documentation/applications/examples/timer/index.rst new file mode 100644 index 0000000000..ec17e01360 --- /dev/null +++ b/Documentation/applications/examples/timer/index.rst @@ -0,0 +1,23 @@ +``timer`` +========= + +This is a simple test of the timer driver (see ``include/nuttx/timers/timer.h``). + +Dependencies: + +- ``CONFIG_TIMER`` – The timer driver must be selected + +Example configuration: + +- ``CONFIG_EXAMPLES_TIMER_DEVNAME`` – This is the name of the timer device that + will be tested. Default: ``/dev/timer0``. +- ``CONFIG_EXAMPLES_TIMER_INTERVAL`` – This is the timer interval in microseconds. + Default: ``1000000``. +- ``CONFIG_EXAMPLES_TIMER_DELAY`` – This is the delay between timer samples in + microseconds. Default: ``10000``. +- ``CONFIG_EXAMPLES_TIMER_STACKSIZE`` – This is the stack size allocated when the + timer task runs. Default: ``2048``. +- ``CONFIG_EXAMPLES_TIMER_PRIORITY`` – This is the priority of the timer task: + Default: ``100``. +- ``CONFIG_EXAMPLES_TIMER_PROGNAME`` – This is the name of the program that will + be used when the NSH ELF program is installed. Default: ``timer``. diff --git a/Documentation/applications/examples/timer_gpio/index.rst b/Documentation/applications/examples/timer_gpio/index.rst new file mode 100644 index 0000000000..30d14b740e --- /dev/null +++ b/Documentation/applications/examples/timer_gpio/index.rst @@ -0,0 +1,35 @@ +``timer_gpio`` +============== + +This example uses the timer interrupt to periodically change the state of a +digital output. The digital output may be a relay, a led or anything else. +This example can be very useful to validate timer drivers by using a logic +analyzer connected to the digital output. This example mainly differs from +the timer example because it waits on a sigwaitinfo() instead of using a +signal handler. This approach ensures a deterministic wake-up time when the +signal occurs. + +Dependencies: + +- ``CONFIG_TIMER`` – The timer driver must be selected. +- ``CONFIG_DEV_GPIO`` – The GPIO driver must be selected. + +Note: You should also select one timer instance and have the gpio driver +properly configured in your board logic. + +Example configuration: + +- ``EXAMPLES_TIMER_GPIO_TIM_DEVNAME`` – This is the name of the timer device + that will be used. Default: ``/dev/timer0``. +- ``EXAMPLES_TIMER_GPIO_GPIO_DEVNAME`` – This is the name of the gpio device + that will be used. Default: ``/dev/gpio0``. +- ``EXAMPLES_TIMER_GPIO_INTERVAL`` – This is the timer interval in + microseconds. Default: ``1000000``. +- ``EXAMPLES_TIMER_GPIO_SIGNO`` – This is the signal number that is used to + notify that a timer interrupt occurred. Default: ``32``. +- ``EXAMPLES_TIMER_GPIO_STACKSIZE`` – This is the stack size allocated when the + timer task runs. Default: ``2048``. +- ``EXAMPLES_TIMER_GPIO_PRIORITY`` – This is the priority of the timer task. + Default: ``255``. +- ``EXAMPLES_TIMER_GPIO_PROGNAME`` – This is the name of the program that will + be used from the nsh. Default: ``timer_gpio``. diff --git a/Documentation/applications/examples/touchscreen/index.rst b/Documentation/applications/examples/touchscreen/index.rst new file mode 100644 index 0000000000..c12bc95f3a --- /dev/null +++ b/Documentation/applications/examples/touchscreen/index.rst @@ -0,0 +1,38 @@ +``touchscreen`` Touchscreen Events +================================== + +This configuration implements a simple touchscreen test at +``apps/examples/touchscreen``. This test will create an empty X11 window and will +print the touchscreen output as it is received from the simulated touchscreen +driver. + +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the touchscreen test as an NSH built-in + function. Default: Built as a standalone program. +- ``CONFIG_EXAMPLES_TOUCHSCREEN_MINOR`` – The minor device number. Minor ``N`` + corresponds to touchscreen device ``/dev/inputN``. Note this value must with + ``CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH``. Default ``0``. +- ``CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH`` – The path to the touchscreen device. + This must be consistent with ``CONFIG_EXAMPLES_TOUCHSCREEN_MINOR``. Default: + ``/dev/input0``. +- ``CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES`` – This number of samples is collected + and the program terminates. Default: Samples are collected indefinitely. +- ``CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE`` – The touchscreen test can also be + configured to work with a mouse driver by setting this option. + +The following additional configurations must be set in the NuttX configuration +file: + +- ``CONFIG_INPUT=y`` (plus any touchscreen-specific settings) + +The following must also be defined in your apps configuration file: + +- ``CONFIG_EXAMPLES_TOUCHSREEN=y`` + +This example code will call ``boardctl()`` to setup the touchscreen driver for +texting. The implementation of ``boardctl()`` will require that board- specific +logic provide the following interfaces that will be called by the ``boardctl()`` +in order to initialize the touchscreen hardware: + +.. code-block:: C + + int board_tsc_setup(int minor); diff --git a/Documentation/applications/examples/udgram/index.rst b/Documentation/applications/examples/udgram/index.rst new file mode 100644 index 0000000000..1e3ffe2efb --- /dev/null +++ b/Documentation/applications/examples/udgram/index.rst @@ -0,0 +1,4 @@ +``udgram`` +========== + +TODO diff --git a/Documentation/applications/examples/udp/index.rst b/Documentation/applications/examples/udp/index.rst new file mode 100644 index 0000000000..d6cf351045 --- /dev/null +++ b/Documentation/applications/examples/udp/index.rst @@ -0,0 +1,16 @@ +``udp`` Client/Server Over UDP +============================== + +This is a simple network test for verifying client- and server- functionality +over UDP. + +Applications using this example will need to enabled the following ``netutils`` +libraries in the ``defconfig`` file: + +- ``CONFIG_NETUTILS_NETLIB=y`` + +Possible configurations: + +- Server on target hardware; client on host. +- Client on target hardware; Server on host. +- Server and Client on different targets. diff --git a/Documentation/applications/examples/udpblaster/index.rst b/Documentation/applications/examples/udpblaster/index.rst new file mode 100644 index 0000000000..096727a8d5 --- /dev/null +++ b/Documentation/applications/examples/udpblaster/index.rst @@ -0,0 +1,5 @@ +``udpblaster`` +============== + +This is a simple network test for stressing UDP transfers. It simply sends UDP +packets from both the host and the target and the highest possible rate. diff --git a/Documentation/applications/examples/uid/index.rst b/Documentation/applications/examples/uid/index.rst new file mode 100644 index 0000000000..43411c2e07 --- /dev/null +++ b/Documentation/applications/examples/uid/index.rst @@ -0,0 +1,4 @@ +``uid`` +======= + +TODO diff --git a/Documentation/applications/examples/unionfs/index.rst b/Documentation/applications/examples/unionfs/index.rst new file mode 100644 index 0000000000..2402bb15ec --- /dev/null +++ b/Documentation/applications/examples/unionfs/index.rst @@ -0,0 +1,28 @@ +``unionfs`` Union File System +============================= + +This is at trivial test of the Union File System. See +``nuttx/fs/unionfs/README.txt``. Dependencies: + +- ``CONFIG_DISABLE_MOUNTPOINT`` – Mountpoint support must not be + disabled. +- ``CONFIG_FS_ROMFS`` – ROMFS support is required. +- ``CONFIG_FS_UNIONFS`` – Union File System support is required. + +Configuration options. Use the defaults if you are unsure of what you are doing: + +- ``CONFIG_EXAMPLES_UNIONFS`` – Enables the example. +- ``CONFIG_EXAMPLES_UNIONFS_MOUNTPT`` – Mountpoint path for the Union File + System. +- ``CONFIG_EXAMPLES_UNIONFS_TMPA`` – Temporary mount point for file system + ``1``. +- ``CONFIG_EXAMPLES_UNIONFS_TMPB`` – Temporary mount point for file system + ``2``. +- ``CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A`` – ROMFS file system ``1`` RAM disk device + number. +- ``CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B`` – ROMFS file system ``2`` RAM disk device + number. +- ``CONFIG_EXAMPLES_UNIONFS_SECTORSIZE`` – ROM disk sector size. + +See the ``README.txt`` file at ``nuttx/boards/sim/sim/sim/README.txt`` for a +walk-through of the output of this text. diff --git a/Documentation/applications/examples/usbserial/index.rst b/Documentation/applications/examples/usbserial/index.rst new file mode 100644 index 0000000000..0bae8bcd83 --- /dev/null +++ b/Documentation/applications/examples/usbserial/index.rst @@ -0,0 +1,69 @@ +``usbserial`` USB Serial Hello World +==================================== + +Target configuration +-------------------- + +This is another implementation of "Hello, World" but this one uses a USB serial +driver. Configuration options can be used to simply the test. These options +include: + +- ``CONFIG_EXAMPLES_USBSERIAL_INONLY`` – Only verify IN (device-to-host) data + transfers. Default: both. +- ``CONFIG_EXAMPLES_USBSERIAL_OUTONLY`` – Only verify OUT (host-to-device) data + transfers. Default: both. +- ``CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL`` – Send only small, single packet + messages. Default: Send large and small. +- ``CONFIG_EXAMPLES_USBSERIAL_ONLYBIG`` – Send only large, multi-packet messages. + Default: Send large and small. + +If ``CONFIG_USBDEV_TRACE`` is enabled (or ``CONFIG_DEBUG_FEATURES`` and +``CONFIG_DEBUG_USB``), then the example code will also manage the USB trace +output. The amount of trace output can be controlled using: + +- ``CONFIG_EXAMPLES_USBSERIAL_TRACEINIT`` – Show initialization events. +- ``CONFIG_EXAMPLES_USBSERIAL_TRACECLASS`` – Show class driver events. +- ``CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS`` – Show data transfer events. +- ``CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER`` – Show controller events. +- ``CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS`` – Show interrupt-related events. + +Error results are always shown in the trace output. + +Host-side test program +---------------------- + +In additional to the target device-side example, there is also a host-side +application in this directory. This host side application must be executed on a +Linux host in order to perform the ``USBSERIAL`` test. The host application can be +compiled under Linux (or Cygwin?) as follows:: + + cd examples/usbserial + make -f Makefile.host TOPDIR= + +Running the test +---------------- + +This will generate a small program called ``host``. Usage: + +1. Build the ``examples/usbserial`` target program and start the target. + +2. Wait a bit, then do enter:: + + dmesg + + At the end of the dmesg output, you should see the serial device was + successfully idenfied and assigned to a tty device, probably ``/dev/ttyUSB0`` + or ``/dev/ttyACM0`` (depending on the configured USB serial driver). + +3. Then start the host application:: + + ./host [] + + Where: + + - ```` is the USB TTY device to use. The default is ``/dev/ttyUSB0`` + (for the PL2303 emulation) or ``/dev/ttyACM0`` (for the CDC/ACM serial + device). + +The host and target will exchange are variety of very small and very large +serial messages. diff --git a/Documentation/applications/examples/userfs/index.rst b/Documentation/applications/examples/userfs/index.rst new file mode 100644 index 0000000000..8c6f91bf75 --- /dev/null +++ b/Documentation/applications/examples/userfs/index.rst @@ -0,0 +1,4 @@ +``userfs`` UserFS File System +============================= + +A simple test of the UserFS file system. diff --git a/Documentation/applications/examples/usrsocktest/index.rst b/Documentation/applications/examples/usrsocktest/index.rst new file mode 100644 index 0000000000..da391ad2bb --- /dev/null +++ b/Documentation/applications/examples/usrsocktest/index.rst @@ -0,0 +1,4 @@ +``usrsocktest`` +=============== + +TODO diff --git a/Documentation/applications/examples/ustream/index.rst b/Documentation/applications/examples/ustream/index.rst new file mode 100644 index 0000000000..c8e1c08b17 --- /dev/null +++ b/Documentation/applications/examples/ustream/index.rst @@ -0,0 +1,15 @@ +``ustream`` Unix Stream Sockets +=============================== + +This is the same test as ``examples/udp`` and similar to ``examples/udgram``, but +using Unix domain stream sockets. + +Dependencies: + +- ``CONFIG_NET_LOCAL`` – Depends on support for Unix domain sockets. + +Configuration: + +- ``CONFIG_EXAMPLES_USTREAM`` – Enables the Unix domain socket example. +- ``CONFIG_EXAMPLES_USTREAM_ADDR`` – Specifics the Unix domain address. Default: + ``/dev/fifo``. diff --git a/Documentation/applications/examples/veml6070/index.rst b/Documentation/applications/examples/veml6070/index.rst new file mode 100644 index 0000000000..a6ede63452 --- /dev/null +++ b/Documentation/applications/examples/veml6070/index.rst @@ -0,0 +1,4 @@ +``veml6070`` +============ + +TODO diff --git a/Documentation/applications/examples/watchdog/index.rst b/Documentation/applications/examples/watchdog/index.rst new file mode 100644 index 0000000000..7681475a07 --- /dev/null +++ b/Documentation/applications/examples/watchdog/index.rst @@ -0,0 +1,26 @@ +``watchdog`` Watchdog Timer +=========================== + +A simple test of a watchdog timer driver. Initializes starts the watchdog timer. +It pings the watchdog timer for a period of time then lets the watchdog timer +expire... resetting the CPU is successful. This example can ONLY be built as an +NSH built-in function. + +This test depends on these specific Watchdog/NSH configurations settings (your +specific watchdog hardware settings might require additional settings). + +- ``CONFIG_WATCHDOG`` – Enables watchdog timer support support. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build the watchdog time test as an NSH built-in + function. + +Specific configuration options for this example include: + +- ``CONFIG_EXAMPLES_WATCHDOG_DEVPATH`` – The path to the Watchdog device. Default: + ``/dev/watchdog0``. +- ``CONFIG_EXAMPLES_WATCHDOG_PINGTIME`` – Time in milliseconds that the example + will ping the watchdog before letting the watchdog expire. Default: ``5000`` + milliseconds. +- ``CONFIG_EXAMPLES_WATCHDOG_PINGDELAY`` – Time delay between pings in + milliseconds. Default: ``500`` milliseconds. +- ``CONFIG_EXAMPLES_WATCHDOG_TIMEOUT`` – The watchdog timeout value in + milliseconds before the watchdog timer expires. Default: ``2000`` milliseconds. diff --git a/Documentation/applications/examples/watcher/index.rst b/Documentation/applications/examples/watcher/index.rst new file mode 100644 index 0000000000..54aad7e0c8 --- /dev/null +++ b/Documentation/applications/examples/watcher/index.rst @@ -0,0 +1,57 @@ +``watcher`` Watcher & Watched +============================= + +The watcher and watched examples are designed to work together. The watched +example will only appear after watcher is selected. +The watcher is a task that will monitor other tasks that subscribe to be watched. +If a watched task doesn't signal the watcher during the watchdog time period, +the watchdog timer will expire and the watcher will print the tasks that did +not signal and the ones that signaled. The tasks that did not signal will be printed +as the tasks that starved the dog and the tasks that signaled will be printed as +the tasks that fed the dog. +The watcher task will only feed the watchdog timer when all subscribed tasks have +asked to feed dog. + +To start the watcher, just run: + +``watcher`` + +The watched example is not required to use the watcher. The watched example is simply +a task that creates 4 tasks that will subscribe to be watched. The first and fourth +will not feed the dog to expose the functionality. This example will show the user +how to subscribe, to feed the dog and to unsubscribe. + +To start the watched, just run: + +``watched`` + +P.S: This example will only be supported by the chips that support interrupt on +timeout, i.e., which have the \"capture\" command implemented. + +This test depends on these specific configurations settings (your +specific watchdog hardware settings might require additional settings). + +- ``CONFIG_EXAMPLES_WATCHER`` – Includes this example. +- ``CONFIG_WATCHDOG`` – Enables watchdog timer support. +- ``CONFIG_NSH_BUILTIN_APPS`` – Build this example an NSH built-in + function. +- ``CONFIG_DRIVERS_NOTE`` and ``CONFIG_SCHED_INSTRUMENTATION`` – Allows the watcher + to get the tasks' names. +- ``CONFIG_FS_FAT`` – Allows the creation of a FAT filesystem on the ramdisk + to create a file with all the necessary info for the watched tasks. + +Specific configuration options for the ``watcher`` example include: + +- ``CONFIG_EXAMPLES_WATCHER_PRIORITY`` – Watcher Task Priority. +- ``CONFIG_EXAMPLES_WATCHER_STACKSIZE`` – Watcher Task Stack Size. +- ``CONFIG_EXAMPLES_WATCHER_DEVPATH`` – The path to the Watchdog device used by + the Watcher. Default: ``/dev/watchdog0``. +- ``CONFIG_EXAMPLES_WATCHER_TIMEOUT`` – The watchdog timeout value in + milliseconds. +- ``CONFIG_EXAMPLES_WATCHER_SIGNAL`` – This is the Signal Number used for + communication between the watcher task and the watched tasks. + +Specific configuration options for the ``watched`` example include: + +- ``CONFIG_EXAMPLES_WATCHED_PRIORITY`` – Watched Task Priority. +- ``CONFIG_EXAMPLES_WATCHED_STACKSIZE`` – Watched Task Stack Size. diff --git a/Documentation/applications/examples/webserver/index.rst b/Documentation/applications/examples/webserver/index.rst new file mode 100644 index 0000000000..d2c3c093f3 --- /dev/null +++ b/Documentation/applications/examples/webserver/index.rst @@ -0,0 +1,43 @@ +``webserver`` Simple Webserver +============================== + +This is a port of uIP tiny webserver example application. Settings specific to +this example include: + +- ``CONFIG_EXAMPLES_WEBSERVER_NOMAC`` (may be defined to use software assigned + MAC) +- ``CONFIG_EXAMPLES_WEBSERVER_IPADDR`` – Target IP address. +- ``CONFIG_EXAMPLES_WEBSERVER_DRIPADDR`` – Default router IP address. +- ``CONFIG_EXAMPLES_WEBSERVER_NETMASK`` – Network mask. +- ``CONFIG_EXAMPLES_WEBSERVER_DHCPC`` – Select to get IP address via DHCP. + +If you use DHCPC, then some special configuration network options are required. +These include: + +- ``CONFIG_NET=y`` – of course. +- ``CONFIG_NET_UDP=y`` – UDP support is required for DHCP (as well as various + other UDP-related configuration settings). +- ``CONFIG_NET_BROADCAST=y`` – UDP broadcast support is needed. +- ``CONFIG_NET_ETH_PKTSIZE=650`` or larger. Per RFC2131 (p. 9), the DHCP client + must be prepared to receive DHCP messages of up to ``576`` bytes (excluding + Ethernet, IP, or UDP headers and FCS). **Note** that the actual MTU setting + will depend upon the specific link protocol. Here Ethernet is indicated. + +Other configuration items apply also to the selected ``webserver`` net utility. +Additional relevant settings for the uIP ``webserver`` net utility are: + +- ``CONFIG_NETUTILS_HTTPDSTACKSIZE`` +- ``CONFIG_NETUTILS_HTTPDFILESTATS`` +- ``CONFIG_NETUTILS_HTTPDNETSTATS`` + +Applications using this example will need to enable the following ``netutils`` +libraries in their ``defconfig`` file: :: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETUTILS_DHCPC=y + CONFIG_NETDB_DNSCLIENT=y + CONFIG_NETUTILS_WEBSERVER=y + +**Note**: This example does depend on the ``perl`` script at +``nuttx/tools/mkfsdata.pl``. You must have ``perl`` installed on your development +system at ``/usr/bin/perl``. diff --git a/Documentation/applications/examples/wget/index.rst b/Documentation/applications/examples/wget/index.rst new file mode 100644 index 0000000000..68a7ae445e --- /dev/null +++ b/Documentation/applications/examples/wget/index.rst @@ -0,0 +1,42 @@ +``wget`` Web Client +=================== + +A simple web client example. It will obtain a file from a server using the HTTP +protocol. Settings unique to this example include: + +- ``CONFIG_EXAMPLES_WGET_URL`` – The URL of the file to get +- ``CONFIG_EXAMPLES_WGET_NOMAC`` – (May be defined to use software assigned MAC) +- ``CONFIG_EXAMPLES_WGET_IPADDR`` – Target IP address +- ``CONFIG_EXAMPLES_WGET_DRIPADDR`` – Default router IP address +- ``CONFIG_EXAMPLES_WGET_NETMASK`` – Network mask + +This example uses ``netutils/webclient``. Additional configuration settings apply +to that code as follows (but built-in defaults are probably OK): + +- ``CONFIG_WEBCLIENT_GETMIMETYPE`` +- ``CONFIG_WEBCLIENT_MAXHTTPLINE`` +- ``CONFIG_WEBCLIENT_MAXMIMESIZE`` +- ``CONFIG_WEBCLIENT_MAXHOSTNAME`` +- ``CONFIG_WEBCLIENT_MAXFILENAME`` + +Of course, the example also requires other settings including ``CONFIG_NET`` and +``CONFIG_NET_TCP``. The example also uses the uIP resolver which requires +``CONFIG_UDP``. + +**Warning**: As of this writing, ``wget`` is untested on the target platform. At +present it has been tested only in the host-based configuration described in the +following note. The primary difference is that the target version will rely on +the also untested uIP name resolver. + +**Note**: For test purposes, this example can be built as a host-based ``wget`` +function. This can be built as follows:: + + cd examples/wget + make -f Makefile.host + +Applications using this example will need to enable the following ``netutils`` +libraries in the ``defconfig`` file: :: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETDB_DNSCLIENT=y + CONFIG_NETUTILS_WEBCLIENT=y diff --git a/Documentation/applications/examples/wgetjson/index.rst b/Documentation/applications/examples/wgetjson/index.rst new file mode 100644 index 0000000000..45679c0ada --- /dev/null +++ b/Documentation/applications/examples/wgetjson/index.rst @@ -0,0 +1,7 @@ +``wgetjson`` GET JSON Using ``wget`` +==================================== + +Uses ``wget`` to get a JSON encoded file, then decodes the file. + +- ``CONFIG_EXAMPLES_WDGETJSON_MAXSIZE`` – Max. JSON Buffer Size. +- ``CONFIG_EXAMPLES_EXAMPLES_WGETJSON_URL`` – ``wget`` URL diff --git a/Documentation/applications/examples/wiegand/index.rst b/Documentation/applications/examples/wiegand/index.rst new file mode 100644 index 0000000000..3898fdc26a --- /dev/null +++ b/Documentation/applications/examples/wiegand/index.rst @@ -0,0 +1,4 @@ +``wiegand`` +=========== + +TODO diff --git a/Documentation/applications/examples/ws2812/index.rst b/Documentation/applications/examples/ws2812/index.rst new file mode 100644 index 0000000000..31b405240b --- /dev/null +++ b/Documentation/applications/examples/ws2812/index.rst @@ -0,0 +1,4 @@ +``ws2812`` +========== + +TODO diff --git a/Documentation/applications/examples/ws2812esp32rmt/index.rst b/Documentation/applications/examples/ws2812esp32rmt/index.rst new file mode 100644 index 0000000000..c49cf21aa7 --- /dev/null +++ b/Documentation/applications/examples/ws2812esp32rmt/index.rst @@ -0,0 +1,4 @@ +``ws2812esp32rmt`` +================== + +TODO diff --git a/Documentation/applications/examples/xbc_test/index.rst b/Documentation/applications/examples/xbc_test/index.rst new file mode 100644 index 0000000000..eda6232336 --- /dev/null +++ b/Documentation/applications/examples/xbc_test/index.rst @@ -0,0 +1,4 @@ +``xbc_test`` +============ + +TODO diff --git a/Documentation/applications/examples/xmlrpc/index.rst b/Documentation/applications/examples/xmlrpc/index.rst new file mode 100644 index 0000000000..748767e228 --- /dev/null +++ b/Documentation/applications/examples/xmlrpc/index.rst @@ -0,0 +1,22 @@ +``xmlrpc`` XML-RPC Server +========================= + +This example exercises the "Embeddable Lightweight XML-RPC Server" which is +discussed at: + +http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364 + +Configuration options: + +- ``CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE`` – HTTP buffer size. Default ``1024`` +- ``CONFIG_EXAMPLES_XMLRPC_DHCPC`` – Use DHCP Client. Default ``n``. Ignored if + ``CONFIG_NSH_NETINIT`` is selected. +- ``CONFIG_EXAMPLES_XMLRPC_NOMAC`` – Use Canned MAC Address. Default ``n``. Ignored + if ``CONFIG_NSH_NETINIT`` is selected. +- ``CONFIG_EXAMPLES_XMLRPC_IPADDR`` – Target IP address. Default ``0x0a000002``. + Ignored if ``CONFIG_NSH_NETINIT`` is selected. +- ``CONFIG_EXAMPLES_XMLRPC_DRIPADDR`` – Default Router IP address (Gateway). + Default ``0x0a000001``. Ignored if ``CONFIG_NSH_NETINIT`` is selected. +- ``CONFIG_EXAMPLES_XMLRPC_NETMASK`` – Network Mask. Default ``0xffffff00``. Ignored + if ``CONFIG_NSH_NETINIT`` is selected. + diff --git a/Documentation/applications/examples/zerocross/index.rst b/Documentation/applications/examples/zerocross/index.rst new file mode 100644 index 0000000000..294db21e35 --- /dev/null +++ b/Documentation/applications/examples/zerocross/index.rst @@ -0,0 +1,5 @@ +``zerocross`` Zero Crossing Device +================================== + +A simple test of the Zero Crossing device driver. + diff --git a/Documentation/applications/index.rst b/Documentation/applications/index.rst index 338e5d462b..0ca6b65f61 100644 --- a/Documentation/applications/index.rst +++ b/Documentation/applications/index.rst @@ -1,13 +1,14 @@ .. todo:: - Applications included in ``apps`` repo should be documented here. This should also include information - on how to create a given application. + Applications included in ``apps`` repo should be documented here. This should + also include information on how to create a given application. Applications ============ -NuttX ships a large number of applications covering a wide spectrum of functionality. These can be found -in the `apps `_ repository. At the moment, these are documented in -their individual README files so you can find more information at the repository. +NuttX ships a large number of applications covering a wide spectrum of functionality. +These can be found in the `apps `_ repository. +At the moment, these are documented in their individual README files so you can find +more information at the repository. .. toctree:: :maxdepth: 2 @@ -16,4 +17,5 @@ their individual README files so you can find more information at the repository nsh/index.rst nxdiag/index.rst wapi/index.rst + examples/index.rst