#include "util.h" /** * Copy `num_bytes` many bytes from the `source` memory to the * `destination` memory. * * @param source * @param destination * @param num_bytes */ void mem_copy(uint8_t* source, uint8_t* destination, int num_bytes) { for ( int i = 0; i < num_bytes; i += 1 ) { *(destination + i) = *(source + i); } } void mem_set(uint8_t* destination, uint8_t value, uint32_t length) { uint8_t* temp = (uint8_t*) destination; while ( length != 0 ) { *temp++ = value; length -= 1; } }