[Solved] read file string and store in uint8_t array in c [closed]
Is that what you wanted? (to test give binary 01 combination as an first argument) #include <stdio.h> #include <stdint.h> uint8_t charToBin(char c) { switch(c) { case ‘0’: return 0; case ‘1’: return 1; } return 0; } uint8_t CstringToU8(const char * ptr) { uint8_t value = 0; for(int i = 0; (ptr[i] != ‘\0’) && … Read more