What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

clarkster
Posts: 47
Joined: Sat Sep 23, 2017 12:36 pm

What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby clarkster » Fri Mar 02, 2018 9:44 pm

I continue to try (unsuccessfully) to connect an rmt output to a gpio AND to a pcnt input. I am still confused by Chapter 4 of the TRM even though some have tried to explain it to me.

It would help if I could find the c code for gpio_matrix_in and gpio_matrix_out. I have searched the esp/components folder and cannot find the source code for these functions. They are not in gpio.c. Where is that code?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby WiFive » Fri Mar 02, 2018 10:50 pm

They are in rom, no source code. But the problem you are having may be related to certain gpio utility functions disabling input when configuring output and vice versa.

https://github.com/DavidAntliff/esp32-o ... #L413-L423

clarkster
Posts: 47
Joined: Sat Sep 23, 2017 12:36 pm

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby clarkster » Sun Mar 04, 2018 3:43 am

Thanks for your help. I have inspected the GPIO configuration code in rmt.c and in pcnt.c and I think I see how this can happen. I also looked at the newest TRM and you guys have done a good job revising Chapter 4. I think with a little more work I will figure this out.

prout_boudin
Posts: 1
Joined: Thu Mar 15, 2018 8:13 am

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby prout_boudin » Thu Mar 15, 2018 8:19 am

Hello,

I'm currently looking for gpio_matrix_in() documentation... I cannot find anything regarding the doc on that... could you help ?

clarkster
Posts: 47
Joined: Sat Sep 23, 2017 12:36 pm

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby clarkster » Fri Mar 16, 2018 2:20 am

Well, as WiFive stated above, the source code is not available, but you can still find information on gpio_matrix_in in multiple places.

The first is gpio.h. It is located in - [Your ESP-IDF Folder] / components / esp32 / include / rom / gpio.h.

Next if you look in your ESP-IDF examples folder you will find several examples that use this instruction: i2c.c, i2s.c, pcnt.c, mcpwn.c, rmt.c, uart.c - and others.

Lastly, Kolban's Book on the ESP32 discusses this instruction. https://leanpub.com/kolban-ESP32

Hope this helps...

SparkyNZ
Posts: 43
Joined: Thu Jan 04, 2024 9:01 pm

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Postby SparkyNZ » Sun Jan 07, 2024 3:37 am

Whereabouts is the API documentation for gpio_matrix_in() ? I have some third-party code that's using it that won't compile.


Who is online

Users browsing this forum: endi83, ok-home and 135 guests