gadget-chilipepper-plantmon.../system.c
Daniele Lacamera a67219081c Initial commit
2019-03-26 09:28:17 +01:00

29 lines
369 B
C

/* (c) Daniele Lacamera 2019
* GPL
*/
#include <stdint.h>
#include "system.h"
#include <string.h>
extern uint32_t cpu_freq;
void *memset(void *s, int c, size_t n)
{
unsigned char *d = (unsigned char *)s;
while (n--) {
*d++ = (unsigned char)c;
}
return s;
}
size_t strlen(const char *s)
{
int i = 0;
while (s[i] != 0)
i++;
return i;
}