也可能是其他代码部分导致的问题。 试试这个代码。
看看有没有问题,如果没问题就是其他代码部分导致的问题。
#include <stdio.h>
#include <stdint.h>
int main() {
uint8_t buf[10];
buf[0] = 33;
buf[1] = 34;
// Print values
printf("buf[0] = %d\n", buf[0]);
printf("buf[1] = %d\n", buf[1]);
printf("buf[2] = %d\n", buf[2]);
return 0;
}
|