Skip to content

Commit 4a7bb41

Browse files
committed
simplicity_sdk: Patch for sl_device_i2c.h file
Updating the sl_device_i2c.h file to incorporate design enhancements from the GSDK I2C implementation Upstream-Status: Pending Signed-off-by: S Mohamed Fiaz <[email protected]>
1 parent f30954e commit 4a7bb41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

simplicity_sdk/platform/service/device_manager/inc/sl_device_i2c.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ SL_ENUM(sl_i2c_clock_hlr_t) {
8787
/// Validation of operating mode
8888
#define SL_I2C_OPERATING_MODE_IS_VALID(operating_mode) ((operating_mode == SL_I2C_LEADER_MODE) || (operating_mode == SL_I2C_FOLLOWER_MODE))
8989

90-
/// Validation of FIFO Threshold
91-
#if defined(SL_CATALOG_I2C_FIFO_PRESENT)
92-
#define SL_I2C_FIFO_THRESHOLD_IS_VALID(threshold) ((threshold == SL_I2C_FIFO_THRESHOLD_1) || (threshold == SL_I2C_FIFO_THRESHOLD_2))
93-
#endif
90+
// Validation macro for I2C freq mode.
91+
#define SL_I2C_FREQ_MODE_IS_VALID(freq_mode) ((freq_mode == SL_I2C_FREQ_STANDARD_MODE) \
92+
|| (freq_mode == SL_I2C_FREQ_FAST_MODE) \
93+
|| (freq_mode == SL_I2C_FREQ_FASTPLUS_MODE))
9494

9595
/** @} (end addtogroup device_i2c) */
9696

@@ -99,3 +99,4 @@ SL_ENUM(sl_i2c_clock_hlr_t) {
9999
#endif
100100

101101
#endif // SL_DEVICE_I2C_H
102+

0 commit comments

Comments
 (0)