c# 串口接收函数里面 timer 开启不了?怎么办?
private void timer1_Tick(object sender, EventArgs e){
timer1.Enabled = false;
byte[] buffer11 = new byte[9];
buffer11[0] = 0x5A;
buffer11[1] = 0xA5;
buffer11[2] = 0x05;
buffer11[3] = 0x82;
buffer11[4] = 0x00;
buffer11[5] = 0x65;
buffer11[6] = (byte)(value1);// 0x00;//(byte)(sd);//0x00
buffer11[7] = (byte)(ab);//(byte)(sd1);//0x0B
timer1.Enabled = true;
}
private void serialPort4_DataReceived(object sender, e)
{timer1.Enabled = false;
a=b;
timer1.Enabled = true;
}