java中的可变参数
package com.xiao.parameter; public class Demo { public static void main(String[] args) {
for的死循环和增强的for循环
死循环: for(;;){}
增强for循环 package com.xiao.demo; public class ForStrong { public static void&nb
IDEA可以反编译(也就是把生成的.class文件反编译)
源码:
package com.xiao.switchs; public class Demo { public static void main(String[] args) { &nbs
if语句
java中next()和nextLine()的区别
package com.xiao.scanner; import java.util.Scanner; public class Demo { public static void main(String[] args) {
javadoc命令可以生成文档
当你在代码中加入文档注释时,运行Javadoc xxx.java就会生成文档,点击index.html就会在浏览器中看到
文档注释: /** * * @param name * @return */ /** * @author Xiaoxia
变量的命名规范
java中的实例变量和类变量的区别--直接看代码
public class Demo1 { /* 实例变量:从属于对象;如果不自行初始化,这个类型的默认值 布尔值:默认值是false 除了基本类型,其余的默认值都是null &nb
AT指令配置蓝牙模块,通过连接蓝牙控制灯
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure;
sprintf()函数-----c语言
memset()函数--------c语言
void *memset(void *str, int c, size_t n) 复制字符 c(一个无符号字符)到参数 str 所指向的字符串的前 n 个字符。
原型:void *memset(void *str, int c, size_t n)
atoi() 函数------c语言
strtok函数c语言
#include <string.h> main(){ char s[] = "ab-cd : ef;gh :i-jkl;mnop;qrs-tu: vwx-y;z"; char *delim
strstr函数(c语言)
用超声波模块根据距离来控制灯的亮灭
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static USART_InitTypeDef USART_InitStructure; #define&
在stm32中如何判断GPIO引脚工作模式是输入还是输出呢?
printf函数重定向【stm32】— > fputc()
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure;
设置频率播放一小段音频(用到PWM和蜂鸣器)
#include "stm32f10x.h" #include "sys.h" static GPIO_InitTypeDef GPIO_InitStructure; static TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure
【STM32】STM32端口复用和重映射的区别
stm32串口1接收和发送数据的使用
#include "stm32f10x.h" #include "stdio.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure;
stm32运用PWM写呼吸灯的例子
代码不太完整,因为我的stm32板子的灯的引脚没有定时器所以就写个差不多的模板供以后参考
#include "stm32f10x.h" #include "sys.h" static GPIO_InitTypeDef GPIO_InitStructure; static TIM
定时中断
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; static NVIC_InitTypeDef NVIC_InitStructure; static TIM_TimeBaseInitTypeD
SysTick 滴答定时器
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; #define PB5OUT(n) *(volatile uint32_t *)(0x42000000+((uint32_t
滴答硬件定时器
#include "stm32f10x.h" static GPIO_InitTypeDef GPIO_InitStructure; #define PB5OUT(n) *(volatile uint32_t *)(0x42000000+((uint32_t