![]() |
IoT Drivers
v3.3.0 (S2022)
Engineering in Software Technology
|
How to create the driver. More...

Functions | |
| hcsr501_p | hcsr501_create (volatile uint8_t *port, uint8_t portPin) |
| Create the HC-SR501 driver. More... | |
| void | hcsr501_destroy (hcsr501_p instance) |
| Destroy the HC-SR501 driver. More... | |
How to create the driver.
| hcsr501_p hcsr501_create | ( | volatile uint8_t * | port, |
| uint8_t | portPin | ||
| ) |
Create the HC-SR501 driver.
Creates and initialize the driver.
| [in] | *port | pointer to the PORT the PIR sensor is connected to (e.g. &PORTA). |
| [in] | portPin | in the PORT the PIR sensor is connected to (e.g. PA3). |
| void hcsr501_destroy | ( | hcsr501_p | instance | ) |
Destroy the HC-SR501 driver.
Destroys the driver after use. The HEAP memory used for the driver will be freed again.
| [in] | instance | driver instance to be destroyed hcsr501_create. |