예제 #1
0
파일: device.c 프로젝트: esden/sigrok
void device_clear(struct device *device)
{
	int probenum;

	/* TODO: plugin-specific clear call? */

	if(device->probes)
		for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++)
			device_probe_clear(device, probenum);

}
예제 #2
0
파일: device.c 프로젝트: drwyrm/sigrok
void device_clear(struct device *device)
{
	unsigned int pnum;

	/* TODO: Plugin-specific clear call? */

	if (!device->probes)
		return;

	for (pnum = 1; pnum <= g_slist_length(device->probes); pnum++)
		device_probe_clear(device, pnum);
}
예제 #3
0
파일: device.c 프로젝트: esden/sigrok
void device_destroy(struct device *device)
{
	int probenum;

	/* TODO: plugin-specific destroy call, need to decrease refcount in plugin */

	devices = g_slist_remove(devices, device);
	if(device->probes)
	{
		for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++)
			device_probe_clear(device, probenum);
		g_slist_free(device->probes);
	}
	g_free(device);

}