From b39dafa1eebf327a8bbd3959a3c54e85707b56aa Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 11 May 2017 12:04:45 -0700 Subject: mpm: Enabled selection of SPI mode --- mpm/include/mpm/spi/spi_iface.hpp | 3 ++- mpm/include/mpm/spi/spi_regs_iface.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'mpm/include') diff --git a/mpm/include/mpm/spi/spi_iface.hpp b/mpm/include/mpm/spi/spi_iface.hpp index 8f8eaa2ec..d3f387ff3 100644 --- a/mpm/include/mpm/spi/spi_iface.hpp +++ b/mpm/include/mpm/spi/spi_iface.hpp @@ -45,7 +45,8 @@ namespace mpm { namespace spi { */ static sptr make_spidev( const std::string &device, - const int speed_hz + const int speed_hz, + const int spi_mode=3 ); }; diff --git a/mpm/include/mpm/spi/spi_regs_iface.hpp b/mpm/include/mpm/spi/spi_regs_iface.hpp index 072e15dc4..a28817db2 100644 --- a/mpm/include/mpm/spi/spi_regs_iface.hpp +++ b/mpm/include/mpm/spi/spi_regs_iface.hpp @@ -35,6 +35,7 @@ namespace mpm { namespace spi { mpm::types::regs_iface::sptr make_spidev_regs_iface( const std::string &device, const int speed_hz, + const int spi_mode, uint32_t addr_shift, uint32_t data_shift, uint32_t read_flags, -- cgit v1.2.3