-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathT1SMacSettings.h
49 lines (38 loc) · 1.64 KB
/
T1SMacSettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* This file is part of the Arduino_10BASE_T1S library.
*
* Copyright (c) 2024 Arduino SA
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
/**************************************************************************************
* INCLUDE
**************************************************************************************/
#include <stdint.h>
#include <Print.h>
#include <Printable.h>
/**************************************************************************************
* CLASS DECLARATION
**************************************************************************************/
class T1SMacSettings : public arduino::Printable
{
private:
bool const _mac_promiscuous_mode;
bool const _mac_tx_cut_through;
bool const _mac_rx_cut_through;
public:
static bool const DEFAULT_MAC_PROMISCUOUS_MODE = false;
static bool const DEFAULT_MAC_TX_CUT_THROUGH = false;
static bool const DEFAULT_MAC_RX_CUT_THROUGH = false;
T1SMacSettings() : T1SMacSettings(DEFAULT_MAC_PROMISCUOUS_MODE, DEFAULT_MAC_TX_CUT_THROUGH, DEFAULT_MAC_RX_CUT_THROUGH) { }
T1SMacSettings(bool const mac_promiscuous_mode,
bool const mac_tx_cut_through,
bool const mac_rx_cut_through);
virtual size_t printTo(Print & p) const override;
bool isMacPromiscuousModeEnabled() const { return _mac_promiscuous_mode; }
bool isMacTxCutThroughEnabled() const { return _mac_tx_cut_through; }
bool isMacRxCutThroughEnabled() const { return _mac_rx_cut_through; }
};