STM32自带进制转换函数
#include "stdio.h" //需要加这个头文件 uint8_t B; char A[3]; /*10进制转16进制*/ sprintf(A,"%x",B); /*16进制转10进制*/ sprintf(B,"%d",A);