Demonstrate numerous different methods of the PropWare::Utility class
cmake_minimum_required(VERSION 3.3)
project(Utility_Demo)
create_simple_executable(${PROJECT_NAME} Utility_Demo.cpp)
void sampleCountBits ();
void sampleTimeMeasurement ();
void sampleFreeMemory ();
pwOut.
println(
"Hello! Let's explore some of PropWare's utility functions");
sampleCountBits();
sampleTimeMeasurement();
sampleFreeMemory();
return 0;
}
void sampleTimeMeasurement () {
unsigned int start = CNT;
pwOut.
println(
"But how long does it take to send each of these messages?");
pwOut.
printf(
"Well that previous message took precisely %u microseconds.\n", timeInMicros);
}
void sampleCountBits () {
int bits = 0x42;
pwOut.
printf(
"How many bits are set in 0x%02X?\n", bits);
}
void sampleFreeMemory () {
pwOut.
printf(
"The largest contiguous block of free memory is %u bytes\n",
}