Coder Social home page Coder Social logo

kartikaygarg / libsoc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doanac/libsoc

0.0 1.0 0.0 191 KB

libsoc: C library for interfacing with common SoC peripherals through generic kernel interfaces

Home Page: http://www.embed.me.uk

License: Other

Shell 39.47% C 49.13% C++ 11.41%

libsoc's Introduction

What is libsoc?
------------------------------------------------------------------------

libsoc is a C library to interface with common peripherals found in
System on Chips through generic Linux Kernel interfaces.

It is aimed at new Linux users, and intends to be a stepping stone to
enable a user to get started quickly. It is optimised for reliability
rather than speed. While the library should be fast, no guarantees are
made on it's determinism and it should not be used in time critical
routines.

Why libsoc?
------------------------------------------------------------------------

libsoc was born due to the influx of new embedded Linux boards becoming
available cheap, and to hobbyists. There are currently numerous
libraries that do interfacing with common SoC peripherals, but they all
tend to be centred around a particular board or SoC. This leads to board
specific hacks and in some cases direct bypassing of the Linux Kernel.

libsoc aims to be generic and compatible with any SoC that has drivers
exposing the correct interfaces for the defined peripheral.

What peripherals does it support?
------------------------------------------------------------------------

Current Support:

- Manual GPIO Manipulation through sysfs (Value, Edge, Direction, Exporting)
- Blocking GPIO Interrupts with timeout
- Non-blocking GPIO Interrupts with callback mechanism (pthread based)
- SPI transfers using spidev
- I2C transfers using ioctls
- PWM support through sysfs (Linux 3.12+)

Future ideas are:

- A/D Converters
- UART

Please see the roadmap folder for more information

Does libsoc support the SoC on my board?
------------------------------------------------------------------------

The real question here is, do your SoC drivers use the generic Linux
Kernel interfaces to expose functionality to userspace. If the answer is
yes, then libsoc supports your board!

How is libsoc licenced?
------------------------------------------------------------------------

libsoc is licenced under the LGPLv2.1, please see the COPYING file for
futher details.

How do I build libsoc?
------------------------------------------------------------------------

libsoc uses the autotools build system. A script called autogen.sh is
included to setup the build. Exact steps:

1) ./autogen.sh
2) ./configure [--disable-debug] [--enable-board=<board>]
3) make

--disable-debug : disables the debug code, turn off the debug to get
                  the fastest operation but at the cost of any debug
                  print outs. Ommiting this flag will leave debug
                  enabled.
--enable-board  : install board specific GPIO pin mappings file. This
                  enables the use of the libsoc_board_gpio_id function
                  to look up GPIO ID's based on how the pin is named for
                  a supported board. Supported board can be found under
                  ./contrib/board_files

Dependencies
------------------------------------------------------------------------

- pthreads
- libgcc

How do I use libsoc?
------------------------------------------------------------------------

The libsoc public functions are documented in the include files in the
lib/include directory. There are also test programs in the test/
directory which give examples of use.

Can I help?
------------------------------------------------------------------------

libsoc is Open Source Software and as such you are welcome to browse the
code and either add features, or fix bugs. Please submit pull requests,
and bugs to http://www.github.com/jackmitch/libsoc. If you have any
comments or questions, I can be contacted by email at the address
jack_at_embed_dot_me_dot_uk.

libsoc's People

Contributors

jackmitch avatar yegorich avatar telarium avatar

Watchers

Kartikay Garg 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.