Search found 5 matches

by botguy
Wed Oct 10, 2018 12:28 pm
Forum: General Discussion
Topic: Can I register additional GPIO pins and provide my own handlers?
Replies: 8
Views: 11812

Re: Can I register additional GPIO pins and provide my own handlers?

This one worked well for me: https://github.com/MajenkoLibraries/MCP23S17
For examples, search for: mcp23s17 MCP23S17 MajenkoLibraries

Bill
by botguy
Sat Aug 11, 2018 5:07 am
Forum: General Discussion
Topic: Can I register additional GPIO pins and provide my own handlers?
Replies: 8
Views: 11812

Re: Can I register additional GPIO pins and provide my own handlers?

You are correct. I tried this originally, but couldn't get it to work. After adding the 'extern' statements, now it works. Below is the updated code. This will still come in handy, but I should point out that I won't be able to use it for clip select (CS) with SPI like I suggested in an earlier post...
by botguy
Fri Aug 10, 2018 4:08 am
Forum: General Discussion
Topic: Can I register additional GPIO pins and provide my own handlers?
Replies: 8
Views: 11812

Re: Can I register additional GPIO pins and provide my own handlers?

Nice find! This seems to work. I still need to try it with external libraries, but it looks promising and all code changes can live within my project. Thanks for the tip! Bill extern void digitalWrite(uint8_t pin, uint8_t val) { // This overwrites the built-in implementation of digitalWrite // As a ...
by botguy
Wed Aug 08, 2018 12:34 am
Forum: General Discussion
Topic: Can I register additional GPIO pins and provide my own handlers?
Replies: 8
Views: 11812

Re: Can I register additional GPIO pins and provide my own handlers?

Thanks for the reply. It is nice and clear on how to proceed. I believe I have the source for all of the libraries I'm using so I can do the method replace you describe. Being familiar with java, I was hoping I could override a method and route requests to my implementation or the default implementa...
by botguy
Sat Aug 04, 2018 4:18 pm
Forum: General Discussion
Topic: Can I register additional GPIO pins and provide my own handlers?
Replies: 8
Views: 11812

Can I register additional GPIO pins and provide my own handlers?

I'd like to use the MCP23S17 to add more GPIO pins to my ESP32. I've done this successfully with multiple MCP23S17 chips and it works fine if I'm directly accessing the pins in my own code. However, if I want to use these pins in someone else's library (for example, setting S0, S1, S2, S3 for a colo...