ec_main.c 654 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2026, sakumisu
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include <rtthread.h>
  7. #include "ec_master.h"
  8. ec_master_t g_ec_master;
  9. // weak api used in ec_cmd.c
  10. unsigned char cherryecat_eepromdata[2048]; // EEPROM data buffer, please generate by esi_parse.py
  11. // weak api used in ec_cmd.c
  12. void ec_pdo_callback(ec_slave_t *slave, uint8_t *output, uint8_t *input)
  13. {
  14. }
  15. int ec_master_app_init(void)
  16. {
  17. ec_master_cmd_init(&g_ec_master);
  18. ec_master_init(&g_ec_master, 0);
  19. return 0;
  20. }
  21. INIT_APP_EXPORT(ec_master_app_init);
  22. #ifdef FINSH_USING_MSH
  23. #include <finsh.h>
  24. MSH_CMD_EXPORT(ethercat, cherryecat command line tool);
  25. #endif