Skip to content

Commit 67e4d23

Browse files
committed
Turn function names from snake_case to camel_case.
1 parent 8a9b004 commit 67e4d23

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

Diff for: src/T1SMacSettings.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class T1SMacSettings : public arduino::Printable
4343

4444
virtual size_t printTo(Print & p) const override;
4545

46-
bool mac_promiscuous_mode() const { return _mac_promiscuous_mode; }
47-
bool mac_tx_cut_through() const { return _mac_tx_cut_through; }
48-
bool mac_rx_cut_through() const { return _mac_rx_cut_through; }
46+
bool isMacPromiscuousModeEnabled() const { return _mac_promiscuous_mode; }
47+
bool isMacTxCutThroughEnabled() const { return _mac_tx_cut_through; }
48+
bool isMacRxCutThroughEnabled() const { return _mac_rx_cut_through; }
4949
};

Diff for: src/T1SPlcaSettings.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class T1SPlcaSettings : public arduino::Printable
4949
virtual size_t printTo(Print & p) const override;
5050

5151

52-
uint8_t node_id() const { return _node_id; }
53-
uint8_t node_count() const { return _node_count; }
54-
uint8_t burst_count() const { return _burst_count; }
55-
uint8_t burst_timer() const { return _burst_timer; }
52+
uint8_t nodeId() const { return _node_id; }
53+
uint8_t nodeCount() const { return _node_count; }
54+
uint8_t burstCount() const { return _burst_count; }
55+
uint8_t burstTimer() const { return _burst_timer; }
5656
};

Diff for: src/microchip/TC6_Arduino_10BASE_T1S.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ bool TC6_Arduino_10BASE_T1S::begin(IPAddress const ip_addr,
156156
, &_lw
157157
, _lw.ip.mac
158158
, true /* enable_plca */
159-
, t1s_plca_settings.node_id()
160-
, t1s_plca_settings.node_count()
161-
, t1s_plca_settings.burst_count()
162-
, t1s_plca_settings.burst_timer()
163-
, t1s_mac_settings.mac_promiscuous_mode()
164-
, t1s_mac_settings.mac_tx_cut_through()
165-
, t1s_mac_settings.mac_rx_cut_through()))
159+
, t1s_plca_settings.nodeId()
160+
, t1s_plca_settings.nodeCount()
161+
, t1s_plca_settings.burstCount()
162+
, t1s_plca_settings.burstTimer()
163+
, t1s_mac_settings.isMacPromiscuousModeEnabled()
164+
, t1s_mac_settings.isMacTxCutThroughEnabled()
165+
, t1s_mac_settings.isMacRxCutThroughEnabled()))
166166
return false;
167167

168168
/* Complete initialization. */
@@ -206,11 +206,11 @@ void TC6_Arduino_10BASE_T1S::service()
206206
{
207207
sys_check_timeouts(); /* LWIP timers - ARP, DHCP, TCP, etc. */
208208

209-
if (_tc6_io->is_interrupt_active())
209+
if (_tc6_io->isInterruptActive())
210210
{
211211
if (TC6_Service(_lw.tc.tc6, false))
212212
{
213-
_tc6_io->release_interrupt();
213+
_tc6_io->releaseInterrupt();
214214
}
215215
} else if (_lw.tc.tc6NeedService)
216216
{
@@ -229,7 +229,7 @@ bool TC6_Arduino_10BASE_T1S::getPlcaStatus(TC6LwIP_On_PlcaStatus on_plca_status)
229229

230230
bool TC6_Arduino_10BASE_T1S::enablePlca()
231231
{
232-
return TC6Regs_SetPlca(_lw.tc.tc6, true, _t1s_plca_settings.node_id(), _t1s_plca_settings.node_count());
232+
return TC6Regs_SetPlca(_lw.tc.tc6, true, _t1s_plca_settings.nodeId(), _t1s_plca_settings.nodeCount());
233233
}
234234

235235
bool TC6_Arduino_10BASE_T1S::sendWouldBlock()
@@ -389,7 +389,7 @@ bool TC6_CB_OnSpiTransaction(TC6_t *pInst, uint8_t *pTx, uint8_t *pRx, uint16_t
389389
if (lw == nullptr) {
390390
return false;
391391
}
392-
bool const success = lw->io->spi_transaction(pTx, pRx, len);
392+
bool const success = lw->io->spiTransaction(pTx, pRx, len);
393393
TC6_SpiBufferDone(pInst /* tc6instance */, success /* success */);
394394
return success;
395395
}

Diff for: src/microchip/TC6_Io.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ void TC6_Io::onInterrupt()
7373
_int_in++;
7474
}
7575

76-
bool TC6_Io::is_interrupt_active()
76+
bool TC6_Io::isInterruptActive()
7777
{
7878
_int_reported = _int_in;
7979
return (_int_reported != _int_out);
8080
}
8181

82-
void TC6_Io::release_interrupt()
82+
void TC6_Io::releaseInterrupt()
8383
{
8484
if (digitalRead(_irq_pin) == HIGH)
8585
_int_out = _int_reported;
8686
}
8787

88-
bool TC6_Io::spi_transaction(uint8_t const *pTx, uint8_t *pRx, uint16_t const len)
88+
bool TC6_Io::spiTransaction(uint8_t const *pTx, uint8_t *pRx, uint16_t const len)
8989
{
9090
digitalWrite(_cs_pin, LOW);
9191
_spi.beginTransaction(LAN865x_SPI_SETTING);

Diff for: src/microchip/TC6_Io.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class TC6_Io
4444

4545
void onInterrupt();
4646

47-
bool is_interrupt_active();
47+
bool isInterruptActive();
4848

49-
void release_interrupt();
49+
void releaseInterrupt();
5050

51-
bool spi_transaction(uint8_t const *pTx, uint8_t *pRx, uint16_t const len);
51+
bool spiTransaction(uint8_t const *pTx, uint8_t *pRx, uint16_t const len);
5252

5353

5454
private:

0 commit comments

Comments
 (0)