PCMCIA Driver

Hi Folks,

Where is a good reference for creating a basic low-level driver for a
PCMICA card? Right now, we just want to issue read/write cycles to a
PCMICA card (i.e. for a memory-mapped I/O port such as lighting
LEDs/etc)

Thanks

Steve Spano
President, Finger Lakes Engineering
(V) 607-277-1614 x223
(F) 800-835-7164
(C) 607-342-1150
xxxxx@flconsult.com
www.fl-eng.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of L3sT4Rd
Sent: Saturday, January 28, 2006 6:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] q about driver allocated IRPs

Hi,

i’m writting a virtual serial port driver which redirects all incoming
IRPs to another
serial port (this is to make for example COM28 available to applications

which don’t
enumerate all serial ports but instead just provide 4 radio buttons to
select COM1-COM4
and is also the first driver i am writting…)

my driver is not directly layered onto some serial ports driver (because

i want a new serial port
to become reserved by the system) but opens a DeviceObject pointer to
the “underlaying” driver through a
IoGetDeviceObjectPointer call from within IRP_MJ_CREATE dispatch
routine.

now my problem is that all the IRP_MJ_xxx dispatch routines work fine
except from the IRP_MJ_READ routine.
my READ dispatch routine is getting called, marks the current IRP
pending, allocates a new IRP, sets a completion
routine and calls the “underlaying” driver. as some character is
received my completion routine is getting called,
frees the allocated IRP, completes the original IRP and returns
STATUS_MORE_PROCESSING_REQUIRED.
but hyperterminal simply doesnt display the received character, although

it recognizes the completed IRP and issues
a new read request.

so my first question is wheter or not i need to copy the buffer of the
driver-allocated IRP to original IRPs buffer ?
my second question is whether or not i need to adjust the IRP Stack Size

of my drivers DeviceObject in that case ?

and my third question (although unrelated to this topic) is if there’s
some way to change the com port number of my
driver that’s displayed by device manager (of course if i took care that

this port is not used otherwise, before…) ?

thx a lot.
regards, daniel.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@flconsult.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Pcidrv (the non ndis version) might be a good place to start. You
should also download KMDF (from http://www.microsoft.com/whdc). It will
make writing your prototype driver much easier. There is a KMDF pcidrv
example as well.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Spano
Sent: Saturday, January 28, 2006 6:20 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] PCMCIA Driver

Hi Folks,

Where is a good reference for creating a basic low-level driver for a
PCMICA card? Right now, we just want to issue read/write cycles to a
PCMICA card (i.e. for a memory-mapped I/O port such as lighting
LEDs/etc)

Thanks

Steve Spano
President, Finger Lakes Engineering
(V) 607-277-1614 x223
(F) 800-835-7164
(C) 607-342-1150
xxxxx@flconsult.com
www.fl-eng.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of L3sT4Rd
Sent: Saturday, January 28, 2006 6:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] q about driver allocated IRPs

Hi,

i’m writting a virtual serial port driver which redirects all incoming
IRPs to another
serial port (this is to make for example COM28 available to applications

which don’t
enumerate all serial ports but instead just provide 4 radio buttons to
select COM1-COM4
and is also the first driver i am writting…)

my driver is not directly layered onto some serial ports driver (because

i want a new serial port
to become reserved by the system) but opens a DeviceObject pointer to
the “underlaying” driver through a
IoGetDeviceObjectPointer call from within IRP_MJ_CREATE dispatch
routine.

now my problem is that all the IRP_MJ_xxx dispatch routines work fine
except from the IRP_MJ_READ routine.
my READ dispatch routine is getting called, marks the current IRP
pending, allocates a new IRP, sets a completion
routine and calls the “underlaying” driver. as some character is
received my completion routine is getting called,
frees the allocated IRP, completes the original IRP and returns
STATUS_MORE_PROCESSING_REQUIRED.
but hyperterminal simply doesnt display the received character, although

it recognizes the completed IRP and issues
a new read request.

so my first question is wheter or not i need to copy the buffer of the
driver-allocated IRP to original IRPs buffer ?
my second question is whether or not i need to adjust the IRP Stack Size

of my drivers DeviceObject in that case ?

and my third question (although unrelated to this topic) is if there’s
some way to change the com port number of my
driver that’s displayed by device manager (of course if i took care that

this port is not used otherwise, before…) ?

thx a lot.
regards, daniel.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@flconsult.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Doran,

Thanks for the pointers! I appreciate it

Steve Spano
President, Finger Lakes Engineering
(V) 607-277-1614 x223
(F) 800-835-7164
(C) 607-342-1150
xxxxx@flconsult.com
www.fl-eng.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Saturday, January 28, 2006 10:08 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PCMCIA Driver

