From d00de2d783d9b2ccc0cadc7e37381e3ee2c5c857 Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Fri, 10 Jul 2020 21:27:42 -0700 Subject: [PATCH] Change variable name per @hathach request. --- cores/nRF5/wiring_analog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/nRF5/wiring_analog.cpp b/cores/nRF5/wiring_analog.cpp index 22ece424..5267a64c 100644 --- a/cores/nRF5/wiring_analog.cpp +++ b/cores/nRF5/wiring_analog.cpp @@ -46,7 +46,7 @@ extern "C" { -static uint8_t _lastAnalogWriteResolution = 8; // default is 256 levels +static uint8_t _analogResolution = 8; // default is 256 levels static uintptr_t _analogToken = 0x676f6c41; // 'A' 'l' 'o' 'g' /** @@ -56,7 +56,7 @@ static uintptr_t _analogToken = 0x676f6c41; // 'A' 'l' 'o' 'g' void analogWriteResolution( uint8_t res ) { // save the resolution for when adding a new instance - _lastAnalogWriteResolution = res; + _analogResolution = res; for (int i = 0; iisOwner(_analogToken)) continue; @@ -121,7 +121,7 @@ void analogWrite( uint32_t pin, uint32_t value ) } // apply the cached analog resolution to newly owned instances - HwPWMx[i]->setResolution(_lastAnalogWriteResolution); + HwPWMx[i]->setResolution(_analogResolution); HwPWMx[i]->addPin(pin); HwPWMx[i]->writePin(pin, value); LOG_LV2("ANA", "took ownership of, and added pin %" PRIu32 " to, PWM %d", pin, i);