本文整理汇总了C++中SerialDevice::Probe方法的典型用法代码示例。如果您正苦于以下问题:C++ SerialDevice::Probe方法的具体用法?C++ SerialDevice::Probe怎么用?C++ SerialDevice::Probe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerialDevice
的用法示例。
在下文中一共展示了SerialDevice::Probe方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new
// until we support ISA device enumeration from PnP BIOS or ACPI,
// we have to probe the 4 default COM ports...
status_t
scan_isa_hardcoded()
{
#ifdef HANDLE_ISA_COM
int i;
bool serialDebug = get_safemode_boolean("serial_debug_output", true);
for (i = 0; i < 4; i++) {
// skip the port used for kernel debugging...
if (serialDebug && sHardcodedPorts[i].ioBase == gKernelDebugPort) {
TRACE_ALWAYS("Skipping port %d as it is used for kernel debug.\n", i);
continue;
}
SerialDevice *device;
device = new(std::nothrow) SerialDevice(&sSupportedDevices[0],
sHardcodedPorts[i].ioBase, sHardcodedPorts[i].irq);
if (device != NULL && device->Probe())
pc_serial_insert_device(device);
else
delete device;
}
#endif
return B_OK;
}
示例2: new
// until we support ISA device enumeration from PnP BIOS or ACPI,
// we have to probe the 4 default COM ports...
status_t
scan_isa_hardcoded()
{
#ifdef HANDLE_ISA_COM
int i;
for (i = 0; i < 4; i++) {
// skip the port used for kernel debugging...
if (sHardcodedPorts[i].ioBase == gKernelDebugPort)
continue;
SerialDevice *device;
device = new(std::nothrow) SerialDevice(&sSupportedDevices[0],
sHardcodedPorts[i].ioBase, sHardcodedPorts[i].irq);
if (device != NULL && device->Probe())
pc_serial_insert_device(device);
else
delete device;
}
#endif
return B_OK;
}