diff options
author | Lane Kolbly <lane.kolbly@ni.com> | 2021-12-22 15:40:24 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-06 15:05:32 -0600 |
commit | d0bd9f174195f9baca4c383b4c98acef983f0f88 (patch) | |
tree | 2cd3ea465047618f178d4ad6db9c058c5044bbe9 /host/lib | |
parent | 1880c6915d47aee1e8d6a6713da126767c9af9cf (diff) | |
download | uhd-d0bd9f174195f9baca4c383b4c98acef983f0f88.tar.gz uhd-d0bd9f174195f9baca4c383b4c98acef983f0f88.tar.bz2 uhd-d0bd9f174195f9baca4c383b4c98acef983f0f88.zip |
host: Add divider constructor to spi_config_t
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/types/serial.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/host/lib/types/serial.cpp b/host/lib/types/serial.cpp index 67272e62e..1c9c7bebe 100644 --- a/host/lib/types/serial.cpp +++ b/host/lib/types/serial.cpp @@ -33,6 +33,15 @@ spi_config_t::spi_config_t(edge_t edge) : mosi_edge(edge), miso_edge(edge) use_custom_divider = false; } +spi_config_t::spi_config_t(edge_t edge, size_t divider) : + mosi_edge(edge), + miso_edge(edge), + use_custom_divider(true), + divider(divider) +{ + // empty +} + void i2c_iface::write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& bytes) { for (size_t i = 0; i < bytes.size(); i++) { |