Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* USER CODE BEGIN 6 */
- static uint8_t sprejetih=0;
- uint8_t f;uint8_t stevec=0;char niz[6] ="prizgi";
- sprejetih+=*Len;
- for (f=0; f<*Len; f++)//zapisujemo v NaΕ‘ buffer
- {
- UserTxBufferFS[f]=Buf[f]+1;
- }
- if(sprejetih==6)
- {
- HAL_GPIO_WritePin(GPIOD, GPIO_PIN_12, GPIO_PIN_SET);
- f=0;
- while(stevec==0)
- {
- if(UserTxBufferFS[f]!=niz[f])
- {
- HAL_GPIO_WritePin(GPIOD, GPIO_PIN_13, GPIO_PIN_SET);
- stevec=1;
- }
- f++;
- }
- }
- CDC_Transmit_FS(UserTxBufferFS,*Len);
- USBD_CDC_ReceivePacket(&hUsbDeviceFS);
- return (USBD_OK);
- /* USER CODE END 6 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement