Lines Matching refs:pin
33 int pin;
47 fprintf(stdout, "set pin level Set pin to level (0/1)\n");
48 fprintf(stdout, "setraw pin level Set pin to level (0/1) via mmap (if available)\n");
49 fprintf(stdout, "get pin Get pin level\n");
50 fprintf(stdout, "getraw pin Get pin level via mmap (if available)\n");
51 fprintf(stdout, "monitor pin Monitor pin level changes\n");
104 gpio_set(int pin, int level, mraa_boolean_t raw)
106 mraa_gpio_context gpio = mraa_gpio_init(pin);
112 "mmapped access to gpio %d not supported, falling back to normal mode\n", pin);
122 gpio_get(int pin, int* level, mraa_boolean_t raw)
124 mraa_gpio_context gpio = mraa_gpio_init(pin);
130 "mmapped access to gpio %d not supported, falling back to normal mode\n", pin);
145 fprintf(stdout, "Pin %d = %d\n", gpio_info->pin, level);
151 gpio_info->context = mraa_gpio_init(gpio_info->pin);
189 int pin = atoi(argv[2]);
191 if (gpio_set(pin, atoi(argv[3]), rawmode) != MRAA_SUCCESS)
192 fprintf(stdout, "Could not initialize gpio %d\n", pin);
198 int pin = atoi(argv[2]);
201 if (gpio_get(pin, &level, rawmode) == MRAA_SUCCESS) {
202 fprintf(stdout, "Pin %d = %d\n", pin, level);
204 fprintf(stdout, "Could not initialize gpio %d\n", pin);
211 int pin = atoi(argv[2]);
213 gpio_info.pin = pin;
215 fprintf(stdout, "Monitoring level changes to pin %d. Press RETURN to exit.\n", pin);
224 fprintf(stdout, "Failed to register ISR for pin %d\n", pin);