zephyrproject-rtos/arduino-core-zephyr

GPIO enhancements needed

Closed this issue · 3 comments

Hey, I have gone through the1st point , I have a noob question to ask,
do we have to define enum for different pinmodes as mentioned here or do we have to append the pinMode function with the option to set the pinmode as GPIO_PULL_UP, GPIO_PULL_DOWN,GPIO_OPEN_DRAIN as done here

do we have to define enum for different pinmodes as mentioned here

No, You are not atall supposed to modify any code in ArduinoCore-API.

What is required is that you implement each of

INPUT_PULLUP     = 0x2,
  INPUT_PULLDOWN   = 0x3,
  OUTPUT_OPENDRAIN = 0x4,

using an underlying zephyr code as documented here: GPIO input/output configuration flags

Thanks @szczys for solving this in PR #19