_exports.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * You need to use #ifdef around functions that may not exist
  3. * in the final configuration (such as i2c).
  4. * use a dummyfunction as first parameter to EXPORT_FUNC.
  5. * As an example see the CONFIG_CMD_I2C section below
  6. */
  7. #ifndef EXPORT_FUNC
  8. #define EXPORT_FUNC(a, b, c, ...)
  9. #endif
  10. EXPORT_FUNC(get_version, unsigned long, get_version, void)
  11. EXPORT_FUNC(getchar, int, getc, void)
  12. EXPORT_FUNC(tstc, int, tstc, void)
  13. EXPORT_FUNC(putc, void, putc, const char)
  14. EXPORT_FUNC(puts, void, puts, const char *)
  15. #ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
  16. EXPORT_FUNC(flush, void, flush, void)
  17. #endif
  18. EXPORT_FUNC(printf, int, printf, const char*, ...)
  19. #if (defined(CONFIG_X86) && !defined(CONFIG_X86_64)) || defined(CONFIG_PPC)
  20. EXPORT_FUNC(irq_install_handler, void, install_hdlr,
  21. int, interrupt_handler_t, void*)
  22. EXPORT_FUNC(irq_free_handler, void, free_hdlr, int)
  23. #else
  24. EXPORT_FUNC(dummy, void, install_hdlr, void)
  25. EXPORT_FUNC(dummy, void, free_hdlr, void)
  26. #endif
  27. EXPORT_FUNC(malloc, void *, malloc, size_t)
  28. #if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
  29. EXPORT_FUNC(free, void, free, void *)
  30. #endif
  31. EXPORT_FUNC(udelay, void, udelay, unsigned long)
  32. EXPORT_FUNC(get_timer, unsigned long, get_timer, unsigned long)
  33. EXPORT_FUNC(vprintf, int, vprintf, const char *, va_list)
  34. EXPORT_FUNC(do_reset, int, do_reset, struct cmd_tbl *,
  35. int , int , char * const [])
  36. EXPORT_FUNC(env_get, char *, env_get, const char*)
  37. EXPORT_FUNC(env_set, int, env_set, const char *, const char *)
  38. EXPORT_FUNC(simple_strtoul, unsigned long, simple_strtoul,
  39. const char *, char **, unsigned int)
  40. EXPORT_FUNC(strict_strtoul, int, strict_strtoul,
  41. const char *, unsigned int , unsigned long *)
  42. EXPORT_FUNC(simple_strtol, long, simple_strtol,
  43. const char *, char **, unsigned int)
  44. EXPORT_FUNC(strcmp, int, strcmp, const char *cs, const char *ct)
  45. #if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
  46. EXPORT_FUNC(i2c_write, int, i2c_write, uchar, uint, int , uchar * , int)
  47. EXPORT_FUNC(i2c_read, int, i2c_read, uchar, uint, int , uchar * , int)
  48. #else
  49. EXPORT_FUNC(dummy, void, i2c_write, void)
  50. EXPORT_FUNC(dummy, void, i2c_read, void)
  51. #endif
  52. #if !defined(CONFIG_CMD_SPI) || defined(CONFIG_DM_SPI)
  53. EXPORT_FUNC(dummy, void, spi_setup_slave, void)
  54. EXPORT_FUNC(dummy, void, spi_free_slave, void)
  55. #else
  56. EXPORT_FUNC(spi_setup_slave, struct spi_slave *, spi_setup_slave,
  57. unsigned int, unsigned int, unsigned int, unsigned int)
  58. EXPORT_FUNC(spi_free_slave, void, spi_free_slave, struct spi_slave *)
  59. #endif
  60. #ifndef CONFIG_CMD_SPI
  61. EXPORT_FUNC(dummy, void, spi_claim_bus, void)
  62. EXPORT_FUNC(dummy, void, spi_release_bus, void)
  63. EXPORT_FUNC(dummy, void, spi_xfer, void)
  64. #else
  65. EXPORT_FUNC(spi_claim_bus, int, spi_claim_bus, struct spi_slave *)
  66. EXPORT_FUNC(spi_release_bus, void, spi_release_bus, struct spi_slave *)
  67. EXPORT_FUNC(spi_xfer, int, spi_xfer, struct spi_slave *,
  68. unsigned int, const void *, void *, unsigned long)
  69. #endif
  70. EXPORT_FUNC(ustrtoul, unsigned long, ustrtoul,
  71. const char *, char **, unsigned int)
  72. EXPORT_FUNC(ustrtoull, unsigned long long, ustrtoull,
  73. const char *, char **, unsigned int)
  74. EXPORT_FUNC(strcpy, char *, strcpy, char *dest, const char *src)
  75. EXPORT_FUNC(mdelay, void, mdelay, unsigned long msec)
  76. EXPORT_FUNC(memset, void *, memset, void *, int, size_t)
  77. #ifdef CONFIG_PHY_AQUANTIA
  78. EXPORT_FUNC(mdio_get_current_dev, struct mii_dev *,
  79. mdio_get_current_dev, void)
  80. EXPORT_FUNC(phy_find_by_mask, struct phy_device *, phy_find_by_mask,
  81. struct mii_dev *bus, unsigned phy_mask)
  82. EXPORT_FUNC(mdio_phydev_for_ethname, struct phy_device *,
  83. mdio_phydev_for_ethname, const char *ethname)
  84. EXPORT_FUNC(miiphy_set_current_dev, int, miiphy_set_current_dev,
  85. const char *devname)
  86. #endif