/hardware/bsp/intel/peripheral/libmraa/examples/ |
D | mraa-gpio.c | 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 [all …]
|
/hardware/bsp/intel/peripheral/libmraa/tests/ |
D | gpio_checks.py | 38 self.pin = m.Gpio(MRAA_GPIO) 39 self.gpio_path = "/sys/class/gpio/gpio" + str(self.pin.getPin(True)) 43 self.pin = "" 46 self.pin_no = self.pin.getPin() # i should have the pin no. here as set when initing Gpio class 53 self.pin.dir(m.DIR_OUT) 60 self.pin.dir(m.DIR_IN) 67 self.pin.dir(m.DIR_OUT) 68 self.pin.write(1) 75 self.pin.dir(m.DIR_OUT) 76 self.pin.write(0) [all …]
|
/hardware/bsp/intel/peripheral/libmraa/src/x86/ |
D | intel_galileo_rev_g.c | 53 int pin = dev->phy_pin; in mraa_intel_galileo_gen2_dir_pre() local 54 if (plat->pins[pin].gpio.complex_cap.complex_pin != 1) in mraa_intel_galileo_gen2_dir_pre() 57 if (plat->pins[pin].gpio.complex_cap.output_en == 1) { in mraa_intel_galileo_gen2_dir_pre() 58 if (!agpioOutputen[pin]) { in mraa_intel_galileo_gen2_dir_pre() 59 agpioOutputen[pin] = mraa_gpio_init_raw(plat->pins[pin].gpio.output_enable); in mraa_intel_galileo_gen2_dir_pre() 60 if (agpioOutputen[pin] == NULL) { in mraa_intel_galileo_gen2_dir_pre() 63 if (mraa_gpio_dir(agpioOutputen[pin], MRAA_GPIO_OUT) != MRAA_SUCCESS) { in mraa_intel_galileo_gen2_dir_pre() 72 if (mraa_gpio_write(agpioOutputen[pin], output_val) != MRAA_SUCCESS) { in mraa_intel_galileo_gen2_dir_pre() 84 int pin = dev->phy_pin; in mraa_intel_galileo_gen2_gpio_close_pre() local 85 if (agpioOutputen[pin]) { in mraa_intel_galileo_gen2_gpio_close_pre() [all …]
|
D | intel_galileo_rev_d.c | 182 b->pins[0].gpio.mux[0].pin = 40; in mraa_intel_galileo_rev_d() 187 b->pins[0].uart.mux[0].pin = 40; in mraa_intel_galileo_rev_d() 194 b->pins[1].gpio.mux[0].pin = 41; in mraa_intel_galileo_rev_d() 199 b->pins[1].uart.mux[0].pin = 41; in mraa_intel_galileo_rev_d() 206 b->pins[2].gpio.mux[0].pin = 31; in mraa_intel_galileo_rev_d() 211 b->pins[2].mmap.gpio.mux[0].pin = 31; in mraa_intel_galileo_rev_d() 213 b->pins[2].mmap.gpio.mux[1].pin = 14; in mraa_intel_galileo_rev_d() 222 b->pins[3].gpio.mux[0].pin = 30; in mraa_intel_galileo_rev_d() 227 b->pins[3].mmap.gpio.mux[0].pin = 30; in mraa_intel_galileo_rev_d() 229 b->pins[3].mmap.gpio.mux[1].pin = 15; in mraa_intel_galileo_rev_d() [all …]
|
D | intel_edison_fab_c.c | 153 int pin = dev->phy_pin; in mraa_intel_edison_gpio_dir_pre() local 155 if (!agpioOutputen[pin]) { in mraa_intel_edison_gpio_dir_pre() 156 agpioOutputen[pin] = mraa_gpio_init_raw(outputen[pin]); in mraa_intel_edison_gpio_dir_pre() 157 if (agpioOutputen[pin] == NULL) { in mraa_intel_edison_gpio_dir_pre() 160 if (mraa_gpio_dir(agpioOutputen[pin], MRAA_GPIO_OUT) != MRAA_SUCCESS) { in mraa_intel_edison_gpio_dir_pre() 168 if (mraa_gpio_write(agpioOutputen[pin], output_val) != MRAA_SUCCESS) { in mraa_intel_edison_gpio_dir_pre() 194 sysfs = dev->pin; in mraa_intel_edison_gpio_init_post() 208 int pin = dev->phy_pin; in mraa_intel_edison_gpio_close_pre() local 209 if (agpioOutputen[pin]) { in mraa_intel_edison_gpio_close_pre() 210 mraa_gpio_close(agpioOutputen[pin]); in mraa_intel_edison_gpio_close_pre() [all …]
|
/hardware/bsp/intel/peripheral/libupm/src/grove/ |
D | grove.cxx | 38 GroveLed::GroveLed(int pin) in GroveLed() argument 40 if ( !(m_gpio = mraa_gpio_init(pin)) ) { in GroveLed() 74 GroveRelay::GroveRelay(unsigned int pin) in GroveRelay() argument 76 if ( !(m_gpio = mraa_gpio_init(pin)) ) { in GroveRelay() 112 GroveTemp::GroveTemp(unsigned int pin) in GroveTemp() argument 114 if ( !(m_aio = mraa_aio_init(pin)) ) { in GroveTemp() 142 GroveLight::GroveLight(unsigned int pin) in GroveLight() argument 144 if ( !(m_aio = mraa_aio_init(pin)) ) { in GroveLight() 172 GroveRotary::GroveRotary(unsigned int pin) in GroveRotary() argument 174 if ( !(m_aio = mraa_aio_init(pin)) ) { in GroveRotary() [all …]
|
D | grove.h | 76 GroveLed(int pin); 128 GroveRelay(unsigned int pin); 179 GroveTemp(unsigned int pin); 220 GroveLight(unsigned int pin); 259 GroveRotary(unsigned int pin); 324 GroveSlide(unsigned int pin, float ref_voltage = 5.0); 368 GroveButton(unsigned int pin);
|
/hardware/bsp/intel/peripheral/libupm/src/servo/ |
D | servo.cxx | 37 Servo::Servo (int pin) { in Servo() argument 38 init(pin, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH, DEFAULT_WAIT_DISABLE_PWM); in Servo() 41 Servo::Servo (int pin, int minPulseWidth, int maxPulseWidth) { in Servo() argument 42 init(pin, minPulseWidth, maxPulseWidth, DEFAULT_WAIT_DISABLE_PWM); in Servo() 45 Servo::Servo (int pin, int minPulseWidth, int maxPulseWidth, int waitAndDisablePwm) { in Servo() argument 46 init(pin, minPulseWidth, maxPulseWidth, waitAndDisablePwm); in Servo() 144 Servo::init (int pin, int minPulseWidth, int maxPulseWidth, int waitAndDisablePwm) { in init() argument 152 m_servoPin = pin; in init()
|
D | servo.h | 57 Servo (int pin); 66 Servo (int pin, int minPulseWidth, int maxPulseWidth); 77 Servo (int pin, int minPulseWidth, int maxPulseWidth, int waitAndDisablePwm); 165 void init (int pin, int minPulseWidth, int maxPulseWidth, int waitAndDisablePwm);
|
D | es9257.cxx | 32 ES9257::ES9257 (int pin) : Servo(pin) { in ES9257() argument
|
D | es08a.cxx | 32 ES08A::ES08A (int pin) : Servo(pin) { in ES08A() argument
|
/hardware/bsp/intel/peripheral/libmraa/src/pwm/ |
D | pwm.c | 41 snprintf(bu, MAX_SIZE, "/sys/class/pwm/pwmchip%d/pwm%d/duty_cycle", dev->chipid, dev->pin); in mraa_pwm_setup_duty_fp() 61 snprintf(bu, MAX_SIZE, "/sys/class/pwm/pwmchip%d/pwm%d/period", dev->chipid, dev->pin); in mraa_pwm_write_period() 100 snprintf(bu, MAX_SIZE, "/sys/class/pwm/pwmchip%d/pwm%d/period", dev->chipid, dev->pin); in mraa_pwm_read_period() 163 mraa_pwm_init_internal(mraa_adv_func_t* func_table, int chipin, int pin) in mraa_pwm_init_internal() argument 171 dev->pin = pin; in mraa_pwm_init_internal() 179 mraa_pwm_init(int pin) in mraa_pwm_init() argument 185 if (mraa_is_sub_platform_id(pin)) { in mraa_pwm_init() 189 if (plat->pins[pin].capabilites.pwm != 1) { in mraa_pwm_init() 195 return plat->adv_func->pwm_init_replace(pin); in mraa_pwm_init() 198 if (plat->adv_func->pwm_init_pre(pin) != MRAA_SUCCESS) in mraa_pwm_init() [all …]
|
/hardware/bsp/intel/peripheral/libmraa/src/gpio/ |
D | gpio.c | 46 sprintf(bu, SYSFS_CLASS_GPIO "/gpio%d/value", dev->pin); in mraa_gpio_get_valfp() 56 mraa_gpio_init_internal(mraa_adv_func_t* func_table, int pin) in mraa_gpio_init_internal() argument 58 if (pin < 0) in mraa_gpio_init_internal() 72 dev->pin = pin; in mraa_gpio_init_internal() 75 status = dev->advance_func->gpio_init_internal_replace(dev, pin); in mraa_gpio_init_internal() 83 status = dev->advance_func->gpio_init_pre(pin); in mraa_gpio_init_internal() 98 snprintf(directory, MAX_SIZE, SYSFS_CLASS_GPIO "/gpio%d/", dev->pin); in mraa_gpio_init_internal() 109 length = snprintf(bu, sizeof(bu), "%d", dev->pin); in mraa_gpio_init_internal() 111 syslog(LOG_ERR, "gpio: Failed to write %d to export", dev->pin); in mraa_gpio_init_internal() 130 mraa_gpio_init(int pin) in mraa_gpio_init() argument [all …]
|
/hardware/bsp/intel/peripheral/libmraa/src/arm/ |
D | 96boards.c | 55 int i, pin; in mraa_96boards() local 117 pin = ls_gpio_pins[i]; in mraa_96boards() 119 strncpy(b->pins[pin].name, name, MRAA_PIN_NAME_SIZE); in mraa_96boards() 120 b->pins[pin].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 }; in mraa_96boards() 121 b->pins[pin].gpio.pinmap = pin; in mraa_96boards() 122 b->pins[pin].gpio.mux_total = 0; in mraa_96boards()
|
/hardware/bsp/intel/peripheral/libmraa/src/ |
D | mraa.c | 263 mux_i = mraa_gpio_init_raw(meta.mux[mi].pin); in mraa_setup_mux_mapped() 342 mraa_pin_mode_test(int pin, mraa_pinmodes_t mode) in mraa_pin_mode_test() argument 348 if (mraa_is_sub_platform_id(pin)) { in mraa_pin_mode_test() 354 pin = mraa_get_sub_platform_index(pin); in mraa_pin_mode_test() 360 if (pin > (current_plat->phy_pin_count - 1) || pin < 0) in mraa_pin_mode_test() 365 if (current_plat->pins[pin].capabilites.valid == 1) in mraa_pin_mode_test() 369 if (current_plat->pins[pin].capabilites.gpio == 1) in mraa_pin_mode_test() 373 if (current_plat->pins[pin].capabilites.pwm == 1) in mraa_pin_mode_test() 377 if (current_plat->pins[pin].capabilites.fast_gpio == 1) in mraa_pin_mode_test() 381 if (current_plat->pins[pin].capabilites.spi == 1) in mraa_pin_mode_test() [all …]
|
/hardware/bsp/intel/peripheral/libmraa/api/mraa/ |
D | common.hpp | 118 pinModeTest(int pin, Pinmodes mode) in pinModeTest() argument 120 return (bool) mraa_pin_mode_test(pin, (mraa_pinmodes_t) mode); in pinModeTest() 213 getPinName(int pin) in getPinName() argument 215 std::string ret_val(mraa_get_pin_name(pin)); in getPinName()
|
/hardware/bsp/intel/peripheral/libmraa/src/usb/ |
D | ftdi_ft4222.c | 229 mraa_ftdi_ft4222_is_internal_gpio(int pin) in mraa_ftdi_ft4222_is_internal_gpio() argument 231 return pin < numFt4222GpioPins; in mraa_ftdi_ft4222_is_internal_gpio() 236 ftdi_ft4222_set_internal_gpio_dir(int pin, GPIO_Dir direction) in ftdi_ft4222_set_internal_gpio_dir() argument 238 pinDirection[pin] = direction; in ftdi_ft4222_set_internal_gpio_dir() 472 mraa_ftdi_ft4222_gpio_init_internal_replace(mraa_gpio_context dev, int pin) in mraa_ftdi_ft4222_gpio_init_internal_replace() argument 474 dev->phy_pin = (pin < numFt4222GpioPins) ? pin : pin - numFt4222GpioPins; in mraa_ftdi_ft4222_gpio_init_internal_replace() 475 if (pin < 2) { in mraa_ftdi_ft4222_gpio_init_internal_replace() 476 syslog(LOG_NOTICE, "Closing I2C interface to enable GPIO%d\n", pin); in mraa_ftdi_ft4222_gpio_init_internal_replace() 503 uint8_t pin = dev->pin; in mraa_ftdi_ft4222_gpio_read_replace() local 504 if (mraa_ftdi_ft4222_is_internal_gpio(pin)) { in mraa_ftdi_ft4222_gpio_read_replace() [all …]
|
/hardware/bsp/intel/peripheral/light/mraa/ |
D | lights.c | 43 int pin; member 90 static int set_gpio_value(int pin, int value) in set_gpio_value() argument 99 gpio = mraa_gpio_init(pin); in set_gpio_value() 181 rc = set_gpio_value(dev->pin, color); in flash_routine() 312 rc = set_gpio_value(dev->pin, current_state->color); in set_light_generic() 448 light_devices[type].pin = EDISON_ARDUINO_PINS[type]; in init_module() 450 light_devices[type].pin = EDISON_MINIBOARD_PINS[type]; in init_module() 458 light_devices[type].pin = MINNOWBOARD_TURBOT_PINS[type]; in init_module() 461 light_devices[type].pin = MINNOWBOARD_MAX_PINS[type]; in init_module()
|
/hardware/bsp/intel/peripheral/libupm/examples/python/ |
D | hm11.py | 96 pin = "AT+PASS?"; variable 97 print "Querying module PIN (" + pin + ")..." 98 sendCommand(my_ble_obj, pin)
|
/hardware/bsp/intel/peripheral/libupm/examples/java/ |
D | HM11Sample.java | 87 String pin = "AT+PASS?"; in main() local 88 System.out.println("Querying module pin (" + pin + ")..."); in main() 89 sendCommand(ble, pin.getBytes()); in main()
|
/hardware/bsp/intel/peripheral/libupm/examples/c++/ |
D | hm11.cxx | 103 char pin[] = "AT+PASS?"; in main() local 104 cout << "Querying module PIN (" << pin << ")..." << endl; in main() 105 sendCommand(ble, pin); in main()
|
/hardware/bsp/intel/peripheral/libupm/examples/javascript/ |
D | hm11.js | 108 var pin = "AT+PASS?"; 109 console.log("Querying module PIN (" + pin + ")..."); 110 sendCommand(my_ble_obj, pin);
|
/hardware/bsp/intel/peripheral/libmraa/src/aio/ |
D | aio.c | 88 int pin = aio + plat->gpio_count; in mraa_aio_init() local 89 dev->channel = plat->pins[pin].aio.pinmap; in mraa_aio_init() 105 if (plat->pins[pin].capabilites.aio != 1) { in mraa_aio_init() 111 if (plat->pins[pin].aio.mux_total > 0) { in mraa_aio_init() 112 if (mraa_setup_mux_mapped(plat->pins[pin].aio) != MRAA_SUCCESS) { in mraa_aio_init()
|
/hardware/bsp/intel/peripheral/libupm/src/apds9002/ |
D | apds9002.cxx | 33 APDS9002::APDS9002(int pin) in APDS9002() argument 35 if ( !(m_aio = mraa_aio_init(pin)) ) in APDS9002()
|
/hardware/bsp/intel/peripheral/libupm/src/groveloudness/ |
D | groveloudness.cxx | 33 GroveLoudness::GroveLoudness(int pin) in GroveLoudness() argument 35 if ( !(m_aio = mraa_aio_init(pin)) ) in GroveLoudness()
|