improve consistency of function names

This commit is contained in:
Joey Castillo 2021-09-13 13:41:28 -04:00
parent cd935193e3
commit 5cd6b1afc7
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ uint16_t watch_get_analog_pin_level(const uint8_t pin) {
}
}
void watch_set_num_analog_samples(uint16_t samples) {
void watch_set_analog_num_samples(uint16_t samples) {
// ignore any input that's not a power of 2 (i.e. only one bit set)
if (__builtin_popcount(samples) != 1) return;
// if only one bit is set, counting the trailing zeroes is equivalent to log2(samples)

View File

@ -68,7 +68,7 @@ uint16_t watch_get_analog_pin_level(const uint8_t pin);
* the result in 16 bits.
* @see watch_get_analog_pin_level
**/
void watch_set_num_analog_samples(uint16_t samples);
void watch_set_analog_num_samples(uint16_t samples);
/** @brief Sets the length of time spent sampling, which allows measurement of higher impedance inputs.
* Default is 1.