2021年3月23日
摘要:
#define MyCAN_SJW CAN_SJW_3tq #define MyCAN_BS1 CAN_BS1_5tq #define MyCAN_BS2 CAN_BS2_3tq #define MyCAN_PRE 0x04 //1MHz #define MyCAN_DebugMode 0x01 #
阅读全文
posted @ 2021-03-23 10:13
棕色的北极熊
阅读(121)
推荐(0)
2020年12月18日
摘要:
#define UART4_Bps 9600 #define UART4_RecSize 20 uchar UART4_RecData[UART4_RecSize];uchar UART4_Loc; void UART4_Init(void){ GPIO_InitTypeDef GPIO_InitS
阅读全文
posted @ 2020-12-18 22:29
棕色的北极熊
阅读(228)
推荐(0)
2020年12月12日
摘要:
#define PID_C #include "pid.h" void PID_Calculate(PID_TypeDef *Data) { float Inc, P, I, D, Err; Err = Data->Target - Data->Current; Data->Error[0] = D
阅读全文
posted @ 2020-12-12 20:22
棕色的北极熊
阅读(200)
推荐(0)
2020年11月6日
摘要:
unsigned int Base_us;unsigned int Base_ms;void DELAY_Init(void){ SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8); Base_us = SystemCoreClock/80000
阅读全文
posted @ 2020-11-06 22:06
棕色的北极熊
阅读(135)
推荐(0)
摘要:
#ifndef QUEUE_H #define QUEUE_H #include "main.h" /* Custom */ #define QUEUE_ValueType ushort #define QUEUE_MaxSize 32 /* End */ typedef struct { QUEU
阅读全文
posted @ 2020-11-06 10:33
棕色的北极熊
阅读(188)
推荐(0)
摘要:
void ENCODER_Init(void){ TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; GPIO_InitTypeDef GPIO_InitStructure; TIM_ICInitTypeDef TIM_ICInitStructure; //
阅读全文
posted @ 2020-11-06 10:28
棕色的北极熊
阅读(1194)
推荐(0)
2020年10月28日
摘要:
#define ADC_RecSize 64#define ADC_ChnSize 5 //通道数调整ushort ADC_RecVal[ADC_RecSize][ADC_ChnSize];void MyADC_Init(void){ ADC_InitTypeDef ADC_InitStructur
阅读全文
posted @ 2020-10-28 09:30
棕色的北极熊
阅读(521)
推荐(0)
2020年10月13日
摘要:
#ifndef FLASH_H #define FLASH_H #include "main.h" #ifdef FLASH_C #include "stm32f10x_flash.h" void FLASH_Erase(uint Addr); #endif #define FLASH_BasePo
阅读全文
posted @ 2020-10-13 21:02
棕色的北极熊
阅读(552)
推荐(0)
摘要:
TIM2的四通道依次为:PA15 PB3 PB10 PB11 void TIM2_PWM_Init(u16 arr,u16 psc){ GPIO_InitTypeDef GPIO_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure
阅读全文
posted @ 2020-10-13 20:42
棕色的北极熊
阅读(2828)
推荐(0)
2018年7月13日
摘要:
TIM2的四通道依次为:PA0 PA1 PA2 PA3 void TIM2_PWM_Init(u16 arr,u16 psc){ GPIO_InitTypeDef GPIO_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; T
阅读全文
posted @ 2018-07-13 12:05
棕色的北极熊
阅读(2205)
推荐(0)