Zephyr Project API 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 <include/zephyr/drivers/sensor/grow_r502a.h>
115200 bps
#define R502A_BAUD_19200 2 |
#include <include/zephyr/drivers/sensor/grow_r502a.h>
19200 bps
#define R502A_BAUD_38400 4 |
#include <include/zephyr/drivers/sensor/grow_r502a.h>
38400 bps
#define R502A_BAUD_57600 6 |
#include <include/zephyr/drivers/sensor/grow_r502a.h>
57600 bps
#define R502A_BAUD_9600 1 |
#include <include/zephyr/drivers/sensor/grow_r502a.h>
9600 bps
enum r502a_data_len |
#include <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 <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 <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 <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 <include/zephyr/drivers/sensor/grow_r502a.h>
Custom sensor attributes for Grow R502A.
#include <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 <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 <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 <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 <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 |