From ab2d7ca98fbfbb862e129ea57b65b712e3dec589 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 11 May 2022 11:29:28 +0200 Subject: [PATCH] update changelog and docs --- CHANGELOG.md | 13 +++++++++++-- hal/src/fsfw_hal/linux/spi/SpiComIF.h | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f40ed32..2019fdcd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,8 +60,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Additions -- Linux HAL: Getter functions for SPI speed and mode. -- Linux HAL: Add wiretapping option for I2C. Enabled with `FSFW_HAL_I2C_WIRETAPPING` defined to 1 - Dedicated Version class and constant `fsfw::FSFW_VERSION` containing version information inside `fsfw/version.h` PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/559 @@ -69,6 +67,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/). PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/592 - `Subsystem`: New API to add table and sequence entries +## HAL + +- SPI: Cache the SPI device in the communication interface. Architecturally, this makes a + lot more sense because each ComIF should be responsible for one SPI bus. +- SPI: Move the empty transfer to update the line polarity to separate function. This means + it is not automatically called when calling the setter function for SPI speed and mode. + The user should call this function after locking the CS mutex if multiple SPI devices with + differing speeds and modes are attached to one bus. +- SPI: Getter functions for SPI speed and mode. +- I2C: Add wiretapping option for I2C. Enabled with `FSFW_HAL_I2C_WIRETAPPING` defined to 1. + ## Fixed - TCP TMTC Server: `MutexGuard` was not created properly in diff --git a/hal/src/fsfw_hal/linux/spi/SpiComIF.h b/hal/src/fsfw_hal/linux/spi/SpiComIF.h index aca94765b..3d15009d7 100644 --- a/hal/src/fsfw_hal/linux/spi/SpiComIF.h +++ b/hal/src/fsfw_hal/linux/spi/SpiComIF.h @@ -65,8 +65,8 @@ class SpiComIF : public DeviceCommunicationIF, public SystemObject { * the line state, which can be an issue on mode switches because the clock line will * switch the state after the chip select is pulled low. * - * It is recommended to call this function after #setSpiSpeedAndMode if the SPI bus - * has multiple SPI devices with different speed and SPI modes attached. + * It is recommended to call this function after #setSpiSpeedAndMode and after locking the + * CS mutex if the SPI bus has multiple SPI devices with different speed and SPI modes attached. * @param spiFd */ void updateLinePolarity(int spiFd);