10 explicit constexpr Frequency(
unsigned long hertz) : hertz(hertz) {}
11 constexpr operator unsigned long()
const {
return hertz; }
19constexpr Frequency
operator"" _kHz(
long double khz) {
20 return Frequency{(
unsigned long)(khz * 1E3l)};
22constexpr Frequency
operator"" _kHz(
unsigned long long khz) {
23 return Frequency{(
unsigned long)(khz * 1E3)};
25constexpr Frequency
operator"" _MHz(
long double mhz) {
26 return Frequency{(
unsigned long)(mhz * 1E6l)};
28constexpr Frequency
operator"" _MHz(
unsigned long long mhz) {
29 return Frequency{(
unsigned long)(mhz * 1E6)};
#define BEGIN_AH_NAMESPACE
Type-safe class for frequency values.
constexpr Frequency(unsigned long hertz)
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...