Hi,
I’m new to Windows drivers and am trying to get a better understanding of a couple things. I have a PCI multiport serial card, and from what I read it looked like the best place to start off was with the kmdf toaster example from the DDK. I have a bus driver that gets the I/O resources, inits some of the hardware, and enumerates the serial ports as childs.
The card only has one I/O resource which is recognized by the bus driver, and each port has its own set of registers in the I/O space. I setup a bus interface function so that the child ports can get the I/O resource info from the bus driver, and then use the READ_PORT_UCHAR/WRITE_PORT_UCHAR macros inside the child driver. Is this the right way to go about it, since the child ports will only touch their own registers? Should I not be touching that I/O space outside of the bus driver?
I’m a little confused on the interaction between a child and the bus driver. I know I’ll have at least 1 ioctl I need to support that needs to be forwarded from the child to the bus driver and run serially. Do I use something like WdfIoTargetSendIoctlSynchronously for that, so that it flows like:
user space app -> ioctl to serial port -> WdfIoTargetSendIoctlSynchronously to bus driver ?
Thanks!