aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/spi/spi_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/lib/spi/spi_config.cpp')
-rw-r--r--mpm/lib/spi/spi_config.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/mpm/lib/spi/spi_config.cpp b/mpm/lib/spi/spi_config.cpp
deleted file mode 100644
index 69d6d9c2a..000000000
--- a/mpm/lib/spi/spi_config.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "spi_config.h"
-
-
-spi_config_t::spi_config_t(const spi_hwd_settings_t hwd_settings, const spi_device_settings_t device_settings) :
- full_settings({
- _convert_to_adi_settings(hwd_settings.chip_select_index, device_settings),
- hwd_settings })
-{
-
-}
-
-spiSettings_t spi_config_t::_convert_to_adi_settings(const uint8_t chip_select_index, const spi_device_settings_t device_settings)
-{
- return {
- chip_select_index,
- device_settings.writeBitPolarity,
- device_settings.longInstructionWord,
- device_settings.MSBFirst,
- device_settings.CPHA,
- device_settings.CPOL,
- device_settings.enSpiStreaming,
- device_settings.autoIncAddrUp,
- device_settings.fourWireMode,
- device_settings.spiClkFreq_Hz,
- };
-}
-
-const spiSettings_t* spi_config_t::get_spi_settings() const
-{
- return &(full_settings.adi_settings);
-}
-
-const spi_full_settings_t* spi_config_t::recover_full_spi_settings(const spiSettings_t* settings)
-{
- // TODO: make this better
- return reinterpret_cast<const spi_full_settings_t*>(settings);
-}