Now USB_CDC_VCP polls until transmit is completed (and received on PC. This is handled by USB stack itself)
This commit is contained in:
@ -73,7 +73,7 @@ void Error_Handler(void);
|
||||
|
||||
/* Size of circular DMA buffer for ADC1 */
|
||||
#ifndef ADC_BUFF_SIZE
|
||||
#define ADC_BUFF_SIZE 100
|
||||
#define ADC_BUFF_SIZE 50
|
||||
#endif
|
||||
|
||||
/* Structure describing simple accumulation state for ADC processing */
|
||||
|
||||
@ -168,7 +168,10 @@ int main(void)
|
||||
if (Sweep_state.sweep_cycle_started_flag == 1){
|
||||
Sweep_state.sweep_cycle_started_flag = 0; // reset sweep cycle flag
|
||||
HAL_GPIO_TogglePin(LED_RED_GPIO_Port, LED_RED_Pin);
|
||||
CDC_Transmit_FS((uint8_t *)ADC_msg, ADC_msg_len_Sweep_start);
|
||||
//CDC_Transmit_FS((uint8_t *)ADC_msg, ADC_msg_len_Sweep_start);
|
||||
while (CDC_Transmit_FS((uint8_t *)ADC_msg, ADC_msg_len_Sweep_start) == USBD_BUSY){
|
||||
//HAL_Delay(1);
|
||||
}
|
||||
|
||||
}else{
|
||||
CDC_Transmit_FS((uint8_t *)ADC_msg, ADC_msg_len);
|
||||
|
||||
Reference in New Issue
Block a user