Lines Matching refs:pin
33 int pin; member
104 gpio_set(int pin, int level, mraa_boolean_t raw) in gpio_set() argument
106 mraa_gpio_context gpio = mraa_gpio_init(pin); in gpio_set()
112 … "mmapped access to gpio %d not supported, falling back to normal mode\n", pin); in gpio_set()
122 gpio_get(int pin, int* level, mraa_boolean_t raw) in gpio_get() argument
124 mraa_gpio_context gpio = mraa_gpio_init(pin); in gpio_get()
130 … "mmapped access to gpio %d not supported, falling back to normal mode\n", pin); in gpio_get()
145 fprintf(stdout, "Pin %d = %d\n", gpio_info->pin, level); in gpio_isr_handler()
151 gpio_info->context = mraa_gpio_init(gpio_info->pin); in gpio_isr_start()
189 int pin = atoi(argv[2]); in main() local
191 if (gpio_set(pin, atoi(argv[3]), rawmode) != MRAA_SUCCESS) in main()
192 fprintf(stdout, "Could not initialize gpio %d\n", pin); in main()
198 int pin = atoi(argv[2]); in main() local
201 if (gpio_get(pin, &level, rawmode) == MRAA_SUCCESS) { in main()
202 fprintf(stdout, "Pin %d = %d\n", pin, level); in main()
204 fprintf(stdout, "Could not initialize gpio %d\n", pin); in main()
211 int pin = atoi(argv[2]); in main() local
213 gpio_info.pin = pin; in main()
215 … fprintf(stdout, "Monitoring level changes to pin %d. Press RETURN to exit.\n", pin); in main()
224 fprintf(stdout, "Failed to register ISR for pin %d\n", pin); in main()