W5500.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * W5500.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include "SpiService.h"
14 
15 namespace Ethernet
16 {
17 class W5500PhyFactory : public Ethernet::PhyFactory
18 {
19 public:
20  using PhyFactory::PhyFactory;
21 
22  PhyInstance* create(const PhyConfig& config) override;
23  void destroy(PhyInstance* inst) override;
24 };
25 
30 class W5500Service : public SpiService
31 {
32 public:
33  W5500Service() : SpiService(w5500PhyFactory)
34  {
35  }
36 
37  bool begin(const Config& config);
38 
39 private:
40  static W5500PhyFactory w5500PhyFactory;
41 };
42 
43 } // namespace Ethernet
bool begin(const Config &config)
W5500Service()
Definition: W5500.h:41
Virtual class used to construct a specific PHY instance.
Definition: Ethernet.h:97
void destroy(PhyInstance *inst) override
Called by the Service to destroy a PHY instance.
SPI ethernet provider.
Definition: SpiService.h:28
Definition: W5500.h:25
Ethernet::PhyInstance PhyInstance
Definition: Ethernet.h:100
Ethernet provider using W5500 SPI.
Definition: W5500.h:38
PhyInstance * create(const PhyConfig &config) override
Called by the Service to construct a PHY instance.
Definition: Dp83848.h:15