Skip to content

Make the code build with more recent ESP SDK versions. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions driver/easygpio/easygpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,19 @@ easygpio_getGPIONameFunc(uint8_t gpio_pin, uint32_t *gpio_name, uint8_t *gpio_fu
/**
* Sets the pull up and pull down registers for a pin.
* 'pullUp' takes precedence over pullDown
*
* Note that there is no pulldown functionality on the ESP8266 - you need to use
* an external pulldown resistor. The asssociated functions have been removed from
* the SDK starting with SDK version 1.1.0_15_05_26
*/
static void ICACHE_FLASH_ATTR
easygpio_setupPullsByName(uint32_t gpio_name, EasyGPIO_PullStatus pullStatus) {

if (EASYGPIO_PULLUP == pullStatus){
PIN_PULLDWN_DIS(gpio_name);
PIN_PULLUP_EN(gpio_name);
} else if (EASYGPIO_PULLDOWN == pullStatus){
PIN_PULLUP_DIS(gpio_name);
PIN_PULLDWN_EN(gpio_name);
} else {
PIN_PULLDWN_DIS(gpio_name);
PIN_PULLUP_DIS(gpio_name);
}
}
Expand Down
10 changes: 9 additions & 1 deletion user/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ setup(void) {
os_timer_arm(&loop_timer, PING_SAMPLE_PERIOD, true);
}

//Init function
/**
* ESP SDK V1.1.0 introduced a new user init callback for RF settings.
* This optional function must be present for SDK 1.1.0 and 1.2.0,
* In 1.3.0, it can be removed.
*/
void user_rf_pre_init(void)
{
}
//Init function
void ICACHE_FLASH_ATTR
user_init(void) {
// Make uart0 work with just the TX pin. Baud:115200,n,8,1
Expand Down