You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
482 B
22 lines
482 B
|
|
#include "motor.h" |
|
#include "timer.h" |
|
#include "delay.h" |
|
|
|
u16 Ypwmva=0; |
|
u16 Zpwmva=0; |
|
|
|
void motor_Init(void) |
|
{ |
|
GPIO_InitTypeDef GPIO_InitStructure; |
|
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); |
|
|
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13|GPIO_Pin_14; |
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; |
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; |
|
GPIO_Init(GPIOC, &GPIO_InitStructure); |
|
GPIO_SetBits(GPIOC,GPIO_Pin_13|GPIO_Pin_14); |
|
} |
|
|
|
|
|
|
|
|