Walter Tarpan schrieb:
> #include "stm32f10x_conf.h"
> #include "stm32f10x_rcc.h"
> #include "stm32f10x_gpio.h"
>
> int main(void)
> {
> GPIO_InitTypeDef GPIO_InitStructure;
>
> SystemInit();
>
> RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
>
> GPIO_InitStructure.GPIO_Speed = GPIO_Mode_Out_PP;
> GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9|GPIO_Pin_8;
> GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
> GPIO_Init(GPIOC, &GPIO_InitStructure);
>
> GPIO_WriteBit(GPIOC,GPIO_Pin_8,Bit_SET);
> while(1) {
> //GPIO_WriteBit(GPIOC,GPIO_Pin_9,Bit_SET);
> GPIO_SetBits(GPIOC,GPIO_Pin_9);
> GPIO_ResetBits(GPIOC,GPIO_Pin_9);
> }
> }
versuchs mal mit
1 | GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|