Giter Club home page Giter Club logo

uartapplinux's Introduction

UartAppLinux

Uart Application developed for RS485 Communication on BeagleBone Black, using termios.

  • Modular based interface
  • pthread and termios implementation
  • stty

File Details

  • compileUART.sh :

    Simple g++ compiler commands to build app.

  • MakeFile :

    This can also be used to build app. ( Preferred )

  • multiUART.cpp :

    BBB provides 4 Uart ( 1,2,4,5) . Uart0 is used for boot messages. This app runs them all in parallel using thread having read/write fxns.

  • multiUARTApp.cpp :

    2 thread based app for testing the application, as required in the Project. This is similar to above file, and more specific to the Project specs.

  • uartconfig.txt :

    Uart configuration used for termios structure

  • uartRx.cpp :

    A simple Uart receive module prototype for testing RX case

  • uartTx.cpp :

    A simple Uart transmit module prototype for testing TX case

  • uartTxLoop.cpp -

    Test a continuous transmission case

  • uartPinsConfig.sh -

    Pin configuration for all UARTs , this is specfic to BeagleBone black and may vary.

Usage / Setup :

  1. Compile :

You can either use compileuart or makefile , since it is a small project, it doesn't matter much. The variable "Target" has to be changed in MAKEFILE for different App as required.

Run

chmod a+x compileUART.sh
./compileUART.sh

OR

make clean
make
  1. Pin Configurtion :

For BeagleBone Black, if the cape-overlay is loaded, config-pin can be directly used to set pins for UART. Else corresponding BB-UART1-00A0.dtbo like devicetree overlays has to be added in uEnv.txt file.

Run

chmod a+x uartPinsConfig.sh
./uartPinsConfig.sh
  • Now you can execute the application

TODO

  • multiUARTApp.cpp
    • Implement mutex-based lock in threads.

References

The following links provide a very good read about Serial programming and termios structure details.

uartapplinux's People

Contributors

shubham25 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.