Re: [NTLK] Lantern, Get_Card_Info.pkg & IBM Ethernet Credit CardII

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Fri Jan 31 2003 - 04:32:59 PST


À (At) 2:13 -0500 31/01/03, David Holmes écrivait (wrote) :
>Thanks for the reply Paul,
>
>I think you've hit on what has me confused. Am I correct
>in assuming that in the case of a "good" ethernet card the
>"system" recognizes the card as being "ethernet" and hands
>it over to "Newton Devices.pkg" (card handler?) which in
>turn starts a Lantern task who finds the correct Lantern
>data link layer driver?
>
>And, if that sounds reasonable, is the "system" then this
>"CardServer" I read about in the PCMCIA DDK?

Well, it's slightly different.
When a card is inserted, the card server handles it. It tries to
parse the CIS data. If it succeeds, it calls RecognizeCard on every
registered card handler. Otherwise, it calls ParseUnrecognizedCard.

Card handlers include the memory/communication card handler (this is
a combo), Lantern card handler from ethernet cards, ATA card handler,
GetCardInfo handler.

>My impression was that the Lantern driver (i.e. the only
>part one would normally have to write) is just the card-
>specific things like registers etc. and a "static"
>declaration of productname (CIS/ID) which is used to register
>the driver so it can be found by the "system."

A Lantern driver (like Hiroshi's driver, Apple's sample NE2K driver)
is registered within Lantern (which is Newton Devices package).

>One question about what I did to GetCardInfo - does it make
>sense to you that I could just copy the code from your
>RecognizeCard() block into the ParseUnrecognizedCard() ?
>I did not write any parsing code (such as is shown in the
>Modem example in the PCMCIA DDK) myself...

I never found a card that needed to be parsed. I think that you
should parse the data somehow and then tell the system if you can
handle that card or not.

GetCardInfo is a very special card handler. It tells the system that
it doesn't recognize any card and then it copies the data somehow to
display it later from the NewtonScript task.

Paul

-- 
NPDS: http://newton.kallisys.net:8080/
Apache: http://www.kallisys.com/
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/


This archive was generated by hypermail 2.1.5 : Fri Jan 31 2003 - 22:00:01 PST