39 void (*on_error)(uint16_t error);
40 void (*on_status)(uint16_t event, uint16_t state);
41 void (*on_version)(
char *version);
42 void (*on_enroll)(uint8_t feedback, uint8_t samples_remaining);
43 void (*on_identify)(
bool is_match, uint16_t id);
44 void (*on_list_templates)(uint16_t num_templates, uint16_t *template_ids);
45 void (*on_navigation)(uint16_t gesture);
46 void (*on_gpio_control)(uint8_t state);
48 void (*on_bist_done)(uint16_t test_verdict);
49 void (*on_data_transfer_done)(uint8_t *data,
size_t size);
50 void (*on_mode_change)(uint16_t new_mode);
51 void (*on_finger_change)(
bool present);
52 void (*on_is_ready_change)(
bool isReady);
257 return _finger_present;
268 _callbacks = callbacks;
300 if (_comm ==
nullptr)
311 if (_comm !=
nullptr)
352 fpc_result_t parseCommand(uint8_t *frame_payload,
size_t payload_size);
354 bool checkForNoneEvent(uint8_t *payload,
size_t size);
365 uint16_t _current_state = 0;
368 bool _finger_present =
false;
Core class implementing FPC2534 functionality independent of communication protocol.
Definition: sfDevFPC2534.h:59
void clearData(void)
Clear any available data from the device.
Definition: sfDevFPC2534.h:309
bool isReady(void) const
Check if the device firmware is ready.
Definition: sfDevFPC2534.h:288
fpc_result_t startNavigationMode(uint8_t orientation)
Populate and transfer a CMD_SET_CRYPTO_KEY request.
Definition: sfDevFPC2534.cpp:130
fpc_result_t requestEnroll(fpc_id_type_t &id)
Request to start an enrollment operation.
Definition: sfDevFPC2534.cpp:65
uint16_t currentMode(void) const
Get the current operating mode of the device.
Definition: sfDevFPC2534.h:244
fpc_result_t processNextResponse(void)
Definition: sfDevFPC2534.h:332
sfDevFPC2534()
Definition: sfDevFPC2534.cpp:16
fpc_result_t requestSetGPIO(uint8_t pin, uint8_t mode, uint8_t state)
Send GPIO control command to the device.
Definition: sfDevFPC2534.cpp:149
fpc_result_t requestListTemplates(void)
Send a list templates command to the device.
Definition: sfDevFPC2534.cpp:102
bool isDataAvailable(void) const
Check if data is available to read from the device.
Definition: sfDevFPC2534.h:298
fpc_result_t setLED(bool on=true)
Set the state of the on-board LED.
Definition: sfDevFPC2534.cpp:695
fpc_result_t setSystemConfig(fpc_system_config_t *cfg)
Set the system configuration on the device.
Definition: sfDevFPC2534.cpp:175
bool initialize(sfDevFPC2534IComm &comm)
initialize the library with a communication interface.
Definition: sfDevFPC2534.h:277
fpc_result_t requestAbort(void)
Send an abort command to the device.
Definition: sfDevFPC2534.cpp:87
fpc_result_t startBuiltInSelfTest(void)
Start the BuiltIn Self Test. (BIST )
Definition: sfDevFPC2534.cpp:141
fpc_result_t factoryReset(void)
Send a factory reset command to the device.
Definition: sfDevFPC2534.cpp:197
bool isFingerPresent(void) const
Check if a finger is currently present on the sensor.
Definition: sfDevFPC2534.h:255
fpc_result_t requestStatus(void)
Request the status from the device.
Definition: sfDevFPC2534.cpp:47
fpc_result_t sendReset(void)
Request to send a reset command to the device.
Definition: sfDevFPC2534.cpp:122
fpc_result_t requestGetGPIO(uint8_t pin)
Respond to a GPIO get state command to the device.
Definition: sfDevFPC2534.cpp:164
fpc_result_t requestVersion(void)
Request the version from the device.
Definition: sfDevFPC2534.cpp:56
fpc_result_t requestGetSystemConfig(uint8_t type)
Request the system configuration from the device.
Definition: sfDevFPC2534.cpp:186
void setCallbacks(const sfDevFPC2534Callbacks_t &callbacks)
Set the callback functions for the library to call on events. This is required.
Definition: sfDevFPC2534.h:266
fpc_result_t requestIdentify(fpc_id_type_t &id, uint16_t tag)
Request to start an identification operation.
Definition: sfDevFPC2534.cpp:75
fpc_result_t requestDeleteTemplate(fpc_id_type_t &id)
Request to delete a template.
Definition: sfDevFPC2534.cpp:111
Definition: sfDevFPC2534IComm.h:19
virtual void clearData(void)=0
virtual bool dataAvailable(void)=0
#define STATE_NAVIGATION
Definition: fpc_api.h:202
#define STATE_ENROLL
Definition: fpc_api.h:200
#define STATE_IDENTIFY
Definition: fpc_api.h:201
uint16_t fpc_result_t
Definition: fpc_api.h:33
#define STATE_APP_FW_READY
System States (Bitmap).
Definition: fpc_api.h:193
const uint8_t SPARKFUN_FPC2534_LED_PIN
Definition: sfDevFPC2534.h:27
Command Header.
Definition: fpc_api.h:123
Template ID specifier payload.
Definition: fpc_api.h:348
System Configuration parameters.
Definition: fpc_api.h:649
Struct holding all callback function pointers for sfDevFPC2534 events.
Definition: sfDevFPC2534.h:38