Colibri iMX.6 512MB IT v1.1b
Colibri Evaluation Board
TorizonCore upstream 5.6.0
Hi,
Yesterday I managed (with a lot of help) to compile and run
Reading through the tutorial
Basic GPIO usage - Colibri Evaluation Board - Colibri iMX6 (toradex.com)
I managed through the parts to get gpioinfo to work:
##gpioinfo | grep -e “SODIMM” -e “MMX3”
gpiochip2 - 32 lines:
line 0: “SODIMM_111” unused input active-high
line 1: “SODIMM_113” unused input active-high
line 2: “SODIMM_115” unused input active-high
line 3: “SODIMM_117” unused input active-high
line 4: “SODIMM_119” unused input active-high
line 5: “SODIMM_121” unused input active-high
line 6: “SODIMM_123” unused input active-high
line 7: “SODIMM_125” unused input active-high
line 8: “SODIMM_110” unused input active-high
line 9: “SODIMM_112” unused input active-high
line 10: “SODIMM_114” unused input active-high
I need to configure SODIMM_113 as an output, but…
I don’t understand step 5 from the tutorial.
I am using TorizonCore, should I then install Linux and use the tool to configure my GPIOs as output?
Or can I just jump straight in to coding it with these examples lines:
struct gpiod_chip *output_chip; struct gpiod_line *output_line;
Configure a GPIO as output:
/* open the GPIO bank */
output_chip = gpiod_chip_open_by_number(bank);
/* open the GPIO line */
output_line = gpiod_chip_get_line(output_chip, line);
/* config as output and set a description */
gpiod_line_request_output(output_line, "gpio-test", GPIOD_LINE_ACTIVE_STATE_HIGH);
Toggle a GPIO:
/* Clear */
int line_value = 0; gpiod_line_set_value(output_line, line_value);
/* Set */
line_value = 1; gpiod_line_set_value(output_line, line_value);