demo:remove empty func

This commit is contained in:
yunyaobaihong 2023-05-18 18:00:42 +08:00
parent 77e7d4eef2
commit 6bf56c05c2

View File

@ -74,9 +74,6 @@ static struct sr_dev_driver *di = &demo_driver_info;
extern struct ds_trigger *trigger;
static void process_dso_data(void* src,void* dsc,uint16_t offset)
{
}
static void init_analog_random_data(struct session_vdev * vdev)
{
@ -1763,14 +1760,7 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi)
for (ch_index = 0; ch_index < chan_num; ch_index++)
{
<<<<<<< HEAD
bCheckFile = 0;
=======
sr_err("can't locate zip inner file:\"%s\"", file_name);
send_error_packet(sdi, vdev, &packet);
return FALSE;
}
>>>>>>> source/dev-1.3
while (1)
{
@ -1788,12 +1778,12 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi)
}
}
if (!bCheckFile)
{
sr_err("cant't locate zip inner file:\"%s\"", file_name);
send_error_packet(sdi, vdev, &packet);
return FALSE;
}
if (!bCheckFile)
{
sr_err("cant't locate zip inner file:\"%s\"", file_name);
send_error_packet(sdi, vdev, &packet);
return FALSE;
}
if (unzGetCurrentFileInfo64(vdev->archive, &fileInfo, szFilePath,
sizeof(szFilePath), NULL, 0, NULL, 0) != UNZ_OK)
@ -1852,52 +1842,8 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi)
unzCloseCurrentFile(vdev->archive);
pack_buffer->block_read_positions[ch_index] = 0; // Reset the read position.
}
<<<<<<< HEAD
vdev->cur_block++;
pack_buffer->block_chan_read_pos = 0;
=======
// Read the data to buffer.
if (unzOpenCurrentFile(vdev->archive) != UNZ_OK)
{
sr_err("can't open zip inner file:\"%s\"", file_name);
send_error_packet(sdi, vdev, &packet);
return FALSE;
}
ret = unzReadCurrentFile(vdev->archive, pack_buffer->block_bufs[ch_index], pack_buffer->block_data_len);
if (-1 == ret)
{
sr_err("read zip inner file error:\"%s\"", file_name);
send_error_packet(sdi, vdev, &packet);
return FALSE;
}
unzCloseCurrentFile(vdev->archive);
pack_buffer->block_read_positions[ch_index] = 0; // Reset the read position.
}
vdev->cur_block++;
pack_buffer->block_chan_read_pos = 0;
}
p_wr = (uint8_t*)pack_buffer->post_buf + pack_buffer->post_len;
p_rd = (uint8_t*)pack_buffer->block_bufs[read_chan_index] + pack_buffer->block_read_positions[read_chan_index];
*p_wr = *p_rd;
pack_buffer->post_len++;
pack_buffer->block_read_positions[read_chan_index]++;
if (pack_buffer->block_read_positions[read_chan_index] % byte_align == 0
|| pack_buffer->block_read_positions[read_chan_index] == pack_buffer->block_data_len)
{
read_chan_index++;
if (pack_buffer->block_read_positions[read_chan_index] == pack_buffer->block_data_len){
sr_info("Block read end.");
if (vdev->cur_block < vdev->num_blocks){
sr_err("%s", "The block data is not align.");
break;
}
>>>>>>> source/dev-1.3
}
p_wr = (uint8_t*)pack_buffer->post_buf + pack_buffer->post_len;
@ -1980,7 +1926,6 @@ static int receive_data_dso(int fd, int revents, const struct sr_dev_inst *sdi)
uint16_t offset;
uint16_t high_gate,low_gate;
uint16_t test[DSO_PACKET_LEN];
for(int i = 0 ; i < pack_buffer->post_buf_len; i++)
{
if(i % 2 == 0)