wykoszonytrawnik
wykoszonytrawnik
Jaką gierkę polecacie aby na dwóch popykać? :P
- Cronox
#include "stm32f10x.h"
``````
int test = 0;
``````
int main(void) {
GPIO_InitTypeDef gpio;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO, ENABLE);
``````
GPIO_StructInit(&gpio);
gpio.GPIO_Pin = GPIO_Pin_6;
gpio.GPIO_Mode = GPIO_Mode_IPU;
GPIO_Init(GPIOB, &gpio);
``````
gpio.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_11 | GPIO_Pin_12;
gpio.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &gpio);
``````
gpio.GPIO_Pin = GPIO_Pin_11;
gpio.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB, &gpio);
``````
while (1) {
if (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_6) == 0) {
test = !test;
}
if (test == 1) {
GPIO_SetBits(GPIOC, GPIO_Pin_7);
} else {
GPIO_ResetBits(GPIOC, GPIO_Pin_7);
}
}
}
test = !test;
test = 1;
Ciekawe wykorzystanie aplikacji jaką jest Face Swap do śpiewanego utworu We are the World ( ͡° ͜ʖ ͡°)
zWykop.pl
Podróże
Gospodarka
Ukraina
Technologia
Motoryzacja
Sport
Rozrywka
Informacje
Ciekawostki