diff --git a/docs/src/guide/cookbook.md b/docs/src/guide/cookbook.md index 0545861729..67ca86d238 100644 --- a/docs/src/guide/cookbook.md +++ b/docs/src/guide/cookbook.md @@ -35,7 +35,7 @@ using Uart = Uart0; // connect both pins with a pullup on the Rx Uart::connect(Gpio::InputType::PullUp); // initialize to 115.2kBaud from the BSP clock configuration -Uart::initialize(); +Uart::initialize(); Uart::write('H'); // Ohai there Uart::write('i'); @@ -59,7 +59,7 @@ modm::IODeviceWrapper device; modm::IOStream stream(device); Uart::connect(); -Uart::initialize(); +Uart::initialize(); // similar to std::ostream but without formatting features stream << 42 << " is a nice number!" << modm::endl; diff --git a/docs/src/how-modm-works.md b/docs/src/how-modm-works.md index 54681d1b84..35a00d361c 100644 --- a/docs/src/how-modm-works.md +++ b/docs/src/how-modm-works.md @@ -259,8 +259,8 @@ for keeping code size in check on very resource constrained targets, like the AV ```cpp Uart4::connect(Gpio::InputType::PullUp); // pull-up in RX pin -Uart4::initialize(); // Within 1% default tolerance -Uart4::initialize Tolerance::Exact>(); +Uart4::initialize(); // Within 1% default tolerance +Uart4::initialize Tolerance::Exact>(); // error: The closest available baudrate exceeds the tolerance of the requested baudrate! ``` @@ -320,7 +320,7 @@ using GpioExpander = modm::Mcp23x17< Transport >; GpioExpander expander; // Connect and initialize the peripherals SpiMaster1::connect(); -SpiMaster1::initialize(); +SpiMaster1::initialize(); expander.initialize(); // Bind the expander pins to a simpler name using Pin0 = GpioExpander::P0< expander >; diff --git a/examples/arduino_uno/basic/analog_read_serial/main.cpp b/examples/arduino_uno/basic/analog_read_serial/main.cpp index 3c05391e9c..fb469919d6 100644 --- a/examples/arduino_uno/basic/analog_read_serial/main.cpp +++ b/examples/arduino_uno/basic/analog_read_serial/main.cpp @@ -24,7 +24,7 @@ main() // Initialize the analog to digital converter // With the AVR running at 16Mhz and a prescaler of 128 the // ADC is running at 125kHz. - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::InternalVcc); while (1) diff --git a/examples/arduino_uno/basic/read_analog_voltage/main.cpp b/examples/arduino_uno/basic/read_analog_voltage/main.cpp index fdb7e47971..abf720ca3a 100644 --- a/examples/arduino_uno/basic/read_analog_voltage/main.cpp +++ b/examples/arduino_uno/basic/read_analog_voltage/main.cpp @@ -24,7 +24,7 @@ main() // Initialize the analog to digital converter // With the AVR running at 16Mhz and a prescaler of 128 the // ADC is running at 125kHz. - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::InternalVcc); while (1) diff --git a/examples/avr/1-wire/ds18b20/main.cpp b/examples/avr/1-wire/ds18b20/main.cpp index d461a54cf5..1149eef94a 100644 --- a/examples/avr/1-wire/ds18b20/main.cpp +++ b/examples/avr/1-wire/ds18b20/main.cpp @@ -24,9 +24,8 @@ using OneWireMaster = BitBangOneWireMaster; int main() { - using systemClock = SystemClock; Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); diff --git a/examples/avr/adc/basic/main.cpp b/examples/avr/adc/basic/main.cpp index 0a6c7626e8..436182da5f 100644 --- a/examples/avr/adc/basic/main.cpp +++ b/examples/avr/adc/basic/main.cpp @@ -16,14 +16,13 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; int main() { // Create a new UART object and configure it to a baudrate of 115200 Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); @@ -37,7 +36,7 @@ main() // Initialize the analog to digital converter // With the AVR running at 14.7456Mhz and a prescaler of 128 the // ADC is running at 115kHz. - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::InternalVcc); // read the value of channel 0 (=> ADC0 => PA0) and wait until diff --git a/examples/avr/adc/oversample/main.cpp b/examples/avr/adc/oversample/main.cpp index bd78e10ad4..d45b9f0ad2 100644 --- a/examples/avr/adc/oversample/main.cpp +++ b/examples/avr/adc/oversample/main.cpp @@ -17,7 +17,6 @@ using namespace modm::platform; using namespace modm::literals; // Create a new UART object -using systemClock = SystemClock; #include // Create a IOStream for complex formatting tasks @@ -39,12 +38,12 @@ int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Initialize the analog to digital converter // With the AVR running at 14.7456Mhz and a prescaler of 128 the // ADC is running at 115kHz. - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::InternalVcc); Adc::enableInterrupt(); diff --git a/examples/avr/can/mcp2515/main.cpp b/examples/avr/can/mcp2515/main.cpp index fbcc6cbf41..bb6e865db0 100644 --- a/examples/avr/can/mcp2515/main.cpp +++ b/examples/avr/can/mcp2515/main.cpp @@ -16,7 +16,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; typedef GpioOutputB4 Cs; typedef GpioInputB2 Int; @@ -51,7 +50,7 @@ main() // Initialize SPI interface and the other pins // needed by the MCP2515 SPI::connect(); - SPI::initialize(); + SPI::initialize(); Cs::setOutput(); Int::setInput(Gpio::InputType::PullUp); diff --git a/examples/avr/can/mcp2515_uart/main.cpp b/examples/avr/can/mcp2515_uart/main.cpp index bf02649249..12b5e659c5 100644 --- a/examples/avr/can/mcp2515_uart/main.cpp +++ b/examples/avr/can/mcp2515_uart/main.cpp @@ -19,7 +19,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; typedef GpioOutputB0 LedGreen; typedef GpioOutputB1 LedRed; @@ -70,7 +69,7 @@ main() OCR2A = 230; Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Create a IOStream for complex formatting tasks modm::IODeviceWrapper< Uart0, modm::IOBuffer::BlockIfFull > device; @@ -84,7 +83,7 @@ main() // Initialize SPI interface and the other pins // needed by the MCP2515 SPI::connect(); - SPI::initialize(); + SPI::initialize(); Cs::setOutput(); Int::setInput(Gpio::InputType::PullUp); diff --git a/examples/avr/display/dogm128/benchmark/main.cpp b/examples/avr/display/dogm128/benchmark/main.cpp index e48cba41a7..2eebec28ff 100644 --- a/examples/avr/display/dogm128/benchmark/main.cpp +++ b/examples/avr/display/dogm128/benchmark/main.cpp @@ -21,7 +21,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; namespace led { @@ -65,7 +64,7 @@ setup() led::B::setOutput(); lcd::SPI::connect(); - lcd::SPI::initialize(); + lcd::SPI::initialize(); // timer initialization // compare-match-interrupt every 1 ms at 14.7456 MHz diff --git a/examples/avr/display/dogm128/caged_ball/main.cpp b/examples/avr/display/dogm128/caged_ball/main.cpp index 40341ddecf..bffd133db2 100644 --- a/examples/avr/display/dogm128/caged_ball/main.cpp +++ b/examples/avr/display/dogm128/caged_ball/main.cpp @@ -18,7 +18,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; namespace led { @@ -56,7 +55,7 @@ main() led::B::setOutput(); lcd::SPI::connect(); - lcd::SPI::initialize(); + lcd::SPI::initialize(); display.initialize(); diff --git a/examples/avr/display/dogm128/draw/main.cpp b/examples/avr/display/dogm128/draw/main.cpp index fa749d388a..9962ad292c 100644 --- a/examples/avr/display/dogm128/draw/main.cpp +++ b/examples/avr/display/dogm128/draw/main.cpp @@ -18,7 +18,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; namespace led { @@ -56,7 +55,7 @@ main() led::B::setOutput(); lcd::SPI::connect(); - lcd::SPI::initialize(); + lcd::SPI::initialize(); display.initialize(); diff --git a/examples/avr/display/dogm128/image/main.cpp b/examples/avr/display/dogm128/image/main.cpp index 72437e075c..d5dd5202fb 100644 --- a/examples/avr/display/dogm128/image/main.cpp +++ b/examples/avr/display/dogm128/image/main.cpp @@ -29,7 +29,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; namespace led { @@ -212,7 +211,7 @@ main() led::B::setOutput(); lcd::SPI::connect(); - lcd::SPI::initialize(); + lcd::SPI::initialize(); display.initialize(); diff --git a/examples/avr/display/dogm128/text/main.cpp b/examples/avr/display/dogm128/text/main.cpp index 9d5af4ce24..d4c4a4a741 100644 --- a/examples/avr/display/dogm128/text/main.cpp +++ b/examples/avr/display/dogm128/text/main.cpp @@ -19,7 +19,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // LCD Backlight namespace led @@ -58,7 +57,7 @@ main() led::B::setOutput(); SPI::connect< lcd::Scl::BitBang, lcd::Mosi::BitBang, lcd::Miso::BitBang >(); - SPI::initialize(); + SPI::initialize(); display.initialize(); diff --git a/examples/avr/display/dogm128/touch/main.cpp b/examples/avr/display/dogm128/touch/main.cpp index c10ced0ce7..31d28e2c62 100644 --- a/examples/avr/display/dogm128/touch/main.cpp +++ b/examples/avr/display/dogm128/touch/main.cpp @@ -18,7 +18,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; namespace touch { @@ -64,7 +63,7 @@ int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); @@ -84,7 +83,7 @@ main() led::B::setOutput(); lcd::SPI::connect(); - lcd::SPI::initialize(); + lcd::SPI::initialize(); display.initialize(); @@ -97,7 +96,7 @@ main() display.update(); - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::Internal2V56); touch::Bottom::setInput(); diff --git a/examples/avr/display/dogm132/main.cpp b/examples/avr/display/dogm132/main.cpp index 348b561466..8de0d79804 100644 --- a/examples/avr/display/dogm132/main.cpp +++ b/examples/avr/display/dogm132/main.cpp @@ -17,7 +17,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; typedef GpioOutputD2 Cs; typedef GpioOutputB6 Mosi; @@ -41,7 +40,7 @@ main() Backlight::set(); SPI::connect(); - SPI::initialize(); + SPI::initialize(); display.initialize(); display.setFont(modm::font::Assertion); diff --git a/examples/avr/display/dogm163/main.cpp b/examples/avr/display/dogm163/main.cpp index 5d680c2df9..7526b10e6d 100644 --- a/examples/avr/display/dogm163/main.cpp +++ b/examples/avr/display/dogm163/main.cpp @@ -17,7 +17,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // Graphic LCD namespace lcd @@ -38,7 +37,7 @@ int main() { SPI::connect(); - SPI::initialize(); + SPI::initialize(); lcd::Cs::setOutput(); lcd::Rs::setOutput(); diff --git a/examples/avr/display/siemens_s65/main.cpp b/examples/avr/display/siemens_s65/main.cpp index 71ddf203b8..f6ccc97053 100644 --- a/examples/avr/display/siemens_s65/main.cpp +++ b/examples/avr/display/siemens_s65/main.cpp @@ -18,7 +18,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; typedef GpioOutputA0 Mosi; typedef GpioOutputA1 Sck; @@ -35,7 +34,7 @@ int main() { SPI::connect(); - SPI::initialize(); + SPI::initialize(); Backlight::setOutput(); Backlight::set(); diff --git a/examples/avr/logger/main.cpp b/examples/avr/logger/main.cpp index 377fa7a104..d4241ab746 100644 --- a/examples/avr/logger/main.cpp +++ b/examples/avr/logger/main.cpp @@ -16,7 +16,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // Create a new UART object and configure it to a baudrate of 115200 modm::IODeviceWrapper< Uart0, modm::IOBuffer::BlockIfFull > loggerDevice; @@ -35,7 +34,7 @@ int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); diff --git a/examples/avr/pwm/pca9685/main.cpp b/examples/avr/pwm/pca9685/main.cpp index 9e73fed08a..8a4a1e1e95 100644 --- a/examples/avr/pwm/pca9685/main.cpp +++ b/examples/avr/pwm/pca9685/main.cpp @@ -15,13 +15,12 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; int main() { // Set-up the I2C device as master and configure it to a baudrate of 100.000 - I2cMaster::initialize(); + I2cMaster::initialize(); // Enable interrupts enableInterrupts(); diff --git a/examples/avr/sab/slave/main.cpp b/examples/avr/sab/slave/main.cpp index 7adc0bc93f..f710ebc2d4 100644 --- a/examples/avr/sab/slave/main.cpp +++ b/examples/avr/sab/slave/main.cpp @@ -22,7 +22,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // ---------------------------------------------------------------------------- // wrapper class for the A/D converter @@ -32,7 +31,7 @@ class AnalogDigital : public modm::sab::Callable AnalogDigital() { // initialize the analog to digital converter - Adc::initialize(); + Adc::initialize(); Adc::setReference(Adc::Reference::InternalVcc); } diff --git a/examples/avr/uart/basic/main.cpp b/examples/avr/uart/basic/main.cpp index 28fede3f32..ea2c6305aa 100644 --- a/examples/avr/uart/basic/main.cpp +++ b/examples/avr/uart/basic/main.cpp @@ -15,13 +15,12 @@ using namespace modm::literals; using namespace modm::platform; -using systemClock = SystemClock; int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); diff --git a/examples/avr/uart/extended/main.cpp b/examples/avr/uart/extended/main.cpp index f4402ca226..7d16feb708 100644 --- a/examples/avr/uart/extended/main.cpp +++ b/examples/avr/uart/extended/main.cpp @@ -16,13 +16,12 @@ using namespace modm::literals; using namespace modm::platform; -using systemClock = SystemClock; int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Enable interrupts, this is needed for every buffered UART enableInterrupts(); diff --git a/examples/avr/xpcc/receiver/main.cpp b/examples/avr/xpcc/receiver/main.cpp index fee2888f87..509e4312b3 100644 --- a/examples/avr/xpcc/receiver/main.cpp +++ b/examples/avr/xpcc/receiver/main.cpp @@ -20,7 +20,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // set new log level #undef MODM_LOG_LEVEL @@ -87,12 +86,12 @@ int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Initialize SPI interface and the other pins // needed by the MCP2515 SPI::connect(); - SPI::initialize(); + SPI::initialize(); Cs::setOutput(); Int::setInput(Gpio::InputType::PullUp); diff --git a/examples/avr/xpcc/sender/main.cpp b/examples/avr/xpcc/sender/main.cpp index c5f007e027..3bdb0f4951 100644 --- a/examples/avr/xpcc/sender/main.cpp +++ b/examples/avr/xpcc/sender/main.cpp @@ -20,7 +20,6 @@ using namespace modm::platform; using namespace modm::literals; -using systemClock = SystemClock; // set new log level #undef MODM_LOG_LEVEL @@ -87,12 +86,12 @@ int main() { Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // Initialize SPI interface and the other pins // needed by the MCP2515 SPI::connect(); - SPI::initialize(); + SPI::initialize(); Cs::setOutput(); Int::setInput(Gpio::InputType::PullUp); diff --git a/examples/generic/i2c_multiplex/i2c_multiplex.cpp b/examples/generic/i2c_multiplex/i2c_multiplex.cpp index a52f7c2552..f1368326f4 100644 --- a/examples/generic/i2c_multiplex/i2c_multiplex.cpp +++ b/examples/generic/i2c_multiplex/i2c_multiplex.cpp @@ -109,11 +109,11 @@ main() #ifndef MODM_BOARD_HAS_LOGGER LoggerUsart::connect(); - LoggerUsart::initialize(12); + LoggerUsart::initialize(12); #endif modm::platform::I2cMaster1::connect(); - modm::platform::I2cMaster1::initialize(); + modm::platform::I2cMaster1::initialize(); constexpr uint32_t rate = 1; // Hz constexpr float interval = 1000.0 / rate; // msec diff --git a/examples/generic/ros/can_bridge/main.cpp b/examples/generic/ros/can_bridge/main.cpp index 009d8ca7b0..2ec41ee605 100644 --- a/examples/generic/ros/can_bridge/main.cpp +++ b/examples/generic/ros/can_bridge/main.cpp @@ -96,7 +96,7 @@ main() // Reinit onboard UART to 1 Mbps // Do not use it for logging because this will destroy ROS serial messages. - RosSerialUart::initialize(12); + RosSerialUart::initialize(12); CanFilter::setStartFilterBankForCan2(14); @@ -106,7 +106,7 @@ main() } else { Can::connect(Gpio::InputType::PullUp); } - Can::initialize(9); + Can::initialize(9); // Receive every message CanFilter::setFilter(0, CanFilter::FIFO0, diff --git a/examples/generic/ros/environment/main.cpp b/examples/generic/ros/environment/main.cpp index 8240fb6afe..56d21ab8a0 100644 --- a/examples/generic/ros/environment/main.cpp +++ b/examples/generic/ros/environment/main.cpp @@ -63,10 +63,10 @@ main() // Reinit onboard UART to 1 Mbps // Do not use it for logging because this will destroy ROS serial messages. - Board::stlink::Uart::initialize(12); + Board::stlink::Uart::initialize(12); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); Board::LedGreen::set(); diff --git a/examples/generic/ros/sub_pub/main.cpp b/examples/generic/ros/sub_pub/main.cpp index f0ece53b9c..c908e41128 100644 --- a/examples/generic/ros/sub_pub/main.cpp +++ b/examples/generic/ros/sub_pub/main.cpp @@ -75,7 +75,7 @@ main() // Reinit onboard UART to 1 Mbps // Do not use it for logging because this will destroy ROS serial messages. - Board::stlink::Uart::initialize(12); + Board::stlink::Uart::initialize(12); Board::LedGreen::set(); diff --git a/examples/generic/rtc_ds1302/rtc_ds1302.cpp b/examples/generic/rtc_ds1302/rtc_ds1302.cpp index 9eeafef8f6..0cc5cf7cd7 100644 --- a/examples/generic/rtc_ds1302/rtc_ds1302.cpp +++ b/examples/generic/rtc_ds1302/rtc_ds1302.cpp @@ -84,7 +84,7 @@ main() // Periodically report progress modm::PeriodicTimer blinkTimer(250); - MODM_LOG_DEBUG.printf("CPU frequency is %ld Hz\n", Board::systemClock::Frequency); + MODM_LOG_DEBUG.printf("CPU frequency is %ld Hz\n", Board::SystemClock::Frequency); uint8_t cc[] = "|/-\\"; uint8_t cycle(0); diff --git a/examples/nucleo_f401re/distance_vl53l0/main.cpp b/examples/nucleo_f401re/distance_vl53l0/main.cpp index 62f44e740e..a2afb56451 100644 --- a/examples/nucleo_f401re/distance_vl53l0/main.cpp +++ b/examples/nucleo_f401re/distance_vl53l0/main.cpp @@ -160,7 +160,7 @@ main() LedD13::setOutput(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); MODM_LOG_INFO << "\n\nWelcome to VL53L0X demo!\n\n"; diff --git a/examples/nucleo_f429zi/pat9125el/main.cpp b/examples/nucleo_f429zi/pat9125el/main.cpp index fc366b2568..72be5a7e45 100644 --- a/examples/nucleo_f429zi/pat9125el/main.cpp +++ b/examples/nucleo_f429zi/pat9125el/main.cpp @@ -86,7 +86,7 @@ main() MODM_LOG_INFO << "\n\nPAT9125EL I2C example\n\n"; I2c::connect(); - I2c::initialize(); + I2c::initialize(); while (1) { thread.update(); diff --git a/examples/nucleo_f429zi/spi_flash/main.cpp b/examples/nucleo_f429zi/spi_flash/main.cpp index 83de743a7b..2237ae4500 100644 --- a/examples/nucleo_f429zi/spi_flash/main.cpp +++ b/examples/nucleo_f429zi/spi_flash/main.cpp @@ -102,7 +102,7 @@ main() // initialize board and SPI Board::initialize(); SpiMaster::connect(); - SpiMaster::initialize(); + SpiMaster::initialize(); std::memset(bufferA, 0xAA, BlockSize); std::memset(bufferB, 0x55, BlockSize); diff --git a/examples/nucleo_l432kc/gyroscope/main.cpp b/examples/nucleo_l432kc/gyroscope/main.cpp index 6ee2a51f10..d4f7792a9f 100644 --- a/examples/nucleo_l432kc/gyroscope/main.cpp +++ b/examples/nucleo_l432kc/gyroscope/main.cpp @@ -96,7 +96,7 @@ main() Board::initialize(); UartSpi::Master::connect(); - UartSpi::Master::initialize(); + UartSpi::Master::initialize(); while (1) { reader.update(); diff --git a/examples/nucleo_l432kc/uart_spi/main.cpp b/examples/nucleo_l432kc/uart_spi/main.cpp index 44f903a975..681bfdb3c0 100644 --- a/examples/nucleo_l432kc/uart_spi/main.cpp +++ b/examples/nucleo_l432kc/uart_spi/main.cpp @@ -22,7 +22,7 @@ main() // Enable Uart SPI 1 UartSpiMaster1::connect(); - UartSpiMaster1::initialize(); + UartSpiMaster1::initialize(); while (1) { diff --git a/examples/nucleo_l476rg/i2c_test/main.cpp b/examples/nucleo_l476rg/i2c_test/main.cpp index 2912f36888..af784bd27f 100644 --- a/examples/nucleo_l476rg/i2c_test/main.cpp +++ b/examples/nucleo_l476rg/i2c_test/main.cpp @@ -134,7 +134,7 @@ main() Board::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); LedGreen::set(); diff --git a/examples/stm32f072_discovery/can/main.cpp b/examples/stm32f072_discovery/can/main.cpp index 170da6e123..6f176cafc2 100644 --- a/examples/stm32f072_discovery/can/main.cpp +++ b/examples/stm32f072_discovery/can/main.cpp @@ -76,14 +76,14 @@ main() // Initialize Usart Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); MODM_LOG_INFO << "CAN Test Program" << modm::endl; MODM_LOG_INFO << "Initializing Can ..." << modm::endl; // Initialize Can Can::connect(Gpio::InputType::PullUp); - Can::initialize(9); + Can::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can ..." << modm::endl; // Receive every message diff --git a/examples/stm32f072_discovery/hard_fault/main.cpp b/examples/stm32f072_discovery/hard_fault/main.cpp index 1b12a09263..0f12e41ce8 100644 --- a/examples/stm32f072_discovery/hard_fault/main.cpp +++ b/examples/stm32f072_discovery/hard_fault/main.cpp @@ -35,7 +35,7 @@ main() // initialize Uart for MODM_LOG Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); MODM_LOG_INFO << "Causing a Hardfault now!" << modm::endl; diff --git a/examples/stm32f072_discovery/tmp102/main.cpp b/examples/stm32f072_discovery/tmp102/main.cpp index c55638d831..1aa72d18d6 100644 --- a/examples/stm32f072_discovery/tmp102/main.cpp +++ b/examples/stm32f072_discovery/tmp102/main.cpp @@ -109,10 +109,10 @@ main() Board::initialize(); Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); stream << "\n\nRESTART\n\n"; diff --git a/examples/stm32f072_discovery/uart/main.cpp b/examples/stm32f072_discovery/uart/main.cpp index 3fa177f2ab..131353ae8f 100644 --- a/examples/stm32f072_discovery/uart/main.cpp +++ b/examples/stm32f072_discovery/uart/main.cpp @@ -31,7 +31,7 @@ main() // Enable USART 1 Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); while (1) { diff --git a/examples/stm32f0_discovery/logger/main.cpp b/examples/stm32f0_discovery/logger/main.cpp index 5066c76ea9..683e0a0d74 100644 --- a/examples/stm32f0_discovery/logger/main.cpp +++ b/examples/stm32f0_discovery/logger/main.cpp @@ -34,7 +34,7 @@ main() // initialize Uart1 for MODM_LOG_* Usart1::connect(); - Usart1::initialize(12); + Usart1::initialize(12); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f103c8t6_blue_pill/adns_9800/main.cpp b/examples/stm32f103c8t6_blue_pill/adns_9800/main.cpp index 485c7c3084..49b729d18e 100644 --- a/examples/stm32f103c8t6_blue_pill/adns_9800/main.cpp +++ b/examples/stm32f103c8t6_blue_pill/adns_9800/main.cpp @@ -89,7 +89,7 @@ class Adns9800Thread : public modm::pt::Protothread Cs::setOutput(modm::Gpio::High); SpiMaster1::connect(); - SpiMaster1::initialize(); + SpiMaster1::initialize(); SpiMaster1::setDataMode(SpiMaster1::DataMode::Mode3); adns9800::initialise(); @@ -135,7 +135,7 @@ main() // initialize Uart2 for MODM_LOG_* Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f103c8t6_blue_pill/can/main.cpp b/examples/stm32f103c8t6_blue_pill/can/main.cpp index 256b7974bc..54baaae333 100644 --- a/examples/stm32f103c8t6_blue_pill/can/main.cpp +++ b/examples/stm32f103c8t6_blue_pill/can/main.cpp @@ -58,7 +58,7 @@ main() // Initialize Usart Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "CAN Test Program" << modm::endl; @@ -73,7 +73,7 @@ main() } else { Can::connect(Gpio::InputType::PullUp); } - Can::initialize(9); + Can::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can1..." << modm::endl; // Receive every message diff --git a/examples/stm32f103c8t6_blue_pill/environment/main.cpp b/examples/stm32f103c8t6_blue_pill/environment/main.cpp index 90c080e4f1..8a1ce91017 100644 --- a/examples/stm32f103c8t6_blue_pill/environment/main.cpp +++ b/examples/stm32f103c8t6_blue_pill/environment/main.cpp @@ -53,15 +53,15 @@ main() // ------------------------------------------------------------------------ // I2C for sensors SensorsAI2cMaster::connect(); - SensorsAI2cMaster::initialize(); + SensorsAI2cMaster::initialize(); SensorsBI2cMaster::connect(); - SensorsBI2cMaster::initialize(); + SensorsBI2cMaster::initialize(); // ------------------------------------------------------------------------ // initialize Uart2 for MODM_LOG_* Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_DEBUG << "Welcome to Environment Sensor Test" << modm::endl; diff --git a/examples/stm32f103c8t6_blue_pill/logger/main.cpp b/examples/stm32f103c8t6_blue_pill/logger/main.cpp index 6db090da7d..6103a38daf 100644 --- a/examples/stm32f103c8t6_blue_pill/logger/main.cpp +++ b/examples/stm32f103c8t6_blue_pill/logger/main.cpp @@ -80,7 +80,7 @@ main() // initialize Uart2 for MODM_LOG_* Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f1_discovery/logger/main.cpp b/examples/stm32f1_discovery/logger/main.cpp index 59d2c7da63..25964b947c 100644 --- a/examples/stm32f1_discovery/logger/main.cpp +++ b/examples/stm32f1_discovery/logger/main.cpp @@ -39,7 +39,7 @@ main() // initialize Uart2 for MODM_LOG_* Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f3_discovery/adc/continous/main.cpp b/examples/stm32f3_discovery/adc/continous/main.cpp index 0dc4e919f9..2423e5295e 100644 --- a/examples/stm32f3_discovery/adc/continous/main.cpp +++ b/examples/stm32f3_discovery/adc/continous/main.cpp @@ -63,7 +63,7 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc Adc1::initialize(Adc1::ClockMode::Asynchronous, Adc1::Prescaler::Div128, diff --git a/examples/stm32f3_discovery/adc/interrupt/main.cpp b/examples/stm32f3_discovery/adc/interrupt/main.cpp index 01c158373d..3d3130cadd 100644 --- a/examples/stm32f3_discovery/adc/interrupt/main.cpp +++ b/examples/stm32f3_discovery/adc/interrupt/main.cpp @@ -45,7 +45,7 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc4 Adc4::initialize(Adc4::ClockMode::Asynchronous, Adc4::Prescaler::Div256, diff --git a/examples/stm32f3_discovery/adc/simple/main.cpp b/examples/stm32f3_discovery/adc/simple/main.cpp index 6063ae037e..f478878176 100644 --- a/examples/stm32f3_discovery/adc/simple/main.cpp +++ b/examples/stm32f3_discovery/adc/simple/main.cpp @@ -33,7 +33,7 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc4 Adc4::initialize(Adc4::ClockMode::Asynchronous, Adc4::Prescaler::Div256, diff --git a/examples/stm32f3_discovery/can/main.cpp b/examples/stm32f3_discovery/can/main.cpp index 64720fdc9d..cb4f23e5e2 100644 --- a/examples/stm32f3_discovery/can/main.cpp +++ b/examples/stm32f3_discovery/can/main.cpp @@ -77,14 +77,14 @@ main() // Initialize Usart Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "CAN Test Program" << modm::endl; MODM_LOG_INFO << "Initializing Can ..." << modm::endl; // Initialize Can Can::connect(Gpio::InputType::PullUp); - Can::initialize(9); + Can::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can ..." << modm::endl; // Receive every message diff --git a/examples/stm32f3_discovery/comp/main.cpp b/examples/stm32f3_discovery/comp/main.cpp index a611c4c9ef..7f000f806a 100644 --- a/examples/stm32f3_discovery/comp/main.cpp +++ b/examples/stm32f3_discovery/comp/main.cpp @@ -36,7 +36,7 @@ main() // initialize Uart2 for MODM_LOG_ Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f3_discovery/hard_fault/main.cpp b/examples/stm32f3_discovery/hard_fault/main.cpp index 2ca2637a08..ce09e2da9c 100644 --- a/examples/stm32f3_discovery/hard_fault/main.cpp +++ b/examples/stm32f3_discovery/hard_fault/main.cpp @@ -38,7 +38,7 @@ main() // initialize Uart2 for MODM_LOG_ Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "Causing a Hardfault now!" << modm::endl; diff --git a/examples/stm32f3_discovery/uart/hal/main.cpp b/examples/stm32f3_discovery/uart/hal/main.cpp index 743f609af7..847e5ab40a 100644 --- a/examples/stm32f3_discovery/uart/hal/main.cpp +++ b/examples/stm32f3_discovery/uart/hal/main.cpp @@ -22,7 +22,7 @@ main() // Initialize Usart Hal GpioInputA3::configure(Gpio::InputType::PullUp); GpioConnector::connect(); -// UsartHal2::initialize(UsartHal2::Parity::Odd); +// UsartHal2::initialize(UsartHal2::Parity::Odd); UsartHal2::enableInterruptVector(true, 14); UsartHal2::enableInterrupt(UsartHal2::Interrupt::TxEmpty); UsartHal2::setTransmitterEnable(true); diff --git a/examples/stm32f3_discovery/uart/logger/main.cpp b/examples/stm32f3_discovery/uart/logger/main.cpp index 20a131d3cc..64b2cddb83 100644 --- a/examples/stm32f3_discovery/uart/logger/main.cpp +++ b/examples/stm32f3_discovery/uart/logger/main.cpp @@ -38,7 +38,7 @@ main() // initialize Uart2 for MODM_LOG_ Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f429_discovery/logger/main.cpp b/examples/stm32f429_discovery/logger/main.cpp index a5d06d8486..70c172cfbe 100644 --- a/examples/stm32f429_discovery/logger/main.cpp +++ b/examples/stm32f429_discovery/logger/main.cpp @@ -38,7 +38,7 @@ main() // initialize Uart2 for MODM_LOG_ Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); // Use the logging streams to print some messages. // Change MODM_LOG_LEVEL above to enable or disable these messages diff --git a/examples/stm32f469_discovery/can/main.cpp b/examples/stm32f469_discovery/can/main.cpp index dde4f3c716..ae74e9b832 100644 --- a/examples/stm32f469_discovery/can/main.cpp +++ b/examples/stm32f469_discovery/can/main.cpp @@ -75,7 +75,7 @@ main() MODM_LOG_INFO << "Initializing Can ..." << modm::endl; // Initialize Can Can2::connect(Gpio::InputType::PullUp); - Can2::initialize(9); + Can2::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can ..." << modm::endl; // Receive every message diff --git a/examples/stm32f4_discovery/accelerometer/main.cpp b/examples/stm32f4_discovery/accelerometer/main.cpp index 8462372668..b30a6406d1 100644 --- a/examples/stm32f4_discovery/accelerometer/main.cpp +++ b/examples/stm32f4_discovery/accelerometer/main.cpp @@ -118,7 +118,7 @@ main() Board::lis3::Mosi::setOutput(modm::Gpio::High); lis::I2cMaster::connect(lis::I2cMaster::PullUps::Internal); - lis::I2cMaster::initialize(); + lis::I2cMaster::initialize(); #else Board::initializeLis3(); #endif diff --git a/examples/stm32f4_discovery/adc/interrupt/main.cpp b/examples/stm32f4_discovery/adc/interrupt/main.cpp index 539e36ac3c..b4fe4f72b0 100644 --- a/examples/stm32f4_discovery/adc/interrupt/main.cpp +++ b/examples/stm32f4_discovery/adc/interrupt/main.cpp @@ -47,10 +47,10 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc2 - Adc2::initialize(); + Adc2::initialize(); Adc2::connect(); Adc2::setPinChannel(); diff --git a/examples/stm32f4_discovery/adc/oversample/main.cpp b/examples/stm32f4_discovery/adc/oversample/main.cpp index 0e76f9862c..0e7aa8964d 100644 --- a/examples/stm32f4_discovery/adc/oversample/main.cpp +++ b/examples/stm32f4_discovery/adc/oversample/main.cpp @@ -47,11 +47,11 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc2 Adc2::connect(); - Adc2::initialize(); + Adc2::initialize(); Adc2::enableInterruptVector(5); Adc2::enableInterrupt(Adc2::Interrupt::EndOfRegularConversion); diff --git a/examples/stm32f4_discovery/adc/simple/main.cpp b/examples/stm32f4_discovery/adc/simple/main.cpp index 0492b2b764..bc4837500c 100644 --- a/examples/stm32f4_discovery/adc/simple/main.cpp +++ b/examples/stm32f4_discovery/adc/simple/main.cpp @@ -33,11 +33,11 @@ main() // initialize Uart2 for MODM_LOG_INFO Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // initialize Adc2 Adc2::connect(); - Adc2::initialize(); + Adc2::initialize(); Adc2::setPinChannel(); while (1) diff --git a/examples/stm32f4_discovery/app_uart_sniffer/main.cpp b/examples/stm32f4_discovery/app_uart_sniffer/main.cpp index 4f39e254a2..a06192653a 100644 --- a/examples/stm32f4_discovery/app_uart_sniffer/main.cpp +++ b/examples/stm32f4_discovery/app_uart_sniffer/main.cpp @@ -87,15 +87,15 @@ main() // Enable USART 2: To / from PC Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Enable USART 1 Host To Node Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); // Enable USART 3 Node to Host Usart3::connect(); - Usart3::initialize(); + Usart3::initialize(); MODM_LOG_INFO.printf("\e[H\e[J\e[39m"); MODM_LOG_INFO.printf("Welcome to MODM Bidirectional UART Sniffer.\n\n"); diff --git a/examples/stm32f4_discovery/barometer_bmp085_bmp180/main.cpp b/examples/stm32f4_discovery/barometer_bmp085_bmp180/main.cpp index 87c16a3679..6a02094083 100644 --- a/examples/stm32f4_discovery/barometer_bmp085_bmp180/main.cpp +++ b/examples/stm32f4_discovery/barometer_bmp085_bmp180/main.cpp @@ -128,10 +128,10 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); stream << "\n\nWelcome to BMP085 demo!\n\n"; diff --git a/examples/stm32f4_discovery/can/main.cpp b/examples/stm32f4_discovery/can/main.cpp index 4dc1b3b8cb..3f0db96df6 100644 --- a/examples/stm32f4_discovery/can/main.cpp +++ b/examples/stm32f4_discovery/can/main.cpp @@ -61,7 +61,7 @@ main() // Initialize Usart Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "CAN Test Program" << modm::endl; @@ -71,7 +71,7 @@ main() MODM_LOG_INFO << "Initializing Can1..." << modm::endl; // Initialize Can1 Can1::connect(Gpio::InputType::PullUp); - Can1::initialize(9); + Can1::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can1..." << modm::endl; // Receive every message @@ -82,7 +82,7 @@ main() MODM_LOG_INFO << "Initializing Can2..." << modm::endl; // Initialize Can2 Can2::connect(Gpio::InputType::PullUp); - Can2::initialize(12); + Can2::initialize(12); MODM_LOG_INFO << "Setting up Filter for Can2..." << modm::endl; // Receive every message diff --git a/examples/stm32f4_discovery/can2/main.cpp b/examples/stm32f4_discovery/can2/main.cpp index 3b4bb2f4d5..826409971a 100644 --- a/examples/stm32f4_discovery/can2/main.cpp +++ b/examples/stm32f4_discovery/can2/main.cpp @@ -78,14 +78,14 @@ main() // Initialize Usart Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "CAN Test Program" << modm::endl; MODM_LOG_INFO << "Initializing Can ..." << modm::endl; // Initialize Can Can1::connect(Gpio::InputType::PullUp); - Can1::initialize(9); + Can1::initialize(9); MODM_LOG_INFO << "Setting up Filter for Can ..." << modm::endl; // Receive every message diff --git a/examples/stm32f4_discovery/colour_tcs3414/main.cpp b/examples/stm32f4_discovery/colour_tcs3414/main.cpp index 6a1c621626..068bf9cf32 100644 --- a/examples/stm32f4_discovery/colour_tcs3414/main.cpp +++ b/examples/stm32f4_discovery/colour_tcs3414/main.cpp @@ -126,10 +126,10 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); stream << "\n\nWelcome to TCS3414 demo!\n\n"; diff --git a/examples/stm32f4_discovery/display/hd44780/main.cpp b/examples/stm32f4_discovery/display/hd44780/main.cpp index 16d8588824..59f348f581 100644 --- a/examples/stm32f4_discovery/display/hd44780/main.cpp +++ b/examples/stm32f4_discovery/display/hd44780/main.cpp @@ -192,12 +192,12 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "\n\nWelcome to HD44780 I2C demo!\n\n"; MyI2cMaster::connect(MyI2cMaster::PullUps::Internal); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); modm::ShortPeriodicTimer tmr(500); diff --git a/examples/stm32f4_discovery/display/nokia_5110/main.cpp b/examples/stm32f4_discovery/display/nokia_5110/main.cpp index 4db69a58b5..0e2142fb5a 100644 --- a/examples/stm32f4_discovery/display/nokia_5110/main.cpp +++ b/examples/stm32f4_discovery/display/nokia_5110/main.cpp @@ -115,7 +115,7 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "\n\nWelcome to Nokia 5110 display demo!\n\n"; @@ -125,7 +125,7 @@ main() // Hardware SPI Master SpiMaster2::connect(); - mySpiMaster::initialize(); + mySpiMaster::initialize(); modm::ShortPeriodicTimer tmr(500); diff --git a/examples/stm32f4_discovery/display/ssd1306/main.cpp b/examples/stm32f4_discovery/display/ssd1306/main.cpp index 110e6a4617..49a1899532 100644 --- a/examples/stm32f4_discovery/display/ssd1306/main.cpp +++ b/examples/stm32f4_discovery/display/ssd1306/main.cpp @@ -34,7 +34,7 @@ main() Board::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); display.initializeBlocking(); display.setFont(modm::font::Assertion); diff --git a/examples/stm32f4_discovery/distance_vl6180/main.cpp b/examples/stm32f4_discovery/distance_vl6180/main.cpp index e1ff38e32d..c33514ec85 100644 --- a/examples/stm32f4_discovery/distance_vl6180/main.cpp +++ b/examples/stm32f4_discovery/distance_vl6180/main.cpp @@ -147,10 +147,10 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); MODM_LOG_INFO << "\n\nWelcome to VL6180X demo!\n\n"; diff --git a/examples/stm32f4_discovery/hard_fault/main.cpp b/examples/stm32f4_discovery/hard_fault/main.cpp index 1f062d5cc3..b6867f67b0 100644 --- a/examples/stm32f4_discovery/hard_fault/main.cpp +++ b/examples/stm32f4_discovery/hard_fault/main.cpp @@ -55,7 +55,7 @@ main() // initialize Uart2 for MODM_LOG_ Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "Press Button to cause a Hardfault!" << modm::endl; diff --git a/examples/stm32f4_discovery/led_matrix_display/main.cpp b/examples/stm32f4_discovery/led_matrix_display/main.cpp index 33fa51a89d..0d061dfd2b 100644 --- a/examples/stm32f4_discovery/led_matrix_display/main.cpp +++ b/examples/stm32f4_discovery/led_matrix_display/main.cpp @@ -58,7 +58,7 @@ main() Clk::setOutput(); Spi::connect(); - Spi::initialize< Board::systemClock, 10_MHz>(); + Spi::initialize< Board::SystemClock, 10_MHz>(); ledMatrixDisplay.initialize(); diff --git a/examples/stm32f4_discovery/open407v-d/gui/main.cpp b/examples/stm32f4_discovery/open407v-d/gui/main.cpp index d04fdbacc2..e1043fe629 100644 --- a/examples/stm32f4_discovery/open407v-d/gui/main.cpp +++ b/examples/stm32f4_discovery/open407v-d/gui/main.cpp @@ -53,7 +53,7 @@ void initLogger() { Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); } // ---------------------------------------------------------------------------- @@ -166,7 +166,7 @@ initTouchscreen() IntTouchscreen::setInput(Gpio::InputType::PullUp); SpiMaster2::connect(); - SpiMaster2::initialize(); + SpiMaster2::initialize(); SpiMaster2::setDataMode(SpiMaster2::DataMode::Mode0); } diff --git a/examples/stm32f4_discovery/open407v-d/touchscreen/main.cpp b/examples/stm32f4_discovery/open407v-d/touchscreen/main.cpp index c938d0850b..76c78bd86d 100644 --- a/examples/stm32f4_discovery/open407v-d/touchscreen/main.cpp +++ b/examples/stm32f4_discovery/open407v-d/touchscreen/main.cpp @@ -123,7 +123,7 @@ initTouchscreen() IntTouchscreen::setInput(Gpio::InputType::PullUp); SpiMaster2::connect(); - SpiMaster2::initialize(); + SpiMaster2::initialize(); SpiMaster2::setDataMode(SpiMaster2::DataMode::Mode0); } diff --git a/examples/stm32f4_discovery/pressure_ams5915/main.cpp b/examples/stm32f4_discovery/pressure_ams5915/main.cpp index bd203cfe7f..79f7404411 100644 --- a/examples/stm32f4_discovery/pressure_ams5915/main.cpp +++ b/examples/stm32f4_discovery/pressure_ams5915/main.cpp @@ -101,10 +101,10 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(10); + Usart2::initialize(10); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); MODM_LOG_INFO << "\n\nWelcome to AMSYS 5915 pressure sensor demo!\n\n"; diff --git a/examples/stm32f4_discovery/protothreads/main.cpp b/examples/stm32f4_discovery/protothreads/main.cpp index 4cae58defd..2a46550c1f 100644 --- a/examples/stm32f4_discovery/protothreads/main.cpp +++ b/examples/stm32f4_discovery/protothreads/main.cpp @@ -109,10 +109,10 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MyI2cMaster::connect(MyI2cMaster::PullUps::Internal); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); stream << "\n\nRESTART\n\n"; diff --git a/examples/stm32f4_discovery/radio/nrf24-basic-comm/main.cpp b/examples/stm32f4_discovery/radio/nrf24-basic-comm/main.cpp index a81b1715f5..6a7059fc03 100644 --- a/examples/stm32f4_discovery/radio/nrf24-basic-comm/main.cpp +++ b/examples/stm32f4_discovery/radio/nrf24-basic-comm/main.cpp @@ -102,15 +102,15 @@ main() // Enable SPI 1 SpiMaster1::connect(); - SpiMaster1::initialize(); + SpiMaster1::initialize(); // Enable SPI 2 SpiMaster2::connect(); - SpiMaster2::initialize(); + SpiMaster2::initialize(); // Enable UART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); /* Configuration values for nRF24 */ diff --git a/examples/stm32f4_discovery/radio/nrf24-data/rx/main.cpp b/examples/stm32f4_discovery/radio/nrf24-data/rx/main.cpp index 13843e71b8..0dd602ae23 100644 --- a/examples/stm32f4_discovery/radio/nrf24-data/rx/main.cpp +++ b/examples/stm32f4_discovery/radio/nrf24-data/rx/main.cpp @@ -76,11 +76,11 @@ main() // Enable SPI 2 Spi::connect(); - Spi::initialize(); + Spi::initialize(); // Enable UART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "Hello from nrf24-data-rx example" << modm::endl; diff --git a/examples/stm32f4_discovery/radio/nrf24-data/tx/main.cpp b/examples/stm32f4_discovery/radio/nrf24-data/tx/main.cpp index bcdf9ad6b1..72c3cfa897 100644 --- a/examples/stm32f4_discovery/radio/nrf24-data/tx/main.cpp +++ b/examples/stm32f4_discovery/radio/nrf24-data/tx/main.cpp @@ -76,11 +76,11 @@ main() // Enable SPI 2 Spi::connect(); - Spi::initialize(); + Spi::initialize(); // Enable UART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); MODM_LOG_INFO << "Hello from nrf24-data-tx example" << modm::endl; diff --git a/examples/stm32f4_discovery/radio/nrf24-phy-test/main.cpp b/examples/stm32f4_discovery/radio/nrf24-phy-test/main.cpp index c63444a0bb..088cb1a375 100644 --- a/examples/stm32f4_discovery/radio/nrf24-phy-test/main.cpp +++ b/examples/stm32f4_discovery/radio/nrf24-phy-test/main.cpp @@ -65,11 +65,11 @@ main() // Enable SPI 2 SpiMaster2::connect(); - SpiMaster2::initialize(); + SpiMaster2::initialize(); // Enable UART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Initialize nRF24-Phy diff --git a/examples/stm32f4_discovery/radio/nrf24-scanner/main.cpp b/examples/stm32f4_discovery/radio/nrf24-scanner/main.cpp index 224c9dcb08..56869db0af 100644 --- a/examples/stm32f4_discovery/radio/nrf24-scanner/main.cpp +++ b/examples/stm32f4_discovery/radio/nrf24-scanner/main.cpp @@ -69,11 +69,11 @@ main() // Enable SPI 2 SpiMaster2::connect(); - SpiMaster2::initialize(); + SpiMaster2::initialize(); // Enable UART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); // Initialize nRF24-HAL diff --git a/examples/stm32f4_discovery/rtos/float_check/main.cpp b/examples/stm32f4_discovery/rtos/float_check/main.cpp index 672fe8d848..a9ac1b2b4e 100644 --- a/examples/stm32f4_discovery/rtos/float_check/main.cpp +++ b/examples/stm32f4_discovery/rtos/float_check/main.cpp @@ -98,7 +98,7 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); while (1) { diff --git a/examples/stm32f4_discovery/sab2/main.cpp b/examples/stm32f4_discovery/sab2/main.cpp index 938fed6635..8b8ecb0ba6 100644 --- a/examples/stm32f4_discovery/sab2/main.cpp +++ b/examples/stm32f4_discovery/sab2/main.cpp @@ -28,10 +28,10 @@ main() Board::initialize(); Usart1::connect(); - Usart1::initialize(); + Usart1::initialize(); Uart4::connect(); - Uart4::initialize(); + Uart4::initialize(); while (1) { diff --git a/examples/stm32f4_discovery/spi/main.cpp b/examples/stm32f4_discovery/spi/main.cpp index bfeaf9e160..d3776016ff 100644 --- a/examples/stm32f4_discovery/spi/main.cpp +++ b/examples/stm32f4_discovery/spi/main.cpp @@ -31,7 +31,7 @@ main() // Connect the GPIOs to the SPIs alternate function SpiMaster::connect(); // Initialize the SPI with a 20MHz clock - SpiMaster::initialize(); + SpiMaster::initialize(); uint8_t data = 0; while (1) diff --git a/examples/stm32f4_discovery/temperature_ltc2984/main.cpp b/examples/stm32f4_discovery/temperature_ltc2984/main.cpp index 92494303a8..d39680280b 100644 --- a/examples/stm32f4_discovery/temperature_ltc2984/main.cpp +++ b/examples/stm32f4_discovery/temperature_ltc2984/main.cpp @@ -146,12 +146,12 @@ main() Board::initialize(); Usart2::connect(); - Usart2::initialize(10); + Usart2::initialize(10); // Connect the GPIOs to the SPIs alternate function SpiMaster::connect(); // Initialize the SPI with a 1.3MHz clock - SpiMaster::initialize(); + SpiMaster::initialize(); logger << "\n\nWelcome to LTC2983/LTC2984 demo!\n\n"; diff --git a/examples/stm32f4_discovery/timer_test/main.cpp b/examples/stm32f4_discovery/timer_test/main.cpp index 23cfce8f56..ace18d76e9 100644 --- a/examples/stm32f4_discovery/timer_test/main.cpp +++ b/examples/stm32f4_discovery/timer_test/main.cpp @@ -39,7 +39,7 @@ testTimerAdvancedStart() TIMER::enable(); TIMER::setMode(TIMER::Mode::UpCounter); - TIMER::template setPeriod(250000); + TIMER::template setPeriod(250000); TIMER::enableInterruptVector(TIMER::Interrupt::Update, true, 10); TIMER::enableInterrupt(TIMER::Interrupt::Update); @@ -54,7 +54,7 @@ testTimerStart() TIMER::enable(); TIMER::setMode(TIMER::Mode::UpCounter); - TIMER::template setPeriod(250000); + TIMER::template setPeriod(250000); TIMER::enableInterruptVector(true, 10); TIMER::enableInterrupt(TIMER::Interrupt::Update); diff --git a/examples/stm32f4_discovery/uart/main.cpp b/examples/stm32f4_discovery/uart/main.cpp index 7066dd606d..7647d6fa96 100644 --- a/examples/stm32f4_discovery/uart/main.cpp +++ b/examples/stm32f4_discovery/uart/main.cpp @@ -31,7 +31,7 @@ main() // Enable USART 2 Usart2::connect(); - Usart2::initialize(); + Usart2::initialize(); while (1) { diff --git a/examples/stm32f4_discovery/uart_spi/main.cpp b/examples/stm32f4_discovery/uart_spi/main.cpp index c8c2a728af..9437ce6be0 100644 --- a/examples/stm32f4_discovery/uart_spi/main.cpp +++ b/examples/stm32f4_discovery/uart_spi/main.cpp @@ -21,7 +21,7 @@ main() // Enable Uart SPI 2 UartSpiMaster2::connect(); - UartSpiMaster2::initialize(); + UartSpiMaster2::initialize(); while (1) { diff --git a/examples/stm32f746g_discovery/adc_ad7928/main.cpp b/examples/stm32f746g_discovery/adc_ad7928/main.cpp index 949a1038ad..228ef13e37 100644 --- a/examples/stm32f746g_discovery/adc_ad7928/main.cpp +++ b/examples/stm32f746g_discovery/adc_ad7928/main.cpp @@ -108,7 +108,7 @@ main() SpiMaster::connect(); // Initialize the SPI with a 13.5MHz clock (core frequency / 16) - SpiMaster::initialize(); + SpiMaster::initialize(); MODM_LOG_INFO << "AD7928/AD7918/AD7908 Example" << modm::endl; diff --git a/examples/stm32f746g_discovery/tmp102/main.cpp b/examples/stm32f746g_discovery/tmp102/main.cpp index 2909bfed48..cab82fd752 100644 --- a/examples/stm32f746g_discovery/tmp102/main.cpp +++ b/examples/stm32f746g_discovery/tmp102/main.cpp @@ -105,7 +105,7 @@ main() Board::LedD13::setOutput(modm::Gpio::Low); MyI2cMaster::connect(); - MyI2cMaster::initialize(); + MyI2cMaster::initialize(); MODM_LOG_INFO << "\n\nRESTART\n\n"; diff --git a/examples/zmq/1_stm32/main.cpp b/examples/zmq/1_stm32/main.cpp index db25b48d64..c4ad518a87 100644 --- a/examples/zmq/1_stm32/main.cpp +++ b/examples/zmq/1_stm32/main.cpp @@ -95,7 +95,7 @@ main() // Initialize Can1 Can1::connect(Gpio::InputType::PullUp); - Can1::initialize(10); + Can1::initialize(10); CanFilter::setFilter(0, CanFilter::FIFO0, CanFilter::ExtendedIdentifier(0), CanFilter::ExtendedFilterMask(0)); diff --git a/src/modm/board/al_avreb_can/board.hpp b/src/modm/board/al_avreb_can/board.hpp index 9de59e5714..20e9122498 100644 --- a/src/modm/board/al_avreb_can/board.hpp +++ b/src/modm/board/al_avreb_can/board.hpp @@ -26,8 +26,7 @@ using namespace modm::platform; namespace Board { using namespace modm::literals; - -using systemClock = modm::platform::SystemClock; +using SystemClock = modm::platform::SystemClock; using Led0 = GpioInverted; using Led1 = GpioInverted; @@ -42,10 +41,10 @@ using LoggerDevice = modm::IODeviceWrapper< Uart1, modm::IOBuffer::BlockIfFull > inline void initialize() { - systemClock::enable(); + SystemClock::enable(); Uart1::connect(); - Uart1::initialize(); + Uart1::initialize(); // modm::Clock initialization // Clear Timer on Compare Match Mode diff --git a/src/modm/board/arduino_uno/board.hpp b/src/modm/board/arduino_uno/board.hpp index 95ccdf42d2..1ba7f1d607 100644 --- a/src/modm/board/arduino_uno/board.hpp +++ b/src/modm/board/arduino_uno/board.hpp @@ -24,8 +24,7 @@ using namespace modm::platform; namespace Board { using namespace modm::literals; - -using systemClock = modm::platform::SystemClock; +using SystemClock = modm::platform::SystemClock; // Arduino Footprint using A0 = GpioC0; @@ -60,11 +59,11 @@ using LoggerDevice = modm::IODeviceWrapper< Uart0, modm::IOBuffer::BlockIfFull > inline void initialize() { - systemClock::enable(); + SystemClock::enable(); // Uart0 is connected to onboard USB bridge Uart0::connect(); - Uart0::initialize(); + Uart0::initialize(); // modm::Clock initialization // Clear Timer on Compare Match Mode diff --git a/src/modm/board/black_pill/board.hpp b/src/modm/board/black_pill/board.hpp index f6f08eb067..a676f24a92 100644 --- a/src/modm/board/black_pill/board.hpp +++ b/src/modm/board/black_pill/board.hpp @@ -25,7 +25,7 @@ namespace Board /// STM32F103 running at 72MHz generated from the external 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 72_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -96,8 +96,8 @@ using Button = GpioUnused; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); } diff --git a/src/modm/board/blue_pill/board.hpp b/src/modm/board/blue_pill/board.hpp index fde168a626..e9c5511f5f 100644 --- a/src/modm/board/blue_pill/board.hpp +++ b/src/modm/board/blue_pill/board.hpp @@ -26,7 +26,7 @@ namespace Board /// STM32F103 running at 72MHz generated from the external 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 72_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -97,8 +97,8 @@ using Button = GpioUnused; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); } diff --git a/src/modm/board/disco_f051r8/board.hpp b/src/modm/board/disco_f051r8/board.hpp index 0077857f9e..6ffffdeac6 100644 --- a/src/modm/board/disco_f051r8/board.hpp +++ b/src/modm/board/disco_f051r8/board.hpp @@ -25,7 +25,7 @@ namespace Board using namespace modm::literals; /// STM32F0 running at 48MHz generated from the internal 8MHz with PLL. -struct systemClock +struct SystemClock { static constexpr int Frequency = 48_MHz; static constexpr int Usart1 = Frequency; @@ -64,8 +64,8 @@ using Leds = SoftwareGpioPort< LedGreen, LedBlue >; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedBlue::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/disco_f072rb/board.hpp b/src/modm/board/disco_f072rb/board.hpp index d87cc41a4e..d893a30afd 100644 --- a/src/modm/board/disco_f072rb/board.hpp +++ b/src/modm/board/disco_f072rb/board.hpp @@ -28,9 +28,9 @@ namespace Board /// STM32F072 running at 48MHz generated from the internal 48MHz clock // TODO: enable once clock driver is implemented -//using systemClock = SystemClock, 48_MHz>; +//using SystemClock = SystemClock, 48_MHz>; -struct systemClock +struct SystemClock { static constexpr int Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; @@ -106,8 +106,8 @@ using Gyroscope = modm::L3gd20< Transport >; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedUp::setOutput(modm::Gpio::Low); LedDown::setOutput(modm::Gpio::Low); @@ -137,7 +137,7 @@ initializeL3g() l3g::Cs::setOutput(modm::Gpio::High); l3g::SpiMaster::connect(); - l3g::SpiMaster::initialize(); + l3g::SpiMaster::initialize(); l3g::SpiMaster::setDataMode(l3g::SpiMaster::DataMode::Mode3); } diff --git a/src/modm/board/disco_f100rb/board.hpp b/src/modm/board/disco_f100rb/board.hpp index 2018aeeca9..ee337186a5 100644 --- a/src/modm/board/disco_f100rb/board.hpp +++ b/src/modm/board/disco_f100rb/board.hpp @@ -26,7 +26,7 @@ namespace Board /// STM32F100 running at 24MHz generated from the external 8MHz crystal /// supplied by the on-board st-link -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 24_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency; @@ -103,8 +103,8 @@ using Leds = SoftwareGpioPort< LedBlue, LedGreen >; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedBlue::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/disco_f303vc/board.hpp b/src/modm/board/disco_f303vc/board.hpp index 58d116b774..9b04b3b488 100644 --- a/src/modm/board/disco_f303vc/board.hpp +++ b/src/modm/board/disco_f303vc/board.hpp @@ -28,7 +28,7 @@ namespace Board /// STM32F303 running at 72MHz generated from the external 8MHz clock /// supplied by the on-board st-link -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 72_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -162,8 +162,8 @@ using Dp = GpioA12; // DP: USB_DP inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedNorth::setOutput(modm::Gpio::Low); LedNorthEast::setOutput(modm::Gpio::Low); @@ -197,7 +197,7 @@ initializeL3g() l3g::Cs::setOutput(modm::Gpio::High); l3g::SpiMaster::connect(); - l3g::SpiMaster::initialize(); + l3g::SpiMaster::initialize(); l3g::SpiMaster::setDataMode(l3g::SpiMaster::DataMode::Mode3); } @@ -221,7 +221,7 @@ initializeLsm3() // lsm3::Drdy::enableExternalInterruptVector(12); lsm3::I2cMaster::connect(); - lsm3::I2cMaster::initialize(); + lsm3::I2cMaster::initialize(); } diff --git a/src/modm/board/disco_f407vg/board.hpp b/src/modm/board/disco_f407vg/board.hpp index fe916ae6a5..0c76a75a1d 100644 --- a/src/modm/board/disco_f407vg/board.hpp +++ b/src/modm/board/disco_f407vg/board.hpp @@ -27,7 +27,7 @@ namespace Board using namespace modm::literals; /// STM32F407 running at 168MHz generated from the external 8MHz crystal -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 168_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 4; @@ -168,8 +168,8 @@ using VBus = GpioInputA9; // VBUS_FS: USB_OTG_HS_VBUS inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedOrange::setOutput(modm::Gpio::Low); LedGreen::setOutput(modm::Gpio::Low); @@ -193,7 +193,7 @@ initializeLis3() lis3::Cs::setOutput(modm::Gpio::High); lis3::SpiMaster::connect(); - lis3::SpiMaster::initialize(); + lis3::SpiMaster::initialize(); lis3::SpiMaster::setDataMode(lis3::SpiMaster::DataMode::Mode3); } @@ -209,7 +209,7 @@ initializeCs43() cs43::Reset::setOutput(modm::Gpio::High); cs43::I2cMaster::connect(); - cs43::I2cMaster::initialize(); + cs43::I2cMaster::initialize(); } /// not supported yet, due to missing I2S driver diff --git a/src/modm/board/disco_f429zi/board.hpp b/src/modm/board/disco_f429zi/board.hpp index 11586edb4b..eaad20da81 100644 --- a/src/modm/board/disco_f429zi/board.hpp +++ b/src/modm/board/disco_f429zi/board.hpp @@ -25,7 +25,7 @@ namespace Board using namespace modm::literals; /// STM32F429 running at 180MHz from the external 8MHz crystal -struct systemClock +struct SystemClock { static constexpr uint32_t Frequency = 180_MHz; static constexpr uint32_t Apb1 = Frequency / 4; @@ -221,8 +221,8 @@ using VBus = GpioB13; // VBUS_FS: USB_OTG_HS_VBUS inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedRed::setOutput(modm::Gpio::Low); @@ -250,7 +250,7 @@ initializeL3g() l3g::Cs::setOutput(modm::Gpio::High); l3g::SpiMaster::connect(); - l3g::SpiMaster::initialize(); + l3g::SpiMaster::initialize(); l3g::SpiMaster::setDataMode(l3g::SpiMaster::DataMode::Mode3); } diff --git a/src/modm/board/disco_f469ni/board.hpp b/src/modm/board/disco_f469ni/board.hpp index 48bad1e205..5787f78015 100644 --- a/src/modm/board/disco_f469ni/board.hpp +++ b/src/modm/board/disco_f469ni/board.hpp @@ -31,7 +31,7 @@ namespace Board using namespace modm::literals; /// STM32F469 running at 180MHz from the external 8MHz crystal -struct systemClock +struct SystemClock { static constexpr uint32_t Frequency = 180_MHz; static constexpr uint32_t Apb1 = Frequency / 4; @@ -166,7 +166,7 @@ initializeTouchscreen() // ft6::Int::enableExternalInterruptVector(12); ft6::I2cMaster::connect(); - ft6::I2cMaster::initialize(); + ft6::I2cMaster::initialize(); } void @@ -185,11 +185,11 @@ inline void initialize() { // initialized in `modm_board_init()` - // systemClock::enable(); - SysTickTimer::initialize(); + // SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedRed::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/disco_f469ni/board_init.cpp b/src/modm/board/disco_f469ni/board_init.cpp index dad51b0972..d59389e426 100644 --- a/src/modm/board/disco_f469ni/board_init.cpp +++ b/src/modm/board/disco_f469ni/board_init.cpp @@ -24,7 +24,7 @@ modm_board_init(void) modm::delayMilliseconds(10); // initialize system clock and external SDRAM before accessing external memories - Board::systemClock::enable(); + Board::SystemClock::enable(); board_initialize_sdram(); } diff --git a/src/modm/board/disco_f746ng/board.hpp b/src/modm/board/disco_f746ng/board.hpp index 1d7b7cffae..e133adaf84 100644 --- a/src/modm/board/disco_f746ng/board.hpp +++ b/src/modm/board/disco_f746ng/board.hpp @@ -30,7 +30,7 @@ namespace Board using namespace modm::literals; /// STM32F7 running at 216MHz from the external 25MHz clock -struct systemClock +struct SystemClock { static constexpr uint32_t Frequency = 216_MHz; static constexpr uint32_t Apb1 = Frequency / 8; @@ -147,11 +147,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); Button::setInput(); Button::setInputTrigger(Gpio::InputTrigger::RisingEdge); diff --git a/src/modm/board/disco_f769ni/board.hpp b/src/modm/board/disco_f769ni/board.hpp index 15976e4f82..5450fa351f 100644 --- a/src/modm/board/disco_f769ni/board.hpp +++ b/src/modm/board/disco_f769ni/board.hpp @@ -30,7 +30,7 @@ namespace Board using namespace modm::literals; /// STM32F7 running at 216MHz from the external 25MHz clock -struct systemClock +struct SystemClock { static constexpr uint32_t Frequency = 216_MHz; static constexpr uint32_t Apb1 = Frequency / 8; @@ -150,11 +150,11 @@ using Miso = sdio::D0; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); Button::setInput(); Button::setInputTrigger(Gpio::InputTrigger::RisingEdge); diff --git a/src/modm/board/disco_l476vg/board.hpp b/src/modm/board/disco_l476vg/board.hpp index 8cd10d7927..4b879b86ee 100644 --- a/src/modm/board/disco_l476vg/board.hpp +++ b/src/modm/board/disco_l476vg/board.hpp @@ -30,7 +30,7 @@ namespace Board /// internal Multispeed oscillator // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency; @@ -90,8 +90,8 @@ using Leds = SoftwareGpioPort< LedRed, LedGreen >; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedRed::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/nucleo_f031k6/board.hpp b/src/modm/board/nucleo_f031k6/board.hpp index ee5a7ef1cd..2af90d853d 100644 --- a/src/modm/board/nucleo_f031k6/board.hpp +++ b/src/modm/board/nucleo_f031k6/board.hpp @@ -29,7 +29,7 @@ namespace Board /// STM32F031K6 running at 48MHz generated from the internal 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb = Frequency; @@ -90,11 +90,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); } } diff --git a/src/modm/board/nucleo_f042k6/board.hpp b/src/modm/board/nucleo_f042k6/board.hpp index 0f0f64e1e3..c410fcad4a 100644 --- a/src/modm/board/nucleo_f042k6/board.hpp +++ b/src/modm/board/nucleo_f042k6/board.hpp @@ -29,7 +29,7 @@ namespace Board /// STM32F042K6 running at 48MHz generated from the internal 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb = Frequency; @@ -92,11 +92,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); } } diff --git a/src/modm/board/nucleo_f103rb/board.hpp b/src/modm/board/nucleo_f103rb/board.hpp index 75597721f8..37164a7d27 100644 --- a/src/modm/board/nucleo_f103rb/board.hpp +++ b/src/modm/board/nucleo_f103rb/board.hpp @@ -28,7 +28,7 @@ namespace Board /// STM32F103RB running at 64MHz generated from the internal 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 64_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -107,11 +107,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); Button::setInput(); Button::setInputTrigger(Gpio::InputTrigger::RisingEdge); diff --git a/src/modm/board/nucleo_f303k8/board.hpp b/src/modm/board/nucleo_f303k8/board.hpp index 9c6f84d6c3..4b918b8c25 100644 --- a/src/modm/board/nucleo_f303k8/board.hpp +++ b/src/modm/board/nucleo_f303k8/board.hpp @@ -28,7 +28,7 @@ namespace Board /// STM32F303K8 running at 64MHz generated from the internal 8MHz clock // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 64_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -101,11 +101,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); } } diff --git a/src/modm/board/nucleo_f401re/board.hpp b/src/modm/board/nucleo_f401re/board.hpp index 0451153f07..bd0a1d01f0 100644 --- a/src/modm/board/nucleo_f401re/board.hpp +++ b/src/modm/board/nucleo_f401re/board.hpp @@ -28,7 +28,7 @@ namespace Board /// STM32F401RE running at 84MHz generated from the internal 16MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 84_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -107,11 +107,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); Button::setInput(); Button::setInputTrigger(Gpio::InputTrigger::RisingEdge); diff --git a/src/modm/board/nucleo_f411re/board.hpp b/src/modm/board/nucleo_f411re/board.hpp index 9626bcd7cf..17e6f1b694 100644 --- a/src/modm/board/nucleo_f411re/board.hpp +++ b/src/modm/board/nucleo_f411re/board.hpp @@ -29,7 +29,7 @@ namespace Board /// STM32F411RE running at 96MHz generated from the internal 16MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 96_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -109,11 +109,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); Button::setInput(); Button::setInputTrigger(Gpio::InputTrigger::RisingEdge); diff --git a/src/modm/board/nucleo_f429zi/board.hpp b/src/modm/board/nucleo_f429zi/board.hpp index ed5627f365..228b620215 100644 --- a/src/modm/board/nucleo_f429zi/board.hpp +++ b/src/modm/board/nucleo_f429zi/board.hpp @@ -27,7 +27,7 @@ namespace Board using namespace modm::literals; /// STM32F429 running at 180MHz from the external 8MHz STLink clock -struct systemClock +struct SystemClock { static constexpr uint32_t Frequency = 180_MHz; static constexpr uint32_t Apb1 = Frequency / 4; @@ -121,11 +121,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); LedGreen::setOutput(modm::Gpio::Low); LedBlue::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/nucleo_l432kc/board.hpp b/src/modm/board/nucleo_l432kc/board.hpp index a3fc1582b9..bedbb70a13 100644 --- a/src/modm/board/nucleo_l432kc/board.hpp +++ b/src/modm/board/nucleo_l432kc/board.hpp @@ -27,7 +27,7 @@ namespace Board /// STM32L4 running at 80MHz generated with the PLL from 4MHz MSI clock -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 80_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency; @@ -109,11 +109,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(Gpio::InputType::PullUp); - stlink::Uart::initialize(); + stlink::Uart::initialize(); } } diff --git a/src/modm/board/nucleo_l476rg/board.hpp b/src/modm/board/nucleo_l476rg/board.hpp index a9f5ec7191..d2db261375 100644 --- a/src/modm/board/nucleo_l476rg/board.hpp +++ b/src/modm/board/nucleo_l476rg/board.hpp @@ -31,7 +31,7 @@ namespace Board /// internal Multispeed oscillator // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency; @@ -90,11 +90,11 @@ using LoggerDevice = modm::IODeviceWrapper< stlink::Uart, modm::IOBuffer::BlockI inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); stlink::Uart::connect(); - stlink::Uart::initialize(); + stlink::Uart::initialize(); LedGreen::setOutput(modm::Gpio::Low); diff --git a/src/modm/board/olimexino_stm32/board.hpp b/src/modm/board/olimexino_stm32/board.hpp index dde5760fbf..ac236914be 100644 --- a/src/modm/board/olimexino_stm32/board.hpp +++ b/src/modm/board/olimexino_stm32/board.hpp @@ -26,7 +26,7 @@ namespace Board /// STM32F103RB running at 64MHz generated from the internal 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 64_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb1 = Frequency / 2; @@ -138,11 +138,11 @@ using LoggerDevice = modm::IODeviceWrapper< uext::Uart, modm::IOBuffer::BlockIfF inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); uext::Uart::connect(); - uext::Uart::initialize(12); + uext::Uart::initialize(12); } diff --git a/src/modm/board/stm32f030f4p6_demo/board.hpp b/src/modm/board/stm32f030f4p6_demo/board.hpp index 8067ef80cf..44f35d9a3c 100644 --- a/src/modm/board/stm32f030f4p6_demo/board.hpp +++ b/src/modm/board/stm32f030f4p6_demo/board.hpp @@ -26,7 +26,7 @@ namespace Board /// STM32F030 running at 48MHz generated from the external 8MHz crystal // Dummy clock for devices -struct systemClock { +struct SystemClock { static constexpr uint32_t Frequency = 48_MHz; static constexpr uint32_t Ahb = Frequency; static constexpr uint32_t Apb = Frequency; @@ -84,8 +84,8 @@ using Button = GpioUnused; inline void initialize() { - systemClock::enable(); - SysTickTimer::initialize(); + SystemClock::enable(); + SysTickTimer::initialize(); LedOrange::setOutput(modm::Gpio::Low); } diff --git a/src/modm/platform/clock/lpc/static.hpp.in b/src/modm/platform/clock/lpc/static.hpp.in index 2d58391d4a..2da88c8af1 100644 --- a/src/modm/platform/clock/lpc/static.hpp.in +++ b/src/modm/platform/clock/lpc/static.hpp.in @@ -61,7 +61,7 @@ namespace modm 'setup': "PllSetup", 'sources': [internalClock, externalClock, externalCrystal] } -%% set systemClock = {'name': "SystemClock", +%% set SystemClock = {'name': "SystemClock", 'minFrequency': "MHz1", 'maxFrequency': "MHz48", 'sources': [ internalClock, externalClock, @@ -70,7 +70,7 @@ namespace modm %% set clockOut = {'name': "ClockOutput", 'divisions': range(1,255), 'sources': [externalClock, - externalCrystal, systemClock] } + externalCrystal, SystemClock] } // Static Clocks/Plls/Osciallators {{ static.source(internalClock, "modm::platform") }} @@ -81,7 +81,7 @@ namespace modm {{ static.pll(pll, "modm::platform") }} -{{ static.sink(systemClock, "modm::platform")}} +{{ static.sink(SystemClock, "modm::platform")}} {{ static.output(clockOut, "modm::platform")}}