Added INPUT_PULLUP support and let analog write use full PWM range
This commit is contained in:
@@ -33,6 +33,11 @@ void pinMode(uint32_t pin, uint32_t mode)
|
||||
gpio_set_direction((gpio_num_t)pin, GPIO_MODE_OUTPUT);
|
||||
gpio_set_pull_mode((gpio_num_t)pin, GPIO_FLOATING);
|
||||
break;
|
||||
|
||||
case INPUT_PULLUP:
|
||||
gpio_set_direction((gpio_num_t)pin, GPIO_MODE_INPUT);
|
||||
gpio_set_pull_mode((gpio_num_t)pin, GPIO_PULLUP_ONLY);
|
||||
break;
|
||||
}
|
||||
|
||||
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin], PIN_FUNC_GPIO);
|
||||
|
||||
Reference in New Issue
Block a user