Skip to content

Commit d408303

Browse files
committed
[board] Rename systemClock -> SystemClock
1 parent 592b8ad commit d408303

File tree

117 files changed

+235
-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.

117 files changed

+235
-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

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using namespace modm::platform;
1919
using namespace modm::literals;
2020

21-
using systemClock = SystemClock;
2221

2322
namespace led
2423
{
@@ -56,7 +55,7 @@ main()
5655
led::B::setOutput();
5756

5857
lcd::SPI::connect<lcd::Scl::BitBang, lcd::Mosi::BitBang>();
59-
lcd::SPI::initialize<systemClock, 2_MHz>();
58+
lcd::SPI::initialize<SystemClock, 2_MHz>();
6059

6160
display.initialize();
6261

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using namespace modm::platform;
1919
using namespace modm::literals;
2020

21-
using systemClock = SystemClock;
2221

2322
namespace led
2423
{
@@ -56,7 +55,7 @@ main()
5655
led::B::setOutput();
5756

5857
lcd::SPI::connect<lcd::Scl::BitBang, lcd::Mosi::BitBang>();
59-
lcd::SPI::initialize<systemClock, 2_MHz>();
58+
lcd::SPI::initialize<SystemClock, 2_MHz>();
6059

6160
display.initialize();
6261

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
using namespace modm::platform;
3030
using namespace modm::literals;
3131

32-
using systemClock = SystemClock;
3332

3433
namespace led
3534
{
@@ -212,7 +211,7 @@ main()
212211
led::B::setOutput();
213212

214213
lcd::SPI::connect<lcd::Sck::BitBang, lcd::Mosi::BitBang>();
215-
lcd::SPI::initialize<systemClock, 2_MHz>();
214+
lcd::SPI::initialize<SystemClock, 2_MHz>();
216215

217216
display.initialize();
218217

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

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

22-
using systemClock = SystemClock;
2322

2423
// LCD Backlight
2524
namespace led
@@ -58,7 +57,7 @@ main()
5857
led::B::setOutput();
5958

6059
SPI::connect< lcd::Scl::BitBang, lcd::Mosi::BitBang, lcd::Miso::BitBang >();
61-
SPI::initialize<systemClock, 2_MHz>();
60+
SPI::initialize<SystemClock, 2_MHz>();
6261

6362
display.initialize();
6463

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
using namespace modm::platform;
2020
using namespace modm::literals;
21-
using systemClock = SystemClock;
2221

2322
namespace touch
2423
{
@@ -64,7 +63,7 @@ int
6463
main()
6564
{
6665
Uart0::connect<GpioOutputD1::Txd, GpioInputD0::Rxd>();
67-
Uart0::initialize<systemClock, 115200_Bd>();
66+
Uart0::initialize<SystemClock, 115200_Bd>();
6867

6968
// Enable interrupts, this is needed for every buffered UART
7069
enableInterrupts();
@@ -84,7 +83,7 @@ main()
8483
led::B::setOutput();
8584

8685
lcd::SPI::connect<lcd::Scl::BitBang, lcd::Mosi::BitBang>();
87-
lcd::SPI::initialize<systemClock, 2_MHz>();
86+
lcd::SPI::initialize<SystemClock, 2_MHz>();
8887

8988
display.initialize();
9089

@@ -97,7 +96,7 @@ main()
9796

9897
display.update();
9998

100-
Adc::initialize<systemClock, 115_kHz>();
99+
Adc::initialize<SystemClock, 115_kHz>();
101100
Adc::setReference(Adc::Reference::Internal2V56);
102101

103102
touch::Bottom::setInput();

examples/avr/display/dogm132/main.cpp

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

1818
using namespace modm::platform;
1919
using namespace modm::literals;
20-
using systemClock = SystemClock;
2120

2221
typedef GpioOutputD2 Cs;
2322
typedef GpioOutputB6 Mosi;
@@ -41,7 +40,7 @@ main()
4140
Backlight::set();
4241

4342
SPI::connect<Sck::BitBang, Mosi::BitBang>();
44-
SPI::initialize<systemClock, 1_MHz>();
43+
SPI::initialize<SystemClock, 1_MHz>();
4544

4645
display.initialize();
4746
display.setFont(modm::font::Assertion);

examples/avr/display/dogm163/main.cpp

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

1818
using namespace modm::platform;
1919
using namespace modm::literals;
20-
using systemClock = SystemClock;
2120

2221
// Graphic LCD
2322
namespace lcd
@@ -38,7 +37,7 @@ int
3837
main()
3938
{
4039
SPI::connect<lcd::Scl::BitBang, lcd::Mosi::BitBang, lcd::Miso::BitBang>();
41-
SPI::initialize<systemClock, 1_MHz>();
40+
SPI::initialize<SystemClock, 1_MHz>();
4241
lcd::Cs::setOutput();
4342
lcd::Rs::setOutput();
4443

examples/avr/display/siemens_s65/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using namespace modm::platform;
1919
using namespace modm::literals;
2020

21-
using systemClock = SystemClock;
2221

2322
typedef GpioOutputA0 Mosi;
2423
typedef GpioOutputA1 Sck;
@@ -35,7 +34,7 @@ int
3534
main()
3635
{
3736
SPI::connect<Sck::BitBang, Mosi::BitBang>();
38-
SPI::initialize<systemClock, 1_MHz>();
37+
SPI::initialize<SystemClock, 1_MHz>();
3938

4039
Backlight::setOutput();
4140
Backlight::set();

examples/avr/logger/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
// Create a new UART object and configure it to a baudrate of 115200
2221
modm::IODeviceWrapper< Uart0, modm::IOBuffer::BlockIfFull > loggerDevice;
@@ -35,7 +34,7 @@ int
3534
main()
3635
{
3736
Uart0::connect<GpioD1::Txd, GpioD0::Rxd>();
38-
Uart0::initialize<systemClock, 115200_Bd>();
37+
Uart0::initialize<SystemClock, 115200_Bd>();
3938

4039
// Enable interrupts, this is needed for every buffered UART
4140
enableInterrupts();

examples/avr/pwm/pca9685/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515

1616
using namespace modm::platform;
1717
using namespace modm::literals;
18-
using systemClock = SystemClock;
1918

2019
int
2120
main()
2221
{
2322
// Set-up the I2C device as master and configure it to a baudrate of 100.000
24-
I2cMaster::initialize<systemClock, 100_kHz>();
23+
I2cMaster::initialize<SystemClock, 100_kHz>();
2524

2625
// Enable interrupts
2726
enableInterrupts();

examples/avr/sab/slave/main.cpp

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

2323
using namespace modm::platform;
2424
using namespace modm::literals;
25-
using systemClock = SystemClock;
2625

2726
// ----------------------------------------------------------------------------
2827
// wrapper class for the A/D converter
@@ -32,7 +31,7 @@ class AnalogDigital : public modm::sab::Callable
3231
AnalogDigital()
3332
{
3433
// initialize the analog to digital converter
35-
Adc::initialize<systemClock, 115_kHz>();
34+
Adc::initialize<SystemClock, 115_kHz>();
3635
Adc::setReference(Adc::Reference::InternalVcc);
3736
}
3837

examples/avr/uart/basic/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515

1616
using namespace modm::literals;
1717
using namespace modm::platform;
18-
using systemClock = SystemClock;
1918

2019
int
2120
main()
2221
{
2322
Uart0::connect<GpioOutputD1::Txd, GpioInputD0::Rxd>();
24-
Uart0::initialize<systemClock, 115200_Bd>();
23+
Uart0::initialize<SystemClock, 115200_Bd>();
2524

2625
// Enable interrupts, this is needed for every buffered UART
2726
enableInterrupts();

0 commit comments

Comments
 (0)