Skip to content

Commit f8ef8ba

Browse files
committed
[board] Rename systemClock -> SystemClock
1 parent 4bd2e47 commit f8ef8ba

File tree

118 files changed

+239
-258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+239
-258
lines changed

docs/src/guide/cookbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ using Uart = Uart0;
3535
// connect both pins with a pullup on the Rx
3636
Uart::connect<GpioOutputD1::Tx, GpioInputD0::Rx>(Gpio::InputType::PullUp);
3737
// initialize to 115.2kBaud from the BSP clock configuration
38-
Uart::initialize<Board::systemClock, 115200_Bd>();
38+
Uart::initialize<Board::SystemClock, 115200_Bd>();
3939
4040
Uart::write('H'); // Ohai there
4141
Uart::write('i');
@@ -59,7 +59,7 @@ modm::IODeviceWrapper<Uart> device;
5959
modm::IOStream stream(device);
6060

6161
Uart::connect<GpioOutputD1::Tx>();
62-
Uart::initialize<Board::systemClock, 115200_Bd>();
62+
Uart::initialize<Board::SystemClock, 115200_Bd>();
6363

6464
// similar to std::ostream but without formatting features
6565
stream << 42 << " is a nice number!" << modm::endl;

docs/src/how-modm-works.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ for keeping code size in check on very resource constrained targets, like the AV
259259

260260
```cpp
261261
Uart4::connect<GpioA0::Tx, GpioA1::Rx>(Gpio::InputType::PullUp); // pull-up in RX pin
262-
Uart4::initialize<Board::systemClock, 115'200_Bd>(); // Within 1% default tolerance
263-
Uart4::initialize<Board::systemClock, 115'200_Bd> Tolerance::Exact>();
262+
Uart4::initialize<Board::SystemClock, 115'200_Bd>(); // Within 1% default tolerance
263+
Uart4::initialize<Board::SystemClock, 115'200_Bd> Tolerance::Exact>();
264264
// error: The closest available baudrate exceeds the tolerance of the requested baudrate!
265265
```
266266

@@ -320,7 +320,7 @@ using GpioExpander = modm::Mcp23x17< Transport >;
320320
GpioExpander expander;
321321
// Connect and initialize the peripherals
322322
SpiMaster1::connect<GpioA0::Sck, GpioA1::Mosi, GpioA2::Miso>();
323-
SpiMaster1::initialize<Board::systemClock, 1MHz>();
323+
SpiMaster1::initialize<Board::SystemClock, 1MHz>();
324324
expander.initialize();
325325
// Bind the expander pins to a simpler name
326326
using Pin0 = GpioExpander::P0< expander >;

examples/arduino_uno/basic/analog_read_serial/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ main()
2424
// Initialize the analog to digital converter
2525
// With the AVR running at 16Mhz and a prescaler of 128 the
2626
// ADC is running at 125kHz.
27-
Adc::initialize<Board::systemClock, 125_kHz>();
27+
Adc::initialize<Board::SystemClock, 125_kHz>();
2828
Adc::setReference(Adc::Reference::InternalVcc);
2929

3030
while (1)

examples/arduino_uno/basic/read_analog_voltage/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ main()
2424
// Initialize the analog to digital converter
2525
// With the AVR running at 16Mhz and a prescaler of 128 the
2626
// ADC is running at 125kHz.
27-
Adc::initialize<Board::systemClock, 125_kHz>();
27+
Adc::initialize<Board::SystemClock, 125_kHz>();
2828
Adc::setReference(Adc::Reference::InternalVcc);
2929

3030
while (1)

