#include "vofa.h"
#include "usart.h"
//#include "usbd_cdc_if.h"
#include <cmsis_os2.h>
//用来对需要的数据进行串口绘图  (未添加接收函数)


float vofa_send[8];

//发送函数
void vofa_tx_main(float *data)
{
  float fdata[8]={0};
	uint8_t tail[4];
	tail[0]=0x00;
	tail[1]=0x00;
	tail[2]=0x80;
	tail[3]=0x7f;
	/*在下面添加发送的数据*/
	fdata[0] = data[0];
	fdata[1] = data[1];
	fdata[2] = data[2];
	fdata[3] = data[3];
	fdata[4] = data[4];
	fdata[5] = data[5];
	fdata[6] = data[6];
	fdata[7] = data[7];
	
		
	/*在下面使用对应的串口发送函数*/
	
	//用dma用不了

	//HAL_UART_Transmit_DMA(&huart6, ( uint8_t *)fdata, sizeof(fdata));
	HAL_UART_Transmit(&huart6, ( uint8_t *)fdata, sizeof(fdata),0xFFFF);                    //发送第一组数据
	osDelay(1);
	//HAL_UART_Transmit_DMA(&huart6, tail, 4);
	HAL_UART_Transmit(&huart6, tail, 4,0xFFFF);                    //发送第二组数据
   osDelay(1);

    //用虚拟串口c板开启不了
	//  CDC_Transmit_FS( ( uint8_t *)fdata, sizeof(fdata));
	//  osDelay(1);
	//   CDC_Transmit_FS( tail, 4);

}