My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

LCD_I2C_routines.cpp 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. // adapted from I2C/master/master.c example
  23. // https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
  24. #ifdef __PLAT_NATIVE_SIM__
  25. #include <cstdint>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. uint8_t u8g_i2c_start(const uint8_t sla) {
  30. return 1;
  31. }
  32. void u8g_i2c_init(const uint8_t clock_option) {
  33. }
  34. uint8_t u8g_i2c_send_byte(uint8_t data) {
  35. return 1;
  36. }
  37. void u8g_i2c_stop() {
  38. }
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif // __PLAT_NATIVE_SIM__