diff options
Diffstat (limited to 'tests/unit/stubs/esp_system.h')
| -rw-r--r-- | tests/unit/stubs/esp_system.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/stubs/esp_system.h b/tests/unit/stubs/esp_system.h index 8e63c80..cd54743 100644 --- a/tests/unit/stubs/esp_system.h +++ b/tests/unit/stubs/esp_system.h | |||
| @@ -1,4 +1,14 @@ | |||
| 1 | #ifndef STUBS_ESP_SYSTEM_H | 1 | #ifndef STUBS_ESP_SYSTEM_H |
| 2 | #define STUBS_ESP_SYSTEM_H | 2 | #define STUBS_ESP_SYSTEM_H |
| 3 | 3 | ||
| 4 | #include <stdlib.h> | ||
| 5 | #include <stdint.h> | ||
| 6 | |||
| 7 | static inline void esp_fill_random(uint8_t *buf, size_t len) | ||
| 8 | { | ||
| 9 | for (size_t i = 0; i < len; i++) { | ||
| 10 | buf[i] = (uint8_t)(rand() & 0xFF); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 4 | #endif | 14 | #endif |