not sure what these changes were
This commit is contained in:
parent
cd3d8871df
commit
50f5723733
3 changed files with 31 additions and 2 deletions
|
@ -2,6 +2,31 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
// Below doesn't work!
|
||||
//uint8_t streq(char *ptr, char* ptr2) {
|
||||
// while (1 == 1) {
|
||||
// if (*ptr != *ptr2) {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// if (*ptr == '\0') {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// ptr++;
|
||||
// ptr2++;
|
||||
// }
|
||||
//}
|
||||
|
||||
uint8_t memseq(char *ptr, char *ptr2, uint32_t len) {
|
||||
for (uint32_t i = 0; i < len; i++) {
|
||||
if (ptr[i] != ptr2[i]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void memset(char *ptr, char data, uint32_t len) {
|
||||
for (uint32_t i = 0; i < len; i++) {
|
||||
ptr[i] = data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue