phy_tlk110.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #pragma once
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #include "phy.h"
  18. /* @brief Dump all TLK110 PHY SMI configuration registers
  19. *
  20. * @note These registers are dumped at 'debug' level, so output
  21. * may not be visible depending on default log levels.
  22. */
  23. void phy_tlk110_dump_registers();
  24. /* @brief Default TLK110 phy_check_init function.
  25. */
  26. void phy_tlk110_check_phy_init(void);
  27. /* @brief Default TLK110 phy_get_speed_mode function.
  28. */
  29. eth_speed_mode_t phy_tlk110_get_speed_mode(void);
  30. /* @brief Default TLK110 phy_get_duplex_mode function.
  31. */
  32. eth_duplex_mode_t phy_tlk110_get_duplex_mode(void);
  33. /* @brief Default TLK110 phy_power_enable function.
  34. *
  35. * @note This function may need to be replaced with a custom function
  36. * if the PHY has a GPIO to enable power or start a clock.
  37. *
  38. * Consult the ethernet example to see how this is done.
  39. */
  40. void phy_tlk110_power_enable(bool);
  41. /* @brief Default TLK110 phy_init function.
  42. */
  43. void phy_tlk110_init(void);
  44. /* @brief Default TLK110 PHY configuration
  45. *
  46. * This configuration is not suitable for use as-is, it will need
  47. * to be modified for your particular PHY hardware setup.
  48. *
  49. * Consult the Ethernet example to see how this is done.
  50. */
  51. extern const eth_config_t phy_tlk110_default_ethernet_config;
  52. #ifdef __cplusplus
  53. }
  54. #endif