examples/avr/1-wire/ds18b20/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ using OneWireMaster = BitBangOneWireMaster<OneWirePin>;
2424
int
2525
main()
2626
{
27-
using systemClock = SystemClock;
2827
Uart0::connect<GpioD1::Txd, GpioD0::Rxd>();
29-
Uart0::initialize<systemClock, 9600_Bd>();
28+
Uart0::initialize<SystemClock, 9600_Bd>();
3029

3130
// Enable interrupts, this is needed for every buffered UART
3231
enableInterrupts();

examples/avr/adc/basic/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616

1717
using namespace modm::platform;
1818
using namespace modm::literals;
19-
using systemClock = SystemClock;
2019

2120
int
2221
main()
2322
{
2423
// Create a new UART object and configure it to a baudrate of 115200
2524
Uart0::connect<GpioOutputD1::Txd, GpioInputD0::Rxd>();
26-
Uart0::initialize<systemClock, 115200_Bd>();
25+
Uart0::initialize<SystemClock, 115200_Bd>();
2726

2827
// Enable interrupts, this is needed for every buffered UART
2928
enableInterrupts();
@@ -37,7 +36,7 @@ main()
3736
// Initialize the analog to digital converter
3837
// With the AVR running at 14.7456Mhz and a prescaler of 128 the
3938
// ADC is running at 115kHz.
40-
Adc::initialize<systemClock, 115_kHz>();
39+
Adc::initialize<SystemClock, 115_kHz>();
4140
Adc::setReference(Adc::Reference::InternalVcc);
4241

4342
// read the value of channel 0 (=> ADC0 => PA0) and wait until

examples/avr/adc/oversample/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ using namespace modm::platform;
1717
using namespace modm::literals;
1818

1919
// Create a new UART object
20-
using systemClock = SystemClock;
2120

2221
#include <modm/io/iostream.hpp>
2322
// Create a IOStream for complex formatting tasks
@@ -39,12 +38,12 @@ int
3938
main()
4039
{
4140
Uart0::connect<GpioOutputD1::Txd, GpioInputD0::Rxd>();
42-
Uart0::initialize<systemClock, 115200_Bd>();
41+
Uart0::initialize<SystemClock, 115200_Bd>();
4342

4443
// Initialize the analog to digital converter
4544
// With the AVR running at 14.7456Mhz and a prescaler of 128 the
4645
// ADC is running at 115kHz.
47-
Adc::initialize<systemClock, 115_kHz>();
46+
Adc::initialize<SystemClock, 115_kHz>();
4847
Adc::setReference(Adc::Reference::InternalVcc);
4948
Adc::enableInterrupt();
5049

examples/avr/can/mcp2515/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
using namespace modm::platform;
1818
using namespace modm::literals;
19-
using systemClock = SystemClock;
2019

2120
typedef GpioOutputB4 Cs;
2221
typedef GpioInputB2 Int;
@@ -51,7 +50,7 @@ main()
5150
// Initialize SPI interface and the other pins
5251
// needed by the MCP2515
5352
SPI::connect<Sclk::Sck, Mosi::Mosi, Miso::Miso>();
54-
SPI::initialize<systemClock, 921.6_kHz>();
53+
SPI::initialize<SystemClock, 921.6_kHz>();
5554
Cs::setOutput();
5655
Int::setInput(Gpio::InputType::PullUp);
5756

examples/avr/can/mcp2515_uart/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
using namespace modm::platform;
2121
using namespace modm::literals;
22-
using systemClock = SystemClock;
2322

2423
typedef GpioOutputB0 LedGreen;
2524
typedef GpioOutputB1 LedRed;
@@ -70,7 +69,7 @@ main()
7069
OCR2A = 230;
7170

7271
Uart0::connect<GpioD1::Txd, GpioD0::Rxd>();
73-
Uart0::initialize<systemClock, 115200_Bd>();
72+
Uart0::initialize<SystemClock, 115200_Bd>();
7473

7574
// Create a IOStream for complex formatting tasks
7675
modm::IODeviceWrapper< Uart0, modm::IOBuffer::BlockIfFull > device;
@@ -84,7 +83,7 @@ main()
8483
// Initialize SPI interface and the other pins
8584
// needed by the MCP2515
8685
SPI::connect<Sclk::BitBang, Mosi::BitBang, Miso::BitBang>();
87-
SPI::initialize<systemClock, 1_MHz>();
86+
SPI::initialize<SystemClock, 1_MHz>();
8887
Cs::setOutput();
8988
Int::setInput(Gpio::InputType::PullUp);
9089

examples/avr/display/dogm128/benchmark/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using namespace modm::platform;
2222
using namespace modm::literals;
2323

24-
using systemClock = SystemClock;
2524

2625
namespace led
2726
{
@@ -65,7 +64,7 @@ setup()
6564
led::B::setOutput();
6665

6766
lcd::SPI::connect<lcd::Sck::BitBang, lcd::Mosi::BitBang>();
68-
lcd::SPI::initialize<systemClock, 2_MHz>();
67+
lcd::SPI::initialize<SystemClock, 2_MHz>();
6968

7069
// timer initialization
7170
// compare-match-interrupt every 1 ms at 14.7456 MHz

0 commit comments

Comments
 (0)