Example for Embux device
To make these samples, you need source the cross-compile toolchain to your $PATH environment variable. ex: You can put the toolchain to /opt/toolchain/ folder and export the $PATH like this command.
export PATH=$PATH:/opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/
Or, you can directly source "toolchain" file.
source toolchain
We provide these example sources to drive different interface. You can make and download the execute file to device using ftp, scp, tftp... etc.
- hello
- hello++
- getMac
- watchdog
- gpio_test
- J485_test
- mount_norflash
- serial_test
- i2c_example
- can_test
- can_example
- modbus
- spidev_test
- serial_modem_ctl
A simple hello world source using c language.
A simple hello world source using c++ language.
A simple demo to register a socket and get the mac address.
A simple demo to drive software watchdog
Two shell to demonstrate gpio-in and gpio-out
This example is read "AHT-503" temperature & humidity transmitter device using RS485.
ICM3011 provide 8M SPI norflash, the sample demonstrate how to use it.
This demo shows how to read/write serial prot.
A simple demo to read i2c device.
A simple test shell, to test can0 interface send to can1 interface. You need to connect both can pin header.
A simple example using c language. can_send: send to can0 interface. can_recv: recieve from can1 interface. You also can connect both can0, can1 pin header to test it.
Embux provides libmodbus. 2 sample demos to show modbus tcp and modbue rtu how to use.
A simple demo to read SPI device.
A simple demo to control RS232 modem pinout, such as: CTS, RTS, DSR, DTR, DCD, RI.