随笔分类 - stm32
摘要:3. Packed pixel streams The packed pixel stream (PPS) packets are long packets used to transmit RGB image data formatted as pixels to a video mode dis
阅读全文
摘要:在一个项目中,使用C语言,首先在一个 A文件中定义了一些全局变量,并赋初值,并在 B文件里引用,并在一个函数中重新赋值。在main函数的起始处中调用该赋值函数,发现并没有被重新赋值。 一般情况下,在中断中使用的全局变量必须要 volatile 修饰,或者一些 IO 口变量必须要 volatile 修
阅读全文
摘要:STM32 在keil下进行strtol函数的功能测试 源码: void test_str2num_strtol(void) { int a; printf("\r\n\r\n0x1234 = %d,",strtol("0x1234",NULL,0)); printf("\r\n1234 = %d,
阅读全文
摘要:STM32 在keil 下进行 atoi 函数功能测试: 源码: void test_str2num(void) { int a; printf("\r\n\r\n0x1234 = %d,",atoi("0x1234")); printf("\r\n0x1234 = %d,",atoi("0x123
阅读全文
摘要:源码: void test_str2num(void) { printf("\r\n\r\nint is %d",sizeof(int)); printf("\r\nlong int is %d",sizeof(long int)); printf("\r\nlong long int is %d"
阅读全文
摘要:源程序如下: i = 0x12345678; printf("\r\ni = 0x%X,",i); printf("addri = 0x%X,",&i); printf("\r\naddru8i = 0x%X,",(u8*)(&i)); printf("u8i = 0x%X,",*((u8*)(&i
阅读全文
摘要:查了下数据手册,里面有这么一句话:The input data register (GPIOx_IDR) captures the data present on the I/O pin at every AHB1 clock cycle. 在另外一个手册里,有这么一句话:The written d
阅读全文
摘要:首先要配置串口时钟: // USART1 clock enable RCC_APB2PeriphClockCmd( RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO, ENABLE); 然后再配置端口,在配置串口,再
阅读全文