Low-level driver for the re200b pir sensor.
This driver provides access to the main features of the re200b pir sensor.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the Re200b_pir_sensor_group. | |
Functions | |
void | re200b_motion_detect_disable (void) |
Disable re200b pir sensor. More... | |
void | re200b_motion_detect_enable (void) |
Enable re200b pir sensor. More... | |
e_cmp_res | re200b_motion_detect_get_compare_result (void) |
return comparison result More... | |
void | re200b_motion_detect_handler (void) |
re200b_motion_detect_handler which allow to know comparison result (CMP_GREATER or CMP_LESS) More... | |
void | re200b_motion_detect_init (uint32_t ul_acc_minus, uint32_t ul_acc_plus) |
Initialize re200b sensor in order to detect motion. More... | |
void | re200b_motion_detect_reset (void) |
Reset variable used in re200b sensor functions. More... | |
uint32_t | re200b_motion_detection (void) |
Allow to know if a motion was detected. More... | |
Variables | |
static volatile e_cmp_res | g_compare_result = CMP_EQUAL |
indicate type of comparison event(CMP_GREATER or CMP_LESS) More... | |
volatile uint32_t | g_ul_compare_event_flag = false |
indicate if there's any comparison event triggered More... | |
void re200b_motion_detect_disable | ( | void | ) |
Disable re200b pir sensor.
References acc_disable(), and acc_disable_interrupt().
Referenced by main().
void re200b_motion_detect_enable | ( | void | ) |
Enable re200b pir sensor.
References acc_enable(), and acc_enable_interrupt().
Referenced by main().
e_cmp_res re200b_motion_detect_get_compare_result | ( | void | ) |
return comparison result
References g_compare_result.
void re200b_motion_detect_handler | ( | void | ) |
re200b_motion_detect_handler which allow to know comparison result (CMP_GREATER or CMP_LESS)
References acc_get_comparison_result(), acc_get_interrupt_status(), CMP_GREATER, and CMP_LESS.
Referenced by ACC_Handler().
void re200b_motion_detect_init | ( | uint32_t | ul_acc_minus, |
uint32_t | ul_acc_plus | ||
) |
Initialize re200b sensor in order to detect motion.
ul_acc_minus | ACC minus input, use ACC peripheral definition in header. |
ul_acc_plus | ACC plus input, use ACC peripheral definition in header. |
References acc_get_interrupt_status(), acc_init(), CMP_EQUAL, and pmc_enable_periph_clk().
Referenced by main().
void re200b_motion_detect_reset | ( | void | ) |
uint32_t re200b_motion_detection | ( | void | ) |
Allow to know if a motion was detected.
References CMP_GREATER.
Referenced by main().
indicate type of comparison event(CMP_GREATER or CMP_LESS)
Referenced by re200b_motion_detect_get_compare_result().
volatile uint32_t g_ul_compare_event_flag = false |
indicate if there's any comparison event triggered