aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/i2c
Commit message (Collapse)AuthorAgeFilesLines
* mpm: Implement 32 bit register interface with SPIToni Jones2021-03-041-0/+12
| | | | | | | | | Implement SPI transfers which are 12 bytes in length to support access for 32 bit register interfaces. 12 byte transactions are necessary for Titanium MB PS CPLD SPI transactions. This implementation supports 48 bits of TX data per transfer and offsets all flags and data shifts from the end of the TX data portion of the transfer buffer rather than the end of the entire transfer buffer.
* mpm: Add compile flag to fix missing definitionCiro Nishiguchi2020-01-161-0/+4
| | | | | In some environments _GNU_SOURCE must be defined to use O_LARGEFILE.
* mpm: i2cdev: Use O_LARGEFILE to open i2c devicesMartin Braun2019-11-221-1/+2
|
* mpm: i2cdev: Fix formatting and compiler warningsMartin Braun2019-11-221-11/+12
| | | | | | | | - Remove superfluous includes - Fix return value of _open() (was int, now void) => Fewer compiler warnings - Apply clang-format - Add {} to all ifs
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-162-95/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-141-1/+1
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* mpm: i2c: Open and close i2c file descriptor on every accessAlex Williams2018-11-121-22/+42
| | | | | | This will release the i2c device when it's not in use. If MPM hangs on to the i2c devices, we won't be able to cleanly change FPGA images--The kernel hangs up the process until the refcount drops to zero.
* mpm: i2c: Add vector-based transfer functionAlex Williams2018-10-191-0/+18
| | | | This could lead to a less-restricted implementation for use in Python.
* mpm: Add i2c APIs for simple transfersAlex Williams2018-10-195-0/+385