11 / 30
iSense Ethernet Gateway User Guide
coalesenses
research to innovate
4.
SDCard API Description
The Ethernet Gateway comes with an integrated microSD slot, which allows to read/write data from/to
a microSD card.
The
SDCard
class in the
isense
namespace contains all software functionality for operating the
SD Card-specific features, including
•
writing data to a microSD card and,
•
reading data from a microSD card
The
SDCard
class is defined in
src/isense/modules/ethernet_module/SD_card.h
in the
iSense
directory.
Required Modules:
SD Card Module*
#define ISENSE_ENABLE_ETHERNET_MODULE_SD_CARD
SPI*
#define ISENSE_ENABLE_SPI
GPIO*
#define ISENSE_ENABLE_GPIO
4.1.
Constructor
SDCard::SDCard( OS& os );
Description:
Standard constructor. NOTE: An instance of
SDCard
is created when instantiating the
NET10Module. That instance can be obtained using the
sd_card
method, see 3.6.
Parameters:
os
Reference to the current instance of the iSense operating system
4.2.
is_ready
bool SDCard::is_ready( );
Description:
Returns if a fully initialized SD Card is in the SD card slot
Returns:
true
if a SD-Card is inserted in the SD-Card slot which can be operated,
false
elsewise
4.3.
is_write_protected
bool SDCard::is_write_protected( );
Description: