3 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
10 #include <hw/cpu/cpu.h>
11 #include <hw/dos/dos.h>
12 #include <hw/8250/8250.h>
13 #include <hw/isapnp/isapnp.h>
15 int is_rs232_or_compat_pnp_device(struct isa_pnp_device_node far *devn) {
18 if (devn->type_code[0] == 7 && devn->type_code[1] == 0)
21 /* and then there are known devices that act like RS-232 but do not list themselves as RS-232 */
22 isa_pnp_product_id_to_str(id,devn->product_id);
24 /* Toshiba Satellite Pro 465CDX: The IR port is a 0x07,0x80 ("other" communications device)
25 * when in fact it looks and acts like a UART on IO port 0x3E8 IRQ 9. Identifies itself
26 * as "TOS7009" (TODO: The PnP BIOS also announces something at 0x3E0, is that related to this?).
27 * UART notes: For the most part you can treat it like a serial port BUT there is one catch
28 * that is related to IR transmission: both computers cannot send bytes at the
29 * same time. If you do, the light interferes and both computers end up receiving
30 * gibberish. In some cases, it can throw off the bit clock and make the remaining
31 * valid data also gibberish. The only way to resolve the issue it seems, is to
32 * temporarily stop transmitting and give each IR port a chance to reset themselves. */
33 if (devn->type_code[0] == 7 && devn->type_code[1] == 0x80 && !memcmp(id,"TOS7009",7))