Hello,
I have a pin that controls the power flow to the sensors on my board.
it is active low, when it gets a raw value of 0, it allows the power flow to the sensors.
I have these two pieces of code that, from my understanding, are supposed to create the same result from the pin's perspective.
first block:
void configure_and_set_sensor_power_pin(){
gpio_pin_configure(gpio_dev1, 10, GPIO_OUTPUT);
gpio_pin_set(gpio_dev1, 10, 0);
}
second block:
from my understanding, GPIO_OUTPUT_ACTIVE only means it sets the first value to 1, gpio_pin_set(gpio_dev1, 10, 0); should be setting it to 0 regardless.
in practice, only the first block works, the second block doesn't.
why is that?
thanks in advance,
shlomo