// DeviceList represent the list of devices.
DeviceList represent the list of devices.
// DeviceList represent the list of devices .
func DeviceListEdge() []Device {
	var numDevices C.size_t
	cDevices := C.edgetpu_list_devices(&numDevices)
	if cDevices == nil {
		return nil
	}
	deviceSlice := (*[1024]C.struct_edgetpu_device)(unsafe.Pointer(cDevices))[:numDevices:numDevices]
	var devices []Device
	for i := C.size_t(0); i < numDevices; i++ {
		devices = append(devices, Device{
			Type: DeviceType(deviceSlice[i]._type),
			Path: C.GoString(deviceSlice[i].path),
		})
	}
	C.edgetpu_free_devices(cDevices)
	return devices
}
func DeviceListEdge ( ) [ ] Device { var numDevices C . size_t cDevices := C . edgetpu_list_devices ( & numDevices ) if cDevices == nil { return nil } deviceSlice := ( * [ 1024 ] C . struct_edgetpu_device ) ( unsafe . Pointer ( cDevices ) ) [ : numDevices : numDevices ] var devices [ ] Device for i := C . size_t ( 0 ) ; i < numDevices ; i ++ { devices = append ( devices , Device { Type : DeviceType ( deviceSlice [ i ] . _type ) , Path : C . GoString ( deviceSlice [ i ] . path ) , } ) } C . edgetpu_free_devices ( cDevices ) return devices }
DeviceList represent the list of devices.
DeviceList represent the list of devices .