12 / 30
iSense Ethernet Gateway User Guide
coalesenses
research to innovate
Returns whether or not the SD Card is write protected or not
Returns:
true
if the SD-Card in the SD-Card slot is write protected,
false
elsewise
4.4.
get_number_of_blocks
uint32 SDCard::get_number_of_blocks( );
Description:
Returns the number of blocks of the currently inserted SD-Card
Returns:
Number of blocks of the SD-Card
4.5.
access
uint8 SDCard::access( uint64 address, uint32 length, uint8* buffer, bool
write );
Description:
Reads or writes data to the SD Card. The returned value is the status code. Its upper 3 bytes are don’t
care bits. A successful write operation is indicated with a value of 5, a successful read operation with
0.
Parameter:
address
The address which shall be accessed
length
Determines how many bytes should be accessed
buffer
Pointer to a buffer to/from which blocks are copied from/to the SD Card
write
If true, the access will be a writing operation, otherwise it is a reading
operation
Returns:
Status code indicating whether the desired operation was successful or not. The upper three bits are
don’t care bits, the lower 5 indicate the status. A Value of
5
of the 5 lower bits indicate a successful
write operation, a value of
0
successful reading.
4.6.
access_block
uint8 SDCard::access_block( uint32 block, uint32 length, uint8* buffer,
bool write );
Description:
Reads or writes data to the SD Card