SparkFun Fingerprint Sensor - FPC2534 Pro  v0.9.9-3-g5d0d172
Library for the SparkFun Fingerprint Sensor - FPC2534 Pro
Loading...
Searching...
No Matches
SfeFPC2534SPI Class Reference

#include <SparkFun_FPC2534.h>

Inheritance diagram for SfeFPC2534SPI:

Public Member Functions

 SfeFPC2534SPI ()
 
bool begin (SPIClass &spiPort, SPISettings &busSPISettings, const uint8_t csPin, const uint32_t interruptPin, bool bInit=false)
 Initialize the sensor using SPI communication. More...
 
bool begin (const uint8_t csPin, const uint32_t interruptPin, bool bInit=false)
 Initialize the sensor using SPI communication. More...
 
fpc_result_t requestStatus (void)
 Request the status from the device. More...
 
fpc_result_t requestVersion (void)
 Request the version from the device. More...
 
fpc_result_t requestEnroll (fpc_id_type_t &id)
 Request to start an enrollment operation. More...
 
fpc_result_t requestIdentify (fpc_id_type_t &id, uint16_t tag)
 Request to start an identification operation. More...
 
fpc_result_t requestAbort (void)
 Send an abort command to the device. More...
 
fpc_result_t requestListTemplates (void)
 Send a list templates command to the device. More...
 
fpc_result_t requestDeleteTemplate (fpc_id_type_t &id)
 Request to delete a template. More...
 
fpc_result_t sendReset (void)
 Request to send a reset command to the device. More...
 
fpc_result_t startNavigationMode (uint8_t orientation)
 Populate and transfer a CMD_SET_CRYPTO_KEY request. More...
 
fpc_result_t startBuiltInSelfTest (void)
 Start the BuiltIn Self Test. (BIST ) More...
 
fpc_result_t requestSetGPIO (uint8_t pin, uint8_t mode, uint8_t state)
 Send GPIO control command to the device. More...
 
fpc_result_t requestGetGPIO (uint8_t pin)
 Respond to a GPIO get state command to the device. More...
 
fpc_result_t setSystemConfig (fpc_system_config_t *cfg)
 Set the system configuration on the device. More...
 
fpc_result_t requestGetSystemConfig (uint8_t type)
 Request the system configuration from the device. More...
 
fpc_result_t factoryReset (void)
 Send a factory reset command to the device. More...
 
uint16_t currentMode (void) const
 Get the current operating mode of the device. More...
 
bool isFingerPresent (void) const
 Check if a finger is currently present on the sensor. More...
 
void setCallbacks (const sfDevFPC2534Callbacks_t &callbacks)
 Set the callback functions for the library to call on events. This is required. More...
 
bool initialize (sfDevFPC2534IComm &comm)
 initialize the library with a communication interface. More...
 
bool isReady (void) const
 Check if the device firmware is ready. More...
 
bool isDataAvailable (void) const
 Check if data is available to read from the device. More...
 
void clearData (void)
 Clear any available data from the device. More...
 
fpc_result_t setLED (bool on=true)
 Set the state of the on-board LED. More...
 
fpc_result_t processNextResponse (bool flushNone)
 Process the next response message from the device. This should be called regularly (in loop) More...
 
fpc_result_t processNextResponse (void)
 

Constructor & Destructor Documentation

◆ SfeFPC2534SPI()

SfeFPC2534SPI::SfeFPC2534SPI ( )
inline

Member Function Documentation

◆ begin() [1/2]

bool SfeFPC2534SPI::begin ( const uint8_t  csPin,
const uint32_t  interruptPin,
bool  bInit = false 
)
inline

Initialize the sensor using SPI communication.

Parameters
csPinChip select pin number
interruptPinPin number for the interrupt (default is 255, meaning no interrupt)
bInitWhether to initialize the SPI bus (default is false)
Returns
true if initialization was successful, false otherwise

◆ begin() [2/2]

bool SfeFPC2534SPI::begin ( SPIClass &  spiPort,
SPISettings &  busSPISettings,
const uint8_t  csPin,
const uint32_t  interruptPin,
bool  bInit = false 
)
inline

Initialize the sensor using SPI communication.

Parameters
spiPortReference to the SPIClass object to use (default is SPI)
busSPISettingsSPI settings to use for the bus
csPinChip select pin number
interruptPinPin number for the interrupt)
bInitWhether to initialize the SPI bus (default is false)
Returns
true if initialization was successful, false otherwise

◆ clearData()

void sfDevFPC2534::clearData ( void  )
inlineinherited

Clear any available data from the device.

◆ currentMode()

uint16_t sfDevFPC2534::currentMode ( void  ) const
inlineinherited

Get the current operating mode of the device.

Returns
Current mode (STATE_ENROLL, STATE_IDENTIFY, STATE_NAVIGATION)

◆ factoryReset()

fpc_result_t sfDevFPC2534::factoryReset ( void  )
inherited

Send a factory reset command to the device.

Perform factory reset (system config flags must be set to support this).

Returns
Result Code

◆ initialize()

bool sfDevFPC2534::initialize ( sfDevFPC2534IComm comm)
inlineinherited

initialize the library with a communication interface.

Parameters
commThe communication interface to use.
Returns
true - if initialization was successful

