File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
targets/TARGET_Silicon_Labs/TARGET_EFM32/trng Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -29,27 +29,27 @@ static bool is_trng_enabled = false;
29
29
30
30
void trng_init (trng_t * obj )
31
31
{
32
- /* Use TRNG0 for all HW entropy collection */
33
- obj -> instance = TRNG0 ;
34
-
35
- if (!is_trng_enabled ) {
36
- sl_trng_init (obj -> instance );
37
- is_trng_enabled = true;
38
- }
32
+ /* Use TRNG0 for all HW entropy collection */
33
+ obj -> instance = TRNG0 ;
34
+
35
+ if (!is_trng_enabled ) {
36
+ sl_trng_init (obj -> instance );
37
+ is_trng_enabled = true;
38
+ }
39
39
}
40
40
41
41
void trng_free (trng_t * obj )
42
42
{
43
- /* Don't turn off the TRNG to avoid clearing its FIFO */
44
- (void ) obj ;
43
+ /* Don't turn off the TRNG to avoid clearing its FIFO */
44
+ (void ) obj ;
45
45
}
46
46
47
47
int trng_get_bytes (trng_t * obj , uint8_t * output , size_t length , size_t * output_length )
48
48
{
49
- int ret = sl_trng_poll (obj -> instance ,
50
- output ,
51
- length ,
52
- output_length );
53
- return (ret == 0 ) ? 0 : -1 ;
49
+ int ret = sl_trng_poll (obj -> instance ,
50
+ output ,
51
+ length ,
52
+ output_length );
53
+ return (ret == 0 ) ? 0 : -1 ;
54
54
}
55
55
#endif /* DEVICE_TRNG */
You can’t perform that action at this time.
0 commit comments