Skip to content

Commit 8bf699e

Browse files
authored
Merge pull request #4 from elrafoon/fix-sts-len
fix(config): fix StsMode constant values to match device datasheet
2 parents ca97b8a + d39656f commit 8bf699e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/configs.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,27 +286,27 @@ pub enum StsMode {
286286

287287
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default)]
288288
/// An enum that allows the selection of Sts length
289-
///
289+
/// Value step is a block of eight (user manual 8.2.3.1)
290290
pub enum StsLen {
291291
/// STS length = 32 bits
292-
StsLen32 = 0,
292+
StsLen32 = 4,
293293

294294
/// STS length = 64 bits
295295
#[default]
296-
StsLen64 = 1,
296+
StsLen64 = 8,
297297

298298
/// STS length = 128 bits
299-
StsLen128 = 2,
299+
StsLen128 = 16,
300300

301301
/// STS length = 256 bits
302-
StsLen256 = 3,
302+
StsLen256 = 32,
303303

304304
/// STS length = 512 bits
305-
StsLen512 = 4,
305+
StsLen512 = 64,
306306

307307
/// STS length = 1024 bits
308-
StsLen1024 = 5,
308+
StsLen1024 = 128,
309309

310310
/// STS length = 2048 bits
311-
StsLn2048 = 6,
311+
StsLn2048 = 256,
312312
}

0 commit comments

Comments
 (0)