Pcidrv (the non ndis version) might be a good place to start. You
should also download KMDF (from http://www.microsoft.com/whdc). It will
make writing your prototype driver much easier. There is a KMDF pcidrv
example as well.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Steve Spano
Sent: Saturday, January 28, 2006 6:20 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] PCMCIA Driver

Hi Folks,

Where is a good reference for creating a basic low-level driver for a
PCMICA card? Right now, we just want to issue read/write cycles to a
PCMICA card (i.e. for a memory-mapped I/O port such as lighting
LEDs/etc)

Thanks

Steve Spano
President, Finger Lakes Engineering
(V) 607-277-1614 x223
(F) 800-835-7164
(C) 607-342-1150
xxxxx@flconsult.com
www.fl-eng.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of L3sT4Rd
Sent: Saturday, January 28, 2006 6:52 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] q about driver allocated IRPs

Hi,

i’m writting a virtual serial port driver which redirects all incoming
IRPs to another
serial port (this is to make for example COM28 available to applications

which don’t
enumerate all serial ports but instead just provide 4 radio buttons to
select COM1-COM4
and is also the first driver i am writting…)

my driver is not directly layered onto some serial ports driver (because

i want a new serial port
to become reserved by the system) but opens a DeviceObject pointer to
the “underlaying” driver through a
IoGetDeviceObjectPointer call from within IRP_MJ_CREATE dispatch
routine.

now my problem is that all the IRP_MJ_xxx dispatch routines work fine
except from the IRP_MJ_READ routine.
my READ dispatch routine is getting called, marks the current IRP
pending, allocates a new IRP, sets a completion
routine and calls the “underlaying” driver. as some character is
received my completion routine is getting called,
frees the allocated IRP, completes the original IRP and returns
STATUS_MORE_PROCESSING_REQUIRED.
but hyperterminal simply doesnt display the received character, although

it recognizes the completed IRP and issues
a new read request.

so my first question is wheter or not i need to copy the buffer of the
driver-allocated IRP to original IRPs buffer ?
my second question is whether or not i need to adjust the IRP Stack Size

of my drivers DeviceObject in that case ?

and my third question (although unrelated to this topic) is if there’s
some way to change the com port number of my
driver that’s displayed by device manager (of course if i took care that

this port is not used otherwise, before…) ?

thx a lot.
regards, daniel.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@flconsult.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

“Steve Spano” wrote in message news:xxxxx@ntdev…
> Hi Folks,
>
> Where is a good reference for creating a basic low-level driver for a
> PCMICA card? Right now, we just want to issue read/write cycles to a
> PCMICA card (i.e. for a memory-mapped I/O port such as lighting
> LEDs/etc)

If this is 16-bit PCMCIA (not cardbus) - some smartcard reader sample in the DDK
is for such device.

Regards,
–PA

> Thanks
>
> Steve Spano
> President, Finger Lakes Engineering
> (V) 607-277-1614 x223
> (F) 800-835-7164
> (C) 607-342-1150
> xxxxx@flconsult.com
> www.fl-eng.com
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of L3sT4Rd
> Sent: Saturday, January 28, 2006 6:52 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] q about driver allocated IRPs
>
> Hi,
>
> i’m writting a virtual serial port driver which redirects all incoming
> IRPs to another
> serial port (this is to make for example COM28 available to applications
>
> which don’t
> enumerate all serial ports but instead just provide 4 radio buttons to
> select COM1-COM4
> and is also the first driver i am writting…)
>
> my driver is not directly layered onto some serial ports driver (because
>
> i want a new serial port
> to become reserved by the system) but opens a DeviceObject pointer to
> the “underlaying” driver through a
> IoGetDeviceObjectPointer call from within IRP_MJ_CREATE dispatch
> routine.
>
> now my problem is that all the IRP_MJ_xxx dispatch routines work fine
> except from the IRP_MJ_READ routine.
> my READ dispatch routine is getting called, marks the current IRP
> pending, allocates a new IRP, sets a completion
> routine and calls the “underlaying” driver. as some character is
> received my completion routine is getting called,
> frees the allocated IRP, completes the original IRP and returns
> STATUS_MORE_PROCESSING_REQUIRED.
> but hyperterminal simply doesnt display the received character, although
>
> it recognizes the completed IRP and issues
> a new read request.
>
> so my first question is wheter or not i need to copy the buffer of the
> driver-allocated IRP to original IRPs buffer ?
> my second question is whether or not i need to adjust the IRP Stack Size
>
> of my drivers DeviceObject in that case ?
>
> and my third question (although unrelated to this topic) is if there’s
> some way to change the com port number of my
> driver that’s displayed by device manager (of course if i took care that
>
> this port is not used otherwise, before…) ?
>
> thx a lot.
> regards, daniel.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@flconsult.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>