单片机
猎户座防线
这个作者很懒,什么都没留下…
展开
-
gd32f DMA USART
#include "usart_debug.h"#include <stdio.h>//#define UART3_RX_LEN 256 /* 单个缓存区字节数 */#define UATR3_DATA_ADDRESS ((uint32_t)0x40004C04)uint8_t UART3_RX_BUF[UART3_RX_LEN * 2]; /* 双接收缓冲区 */uint8_t UART3_RX_STAT = 0; /*.原创 2021-01-15 21:47:07 · 1976 阅读 · 0 评论 -
取模运算
static uint16_t i=0; i = ( i+(1 + 20)) % (20+1) ; // 取模运算 i = 0~20循环原创 2020-10-11 10:51:28 · 329 阅读 · 0 评论 -
stm32步进电机驱动S加速雷塞驱动器
#ifndef __MOTOR_X_H__#define __MOTOR_X_H__#include "stm32f10x.h"//#define OutCurrent_Off() GPIO_ResetBits(GPIOD,GPIO_Pin_2) //Cut off the out current//#define OutCurrent_On() GPIO_SetBits(GPIOD,GPIO_Pin_2) //#define OutCurrent_Off() ..转载 2020-09-22 19:51:38 · 752 阅读 · 0 评论 -
MfgTool 更新内核
<!--* Copyright (C) 2012, Freescale Semiconductor, Inc. All Rights Reserved.* The CFG element contains a list of recognized usb devices.* DEV elements provide a name, class, vid and pid for each device.** Each LIST element contains a list of upda.原创 2020-09-06 22:35:10 · 307 阅读 · 0 评论 -
STM32的内存管理
https://blog.csdn.net/lizhoufan/article/details/84842755原创 2020-08-19 16:36:41 · 200 阅读 · 0 评论 -
UCOS II 的消息队列
#include "sys.h" #include "delay.h" #include "led.h"#include "includes.h"//USB相关#include "usb_lib.h"#include "hw_config.h"#include "usbio.h"#include "malloc.h" extern uint8_t USB_Received_Flag;//USB接收到数据标志位uint8_t Ins_Flag = 0;uint8_t In.原创 2020-08-19 16:14:38 · 333 阅读 · 0 评论 -
单片机按键扫描
#include "key.h"#include "delay.h"#include "led1.h"#include "usbio.h"#include "led_show.h"enum CTRL_MODE control_mode;enum RUN_MODE running_mode;extern uint16_t fiber_number ;extern int8_t current_led_work;extern uint16_t time_level ; //msuint.原创 2020-08-07 09:56:34 · 746 阅读 · 0 评论 -
STM32-DS2431
#define DS2431_GPIO GPIOB#define DS2431_GPIO_Pin GPIO_Pin_12#define DS2431_Write_1() GPIO_SetBits(GPIOB,GPIO_Pin_12)#define DS2431_Write_0() GPIO_ResetBits(GPIOB,GPIO_Pin_12)#define DS2431_ReadBit() GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_12).原创 2020-06-06 12:56:09 · 2657 阅读 · 2 评论 -
STM32-FM25CL64
//25CL04 Parameters#define FLASH_WREN 0x06#define FLASH_WRDI 0x04#define FLASH_RDSR 0x05#define FLASH_WRSR 0x01#define FLASH_READ 0x03// 0x0B#define FLASH_WRITE 0x02// 0x0A#define FLASH_BASE_ADDR 0x00#define FLASH_PARA_ADDR 0x02.原创 2020-06-06 12:49:14 · 2370 阅读 · 1 评论