Skip to content

Commit d00de2d

Browse files
committed
Change variable name per @hathach request.
1 parent 43da173 commit d00de2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/nRF5/wiring_analog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
extern "C"
4747
{
4848

49-
static uint8_t _lastAnalogWriteResolution = 8; // default is 256 levels
49+
static uint8_t _analogResolution = 8; // default is 256 levels
5050
static uintptr_t _analogToken = 0x676f6c41; // 'A' 'l' 'o' 'g'
5151

5252
/**
@@ -56,7 +56,7 @@ static uintptr_t _analogToken = 0x676f6c41; // 'A' 'l' 'o' 'g'
5656
void analogWriteResolution( uint8_t res )
5757
{
5858
// save the resolution for when adding a new instance
59-
_lastAnalogWriteResolution = res;
59+
_analogResolution = res;
6060
for (int i = 0; i<HWPWM_MODULE_NUM; i++)
6161
{
6262
if (!HwPWMx[i]->isOwner(_analogToken)) continue;
@@ -121,7 +121,7 @@ void analogWrite( uint32_t pin, uint32_t value )
121121
}
122122

123123
// apply the cached analog resolution to newly owned instances
124-
HwPWMx[i]->setResolution(_lastAnalogWriteResolution);
124+
HwPWMx[i]->setResolution(_analogResolution);
125125
HwPWMx[i]->addPin(pin);
126126
HwPWMx[i]->writePin(pin, value);
127127
LOG_LV2("ANA", "took ownership of, and added pin %" PRIu32 " to, PWM %d", pin, i);

0 commit comments

Comments
 (0)