Skip to content
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

fix wifi initialization on ESP8266 #660

Merged
merged 1 commit into from
Mar 5, 2024
Merged
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
12 changes: 8 additions & 4 deletions uCNC/src/hal/mcus/esp8266/mcu_esp8266.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ static FORCEINLINE void servo_reset(void)
#endif
}

#define start_servo_timeout(timeout) {servo_tick_alarm = servo_tick_counter + timeout + 64;}
#define start_servo_timeout(timeout) \
{ \
servo_tick_alarm = servo_tick_counter + timeout + 64; \
}

static FORCEINLINE void servo_update(void)
{
Expand Down Expand Up @@ -325,6 +328,10 @@ static void mcu_usart_init(void)
void mcu_init(void)
{
mcu_io_init();
#ifndef RAM_ONLY_SETTINGS
esp8266_eeprom_init(NVM_STORAGE_SIZE); // 2K Emulated EEPROM
#endif

mcu_usart_init();

// init rtc
Expand All @@ -337,9 +344,6 @@ void mcu_init(void)
timer1_enable(TIM_DIV1, TIM_EDGE, TIM_LOOP);
timer1_write((APB_CLK_FREQ / ITP_SAMPLE_RATE));

#ifndef RAM_ONLY_SETTINGS
esp8266_eeprom_init(NVM_STORAGE_SIZE); // 2K Emulated EEPROM
#endif
#ifdef MCU_HAS_SPI
esp8266_spi_init(SPI_FREQ, SPI_MODE);
#endif
Expand Down
Loading