Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
HZ-Grow GROW_R502A fingerprint sensor. More...
Files | |
file | grow_r502a.h |
Header file for extended sensor API of Grow R502A sensor. |
Data Structures | |
struct | r502a_sys_param |
System parameter. More... | |
struct | r502a_template |
Fingerprint template. More... |
Functions | |
int | r502a_read_sys_param (const struct device *dev, struct r502a_sys_param *val) |
Read system parameters. | |
int | fps_upload_char_buf (const struct device *dev, struct r502a_template *temp) |
Upload finger template. | |
int | fps_download_char_buf (const struct device *dev, uint8_t char_buf_id, const struct r502a_template *temp) |
Download finger template. |
Baud rates | |
#define | R502A_BAUD_9600 1 |
9600 bps | |
#define | R502A_BAUD_19200 2 |
19200 bps | |
#define | R502A_BAUD_38400 4 |
38400 bps | |
#define | R502A_BAUD_57600 6 |
57600 bps | |
#define | R502A_BAUD_115200 12 |
115200 bps |
HZ-Grow GROW_R502A fingerprint sensor.
#define R502A_BAUD_115200 12 |
#include <zephyr/drivers/sensor/grow_r502a.h>
115200 bps
#define R502A_BAUD_19200 2 |
#include <zephyr/drivers/sensor/grow_r502a.h>
19200 bps
#define R502A_BAUD_38400 4 |
#include <zephyr/drivers/sensor/grow_r502a.h>
38400 bps
#define R502A_BAUD_57600 6 |
#include <zephyr/drivers/sensor/grow_r502a.h>
57600 bps
#define R502A_BAUD_9600 1 |
#include <zephyr/drivers/sensor/grow_r502a.h>
9600 bps
enum r502a_data_len |
#include <zephyr/drivers/sensor/grow_r502a.h>
Data packet length.
This enumeration lists all the supported data packet lengths for when the sensor communicates with the host.
Enumerator | |
---|---|
R502A_PKG_LEN_32 | 32 bytes |
R502A_PKG_LEN_64 | 64 bytes |
R502A_PKG_LEN_128 | 128 bytes |
R502A_PKG_LEN_256 | 256 bytes |
enum r502a_led_color_idx |
#include <zephyr/drivers/sensor/grow_r502a.h>
Enumerator | |
---|---|
R502A_LED_COLOR_RED | |
R502A_LED_COLOR_BLUE | |
R502A_LED_COLOR_PURPLE |
enum r502a_sec_level |
#include <zephyr/drivers/sensor/grow_r502a.h>
Security level.
This enumeration lists all the supported security levels controlling the matching threshold value for fingerprint matching.
Enumerator | |
---|---|
R502A_SEC_LEVEL_1 | Level 1 (lowest security) |
R502A_SEC_LEVEL_2 | Level 2. |
R502A_SEC_LEVEL_3 | Level 3. |
R502A_SEC_LEVEL_4 | Level 4. |
R502A_SEC_LEVEL_5 | Level 5 (highest security) |
enum r502a_sys_param_set |
#include <zephyr/drivers/sensor/grow_r502a.h>
System parameter set.
This enumeration lists all the system parameters that can be set.
Enumerator | |
---|---|
R502A_BAUD_RATE | Baud rate. |
R502A_SECURITY_LEVEL | Security level. |
R502A_DATA_PKG_LEN | Data package length. |
#include <zephyr/drivers/sensor/grow_r502a.h>
Custom sensor attributes for Grow R502A.
Enumerator | |
---|---|
SENSOR_ATTR_R502A_CAPTURE | To capture finger and store as feature file in RAM buffers char_buf_1 and char_buf_2. |
SENSOR_ATTR_R502A_TEMPLATE_CREATE | create template from feature files at RAM buffers char_buf_1 & char_buf_2 and store a template data back in both RAM buffers char_buf_1 and char_buf_2. |
SENSOR_ATTR_R502A_RECORD_ADD | Add template to the sensor record storage. sensor_value.val1 is the record index for template to be stored in the sensor device's flash |
SENSOR_ATTR_R502A_RECORD_FIND | Find requested data in record storage. sensor_value.val1 is the matched record index. sensor_value.val2 is the matching score. |
SENSOR_ATTR_R502A_RECORD_DEL | Delete mentioned data from record storage. sensor_value.val1 is the record start index to be deleted. sensor_value.val2 is the number of records to be deleted. |
SENSOR_ATTR_R502A_RECORD_FREE_IDX | Get available position to store data on record storage. |
SENSOR_ATTR_R502A_RECORD_EMPTY | Empty the storage record. |
SENSOR_ATTR_R502A_RECORD_LOAD | Load template from storage to RAM buffer of sensor. sensor_value.val1 is the record start index to be loaded in device internal RAM buffer. |
SENSOR_ATTR_R502A_COMPARE | Template data stored in sensor's RAM buffer. sensor_value.val1 is the match result (R502A_FINGER_MATCH_FOUND or R502A_FINGER_MATCH_NOT_FOUND) sensor_value.val2 is the matching score. |
SENSOR_ATTR_R502A_SYS_PARAM | Set device's system parameters. sensor_value.val1 is the parameter number from enum r502a_sys_param_set. sensor_value.val2 is the content to be written for the respective parameter. |
#include <zephyr/drivers/sensor/grow_r502a.h>
Custom sensor channels for Grow R502A.
Enumerator | |
---|---|
SENSOR_CHAN_FINGERPRINT | Fingerprint template count, ID number for enrolling and searching. |
#include <zephyr/drivers/sensor/grow_r502a.h>
Custom trigger types for Grow R502A.
Enumerator | |
---|---|
SENSOR_TRIG_TOUCH | Trigger fires when a touch is detected. |
int fps_download_char_buf | ( | const struct device * | dev, |
uint8_t | char_buf_id, | ||
const struct r502a_template * | temp ) |
#include <zephyr/drivers/sensor/grow_r502a.h>
Download finger template.
This function downloads a finger template from the sensor.
dev | Pointer to the sensor device |
char_buf_id | Character buffer ID (1 or 2) |
temp | Pointer to the template structure |
0 | success |
-errno | negative error code on failure |
int fps_upload_char_buf | ( | const struct device * | dev, |
struct r502a_template * | temp ) |
#include <zephyr/drivers/sensor/grow_r502a.h>
Upload finger template.
This function uploads a finger template to the sensor.
dev | Pointer to the sensor device |
temp | Pointer to the template structure |
0 | success |
-errno | negative error code on failure |
int r502a_read_sys_param | ( | const struct device * | dev, |
struct r502a_sys_param * | val ) |
#include <zephyr/drivers/sensor/grow_r502a.h>
Read system parameters.
This function reads the system parameters from the sensor.
dev | Pointer to the sensor device |
val | Pointer to the system parameter structure |
0 | success |
-errno | negative error code on failure |