Low-level GPIO peripheral driver interface definitions.
void srf04_trigger(const srf04_t *dev)
Triggers measurement.
int srf04_read(const srf04_t *dev)
Returns time of flight in ms.
int srf04_get_distance(const srf04_t *dev)
Convenience function triggers a measurement and returns distance.
int srf04_init(srf04_t *dev, const srf04_params_t *params)
Initialize gpio and interrupt.
@ SRF04_ERR_INVALID
error no valid measurement available
@ SRF04_ERR_MEASURING
error sensor is measuring
@ SRF04_OK
exit without error
@ SRF04_ERR_GPIO
error initializing gpio
stdio wrapper to extend the C libs stdio
GPIO pins for srf04 device.
gpio_t trigger
GPIO Port the trigger pin is connected to.
gpio_t echo
GPIO Port the echo pin is connected to.
Device descriptor for srf04 sensor.
uint32_t time
timestamp of trigger or echo
int32_t distance
raw time of flight distance
srf04_params_t p
GPIO Ports of device.
xtimer interface definitions