◆ isDataAvailable()

bool sfDevFPC2534::isDataAvailable ( void  ) const
inlineinherited

Check if data is available to read from the device.

Returns
true - if data is available

◆ isFingerPresent()

bool sfDevFPC2534::isFingerPresent ( void  ) const
inlineinherited

Check if a finger is currently present on the sensor.

Returns
true - if finger is present
false - if no finger is present

◆ isReady()

bool sfDevFPC2534::isReady ( void  ) const
inlineinherited

Check if the device firmware is ready.

Returns
true - if device firmware is ready

◆ processNextResponse() [1/2]

fpc_result_t sfDevFPC2534::processNextResponse ( bool  flushNone)
inherited

Process the next response message from the device. This should be called regularly (in loop)

Parameters
flushNone- if true, EVENT_NONE events will be skipped
Returns
fpc_result_t

◆ processNextResponse() [2/2]

fpc_result_t sfDevFPC2534::processNextResponse ( void  )
inlineinherited

◆ requestAbort()

fpc_result_t sfDevFPC2534::requestAbort ( void  )
inherited

Send an abort command to the device.

Returns
Result Code

◆ requestDeleteTemplate()

fpc_result_t sfDevFPC2534::requestDeleteTemplate ( fpc_id_type_t id)
inherited

Request to delete a template.

id type can be ID_TYPE_SPECIFIED or ID_TYPE_ALL

Parameters
idThe User ID to be deleted.
Returns
Result Code

◆ requestEnroll()

fpc_result_t sfDevFPC2534::requestEnroll ( fpc_id_type_t id)
inherited

Request to start an enrollment operation.

id type can be ID_TYPE_SPECIFIED or ID_TYPE_GENERATE_NEW

Parameters
idThe User ID to be used for the new template.
Returns
Result Code

◆ requestGetGPIO()

fpc_result_t sfDevFPC2534::requestGetGPIO ( uint8_t  pin)
inherited

Respond to a GPIO get state command to the device.

Configure gpio pins.

Parameters
pinPin to get state of (see product specification).
Returns
Result Code

◆ requestGetSystemConfig()

fpc_result_t sfDevFPC2534::requestGetSystemConfig ( uint8_t  type)
inherited

Request the system configuration from the device.

Configure various system settings.

Parameters
typeOne of FPC_SYS_CFG_TYPE_*.
Returns
Result Code

◆ requestIdentify()

fpc_result_t sfDevFPC2534::requestIdentify ( fpc_id_type_t id,
uint16_t  tag 
)
inherited

Request to start an identification operation.

id type can be ID_TYPE_SPECIFIED or ID_TYPE_ALL

Parameters
idThe User ID to be used for the new template.
tagOperation tag. Will be returned in the response.
Returns
Result Code

◆ requestListTemplates()

fpc_result_t sfDevFPC2534::requestListTemplates ( void  )
inherited

Send a list templates command to the device.

Returns
Result Code

◆ requestSetGPIO()

fpc_result_t sfDevFPC2534::requestSetGPIO ( uint8_t  pin,
uint8_t  mode,
uint8_t  state 
)
inherited

Send GPIO control command to the device.

Configure gpio pins.

Parameters
pinPin to configure (see product specification).
modeMode selection (GPIO_CONTROL_MODE_*).
stateState of pin if output (GPIO_CONTROL_STATE_*).
Returns
Result Code

◆ requestStatus()

fpc_result_t sfDevFPC2534::requestStatus ( void  )
inherited

Request the status from the device.

Returns
Result Code

◆ requestVersion()

fpc_result_t sfDevFPC2534::requestVersion ( void  )
inherited

Request the version from the device.

Returns
Result Code

◆ sendReset()

fpc_result_t sfDevFPC2534::sendReset ( void  )
inherited

Request to send a reset command to the device.

Returns
Result Code

◆ setCallbacks()

void sfDevFPC2534::setCallbacks ( const sfDevFPC2534Callbacks_t callbacks)
inlineinherited

Set the callback functions for the library to call on events. This is required.

Parameters
callbacksStruct holding all callback function pointers.

◆ setLED()

fpc_result_t sfDevFPC2534::setLED ( bool  on = true)
inherited

Set the state of the on-board LED.

Parameters
ontrue to turn LED on, false to turn it off
Returns
Result Code

◆ setSystemConfig()

fpc_result_t sfDevFPC2534::setSystemConfig ( fpc_system_config_t cfg)
inherited

Set the system configuration on the device.

Configure various system settings.

Parameters
cfgPointer to fpc_system_config_t.
Returns
Result Code

◆ startBuiltInSelfTest()

fpc_result_t sfDevFPC2534::startBuiltInSelfTest ( void  )
inherited

Start the BuiltIn Self Test. (BIST )

Runs the BuiltIn Self Test.

Returns
Result Code

◆ startNavigationMode()

fpc_result_t sfDevFPC2534::startNavigationMode ( uint8_t  orientation)
inherited

Populate and transfer a CMD_SET_CRYPTO_KEY request.

Returns
Result Code

Start navigation mode on the device.

Starts the navigation mode.

Parameters
orientationOrientation in 90 degrees per step (0-3).
Returns
Result Code

The documentation for this class was generated from the following file: