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

Core class implementing FPC2534 functionality independent of communication protocol. More...

#include <sfDevFPC2534.h>

Inheritance diagram for sfDevFPC2534:

Public Member Functions

 sfDevFPC2534 ()
 
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)
 

Detailed Description

Core class implementing FPC2534 functionality independent of communication protocol.

Constructor & Destructor Documentation

◆ sfDevFPC2534()

sfDevFPC2534::sfDevFPC2534 ( )

Member Function Documentation

◆ clearData()

void sfDevFPC2534::clearData ( void  )
inline

Clear any available data from the device.

◆ currentMode()

uint16_t sfDevFPC2534::currentMode ( void  ) const
inline

Get the current operating mode of the device.

Returns
Current mode (STATE_ENROLL, STATE_IDENTIFY, STATE_NAVIGATION)

◆ factoryReset()

fpc_result_t sfDevFPC2534::factoryReset ( void  )

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)
inline

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
inline

Check if data is available to read from the device.

Returns
true - if data is available

◆ isFingerPresent()

bool sfDevFPC2534::isFingerPresent ( void  ) const
inline

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
inline

Check if the device firmware is ready.

Returns
true - if device firmware is ready

◆ processNextResponse() [1/2]

fpc_result_t sfDevFPC2534::processNextResponse ( bool  flushNone)

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  )
inline

◆ requestAbort()

fpc_result_t sfDevFPC2534::requestAbort ( void  )

Send an abort command to the device.

Returns
Result Code

◆ requestDeleteTemplate()

fpc_result_t sfDevFPC2534::requestDeleteTemplate ( fpc_id_type_t id)

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)

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)

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)

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 
)

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  )

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 
)

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  )

Request the status from the device.

Returns
Result Code

◆ requestVersion()

fpc_result_t sfDevFPC2534::requestVersion ( void  )

Request the version from the device.

Returns
Result Code

◆ sendReset()

fpc_result_t sfDevFPC2534::sendReset ( void  )

Request to send a reset command to the device.

Returns
Result Code

◆ setCallbacks()

void sfDevFPC2534::setCallbacks ( const sfDevFPC2534Callbacks_t callbacks)
inline

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)

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)

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  )

Start the BuiltIn Self Test. (BIST )

Runs the BuiltIn Self Test.

Returns
Result Code

◆ startNavigationMode()

fpc_result_t sfDevFPC2534::startNavigationMode ( uint8_t  orientation)

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 files: