Shows how to use event detection on an input pin
#include <bcm2835.h>
#include <stdio.h>
#define PIN RPI_GPIO_P1_15
int main(int argc, char **argv)
{
return 1;
while (1)
{
{
printf("low event detect for pin 15\n");
}
delay(500);
}
return 0;
}
@ BCM2835_GPIO_PUD_UP
Definition: bcm2835.h:906
@ BCM2835_GPIO_FSEL_INPT
Definition: bcm2835.h:888
uint8_t bcm2835_gpio_eds(uint8_t pin)
Definition: bcm2835.c:354
void bcm2835_gpio_len(uint8_t pin)
Definition: bcm2835.c:433
void bcm2835_gpio_set_pud(uint8_t pin, uint8_t pud)
Definition: bcm2835.c:635
void bcm2835_gpio_set_eds(uint8_t pin)
Definition: bcm2835.c:370
void bcm2835_gpio_fsel(uint8_t pin, uint8_t mode)
Definition: bcm2835.c:302
int bcm2835_close(void)
Definition: bcm2835.c:2163
int bcm2835_init(void)
Definition: bcm2835.c:2008