DM9051.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  * DM9051.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include "SpiService.h"
14 
15 namespace Ethernet
16 {
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 DM9051Service : public SpiService
31 {
32 public:
33  DM9051Service() : SpiService(dm9051PhyFactory)
34  {
35  }
36 
37  bool begin(const Config& config);
38 
39 private:
40  static DM9051PhyFactory dm9051PhyFactory;
41 };
42 
43 } // namespace Ethernet
Definition: DM9051.h:18
void destroy(PhyInstance *inst) override
Called by the Service to destroy a PHY instance.
PhyInstance * create(const PhyConfig &config) override
Called by the Service to construct a PHY instance.
Ethernet provider using W5500 SPI.
Definition: DM9051.h:31
DM9051Service()
Definition: DM9051.h:33
bool begin(const Config &config)
Virtual class used to construct a specific PHY instance.
Definition: Ethernet.h:98
Ethernet::PhyInstance PhyInstance
Definition: Ethernet.h:100
SPI ethernet provider.
Definition: SpiService.h:21
Definition: Dp83848.h:16
PHY configuration.
Definition: Ethernet.h:84
Definition: SpiService.h:23