Skip to content

Commit

Permalink
🩹 Restore usleep for native / sim
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 30, 2023
1 parent f605c04 commit c624e13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* Native/Simulator LCD-specific defines
*/

void usleep(uint64_t microsec);

uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);

Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ void u8g_SetPinInput(uint8_t internal_pin_number) { SET_DIR_INPUT(internal_pin_n
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status) { WRITE_PIN(pin, pin_status); }
uint8_t u8g_GetPinLevel(uint8_t pin) { return READ_PIN(pin); }

// Linux build expects usleep to exist
void usleep(uint64_t microsec) { assert(false); }

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit c624e13

Please sign in to comment.