Hardware description
Parameters:
ResultPtr
: Pointer to register of type
unsigned 1
. Returns 0 for success, 1 for
failure.
Timing:
250 clock cycles or more.
Description:
This macro checks to see if the SmartMedia card is formatted according to the
SmartMedia Physical Specification. If the card is unformatted, it formats it.
ResultPtr
indicates whether the card has been successfully formatted or not.
ResultPtr
also returns 0 if the card was already formatted.
5.15.9 Reading from and writing to the SmartMedia
Setting a logical address
extern macro proc RC200SmartMediaSetLogicalAddress (
WriteNotRead
,
Address
);
Parameters:
WriteNotRead
: Compile time constant. To select a write, use 1. To select a
read, use 0.
Address
: Address in bytes, of type
unsigned 27
.
Timing:
170 cycles or more.
Description:
Sets the address for a SmartMedia read or write operation, using logical
addressing.
The only valid commands to follow this macro are
RC200SmartMediaRead()
or
RC200SmartMediaWrite()
. Ensure that that no other CPLD actions are
carried out once an address has been set. Note that the operation in the
SmartMedia will not terminate unless a read or write and an operation end
(
RC200SmartMediaOperationEnd)
are performed.
The macro adjusts automatically for whether the address is in the first half of the
page (address < 256), or the second half of the page (255 < address < 512).
Setting a physical address
extern macro proc RC200SmartMediaSetAddress (
WriteNotRead
,
Address
);
Parameters:
WriteNotRead
: Compile time constant. To select a write, use 1. To select a read,
use 0.
Address
: Address in bytes, of type
unsigned 27
.
Timing:
170 cycles or more.
Description:
Sets the address for a SmartMedia read or write operation, using physical
addressing.
The only valid commands to follow this macro are
RC200SmartMediaRead()
or
RC200SmartMediaWrite()
. Ensure that that no other CPLD actions are carried
out once an address has been set. Note that the operation in the SmartMedia will
not terminate unless a read or write and an operation end
(
RC200SmartMediaOperationEnd()
) are performed.
The macro adjusts automatically for whether the address is in the first half of the
page (address < 256), or the second half of the page (255 < address < 512).
Reading from the SmartMedia
extern macro proc RC200SmartMediaRead (
DataPtr
,
LastData
);
www.celoxica.com
Page 62