Autodocs Resources:
card.resource BeginCardAccess CardAccessSpeed CardChangeCount CardForceChange CardInterface CardMiscControl CardProgramVoltage CardResetCard CardResetRemove CopyTuple DeviceTuple EndCardAccess GetCardMap IfAmigaXIP OwnCard ReadCardStatus ReleaseCard Include GuruMeditation
|
Docs » Autodocs » card.resource » CardProgramVoltage
CardProgramVoltage -- Set programming voltage.
success=CardProgramVoltage( handle, voltage ); a1 d0 LONG CardProgramVoltage( struct CardHandle *, ULONG );
Used to set programming voltages (e.g., for FLASH-ROM/EPROM cards).
handle - Same handle as that used when OwnCard() was called. voltage - See card.i/h for valid values.
1 - Successful. 0 - Not successful. Most likely because the credit-card card has been removed, and you are no longer the owner. -1 - This function is not being supported. On some machines with a minimal (hardware) credit-card interface, this feature may not be possible.
This function may be called from within a task, or from a level 1 or level 2 interrupt. !!!WARNING!!! Flash-ROM programming requires careful coding to prevent leaving the Erase command on too long. Failure to observe the maximum time between the Erase command, and the Erase-Verify command can make a Flash-ROM card unusable. Some Flash-ROM cards may provide an internal watch-dog timer which protects the card. Because of the relatively long time (e.g., 10ms) between Erase, and Erase-Verify which must be observed, the need for such critical timing can be problematic on a multi-tasking machine. Vendors of Flash-ROM's recommend a high priority interrupt generated by a 10ms timer be used to turn off Erase. On the Amiga this can be accomplished by using a CIA-B interval timer. The timer.device also provides a mechanism for generating a low priority interrupt. The timer.device is easier to use than CIA interval timers, though not as accurate or as safe. Even if the Flash-ROM card provides an internal watch-dog timer, implementation of the code during Erase should assume that the Flash-ROM does not.
OwnCard(), <resources/card.h>, "resources/card.i"
|