IoT Drivers  v3.3.0 (S2022)
Engineering in Software Technology
hcsr501.h
Go to the documentation of this file.
1 
25 #ifndef HCSR501_H_
26 #define HCSR501_H_
27 #include <stdbool.h>
28 
29 // Abstract Data Type (ADT)
30 typedef struct hcsr501_struct *hcsr501_p;
31 
32 /* ======================================================================================================================= */
46 hcsr501_p hcsr501_create(volatile uint8_t *port, uint8_t portPin);
47 
48 /* ======================================================================================================================= */
59 void hcsr501_destroy(hcsr501_p instance);
60 
61 /* ======================================================================================================================= */
73 
127 #endif /* HCSR501_H_ */
hcsr501_destroy
void hcsr501_destroy(hcsr501_p instance)
Destroy the HC-SR501 driver.
hcsr501_isDetecting
bool hcsr501_isDetecting(hcsr501_p instance)
Tell if the sensor is detecting something.
hcsr501_p
struct hcsr501_struct * hcsr501_p
Definition: hcsr501.h:30
hcsr501_create
hcsr501_p hcsr501_create(volatile uint8_t *port, uint8_t portPin)
Create the HC-SR501 driver.