diff --git a/README.md b/README.md index ac957b6bf2..627bb0d8cc 100644 --- a/README.md +++ b/README.md @@ -82,9 +82,9 @@ git clone --recurse-submodules --jobs 8 https://github.com/modm-io/modm.git ## Microcontrollers -modm can create a HAL for 3798 devices of these vendors: +modm can create a HAL for 3828 devices of these vendors: -- STMicroelectronics STM32: 2993 devices. +- STMicroelectronics STM32: 3023 devices. - Microchip SAM: 416 devices. - Microchip AVR: 388 devices. - Raspberry Pi: 1 device. diff --git a/examples/stm32c0x/adc/main.cpp b/examples/stm32c0x/adc/main.cpp index 9be62ef275..725721cb80 100644 --- a/examples/stm32c0x/adc/main.cpp +++ b/examples/stm32c0x/adc/main.cpp @@ -48,22 +48,22 @@ main() Adc1::initialize(); uint16_t vref = Adc1::readInternalVoltageReference(); - MODM_LOG_INFO << modm::endl << "vref=" << vref << "mV" << modm::endl; + MODM_LOG_INFO << modm::endl << "vref=" << vref << "mV"; int16_t Temp = Adc1::readTemperature(vref); - MODM_LOG_INFO << "Temp=" << Temp << modm::endl; + MODM_LOG_INFO << " Temp=" << Temp << "Deg.C" << modm::endl << modm::flush; - Adc1::setChannels(std::array{Adc1::Channel::In1, Adc1::Channel::In2}); + //Adc1::setChannels(std::array{Adc1::Channel::In1, Adc1::Channel::In2}); Adc1::setResolution(Adc1::Resolution::Bits12); Adc1::setRightAdjustResult(); Adc1::setSampleTime(Adc1::SampleTime::Cycles160_5); - Adc1::enableFreeRunningMode(); + //Adc1::enableFreeRunningMode(); // Adc1::enableOversampling(Adc1::OversampleRatio::x256, Adc1::OversampleShift::Div256); - Adc1::enableInterruptVector(5); - Adc1::enableInterrupt(Adc1::Interrupt::EndOfConversion); - // Adc1::enableInterrupt(Adc1::Interrupt::EndOfConversion | Adc1::Interrupt::EndOfSequence); - AdcInterrupt1::attachInterruptHandler(printAdc); - Adc1::startConversion(); + //Adc1::enableInterruptVector(5); + //Adc1::enableInterrupt(Adc1::Interrupt::EndOfConversion); + //Adc1::enableInterrupt(Adc1::Interrupt::EndOfConversion | Adc1::Interrupt::EndOfSequence); + //AdcInterrupt1::attachInterruptHandler(printAdc); + //Adc1::startConversion(); while (true) { @@ -71,6 +71,10 @@ main() modm::delay(500ms); // MODM_LOG_INFO << "mV=" << (vref * Adc1::getValue() / 4095ul) << modm::endl; + vref = Adc1::readInternalVoltageReference(); + MODM_LOG_INFO << "vref=" << vref << "mV"; + Temp = Adc1::readTemperature(vref); + MODM_LOG_INFO << " Temp=" << Temp << "deg.C" << modm::endl << modm::flush; } return 0;