REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
ethernet.cpp
Go to the documentation of this file.
1// Copyright (c) 2024 anabrid GmbH
2// Contact: https://www.anabrid.com/licensing/
3//
4// SPDX-License-Identifier: MIT OR GPL-2.0-or-later
5
6#include <ArduinoJson.h>
7#include <QNEthernet.h>
8#include <QNMDNS.h>
9
10#include <net/ethernet.h>
11#include <net/settings.h>
12#include <utils/logging.h>
13
14#include "protocol/jsonl_server.h"
15#include "web/server.h"
16
17namespace qn = qindesign::network;
18
19FLASHMEM IPAddress net::EthernetClass::localIP() const { return qn::Ethernet.localIP(); }
20
21FLASHMEM IPAddress net::EthernetClass::broadcastIP() const { return qn::Ethernet.broadcastIP(); }
22
23FLASHMEM IPAddress net::EthernetClass::gatewayIP() const { return qn::Ethernet.gatewayIP(); }
24
25FLASHMEM bool net::EthernetClass::isDHCPEnabled() const { return qn::Ethernet.isDHCPEnabled(); }
26
27FLASHMEM bool net::EthernetClass::isDHCPActive() const { return qn::Ethernet.isDHCPActive(); }
28
29FLASHMEM bool net::EthernetClass::linkState() const { return qn::Ethernet.linkState(); }
30
31FLASHMEM bool net::EthernetClass::linkIsFullDuplex() const { return qn::Ethernet.linkIsFullDuplex(); }
32
33FLASHMEM bool net::EthernetClass::linkIsCrossover() const { return qn::Ethernet.linkIsCrossover(); }
34
35FLASHMEM bool net::EthernetClass::interfaceStatus() const { return qn::Ethernet.interfaceStatus(); }
36
37FLASHMEM void net::EthernetClass::setDNSServerIP(const IPAddress &dnsServerIP) const {
38 return qn::Ethernet.setDnsServerIP(dnsServerIP);
39}
40
41FLASHMEM bool net::EthernetClass::begin(const IPAddress &ip, const IPAddress &mask, const IPAddress &gateway) {
42 return qn::Ethernet.begin(ip, mask, gateway);
43}
44
45FLASHMEM bool net::EthernetClass::begin() { return qn::Ethernet.begin(); }
46
47FLASHMEM bool net::EthernetClass::waitForLocalIP(uint32_t timeout) const {
48 return qn::Ethernet.waitForLocalIP(timeout);
49}
50
51FLASHMEM void net::EthernetClass::setHostname(const char *hostname) {
52 return qn::Ethernet.setHostname(hostname);
53}
54
55FLASHMEM void net::EthernetClass::setMACAddress(const uint8_t mac[6]) {
56 return qn::Ethernet.setMACAddress(mac);
57}
58
59FLASHMEM int net::EthernetClass::linkSpeed() const { return qn::Ethernet.linkSpeed(); }
60
61FLASHMEM bool net::MDNSClass::begin(const char *hostname) { return qn::MDNS.begin(hostname); }
62
63FLASHMEM bool net::MDNSClass::addService(const char *type, const char *protocol, uint16_t port) {
64 return qn::MDNS.addService(type, protocol, port);
65}
uint32_t
Definition flasher.cpp:195