fix pwm polarity

This commit is contained in:
hathach committed 2017-03-23 15:36:46 +07:00
1 parent 384a789def
commit a3afb48e7f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@ const char* dbg_ble_event_str(uint16_t evt_id)
return _gatts_evt_str[evt_id-BLE_GATTS_EVT_BASE];
else
{
sprintf(unknown_evt, "0x04X", evt_id);
sprintf(unknown_evt, "0x%04X", evt_id);
return unknown_evt;
}
}
+1 -1
View File
@@ -243,7 +243,7 @@ void analogWrite( uint32_t ulPin, uint32_t ulValue )
for (int i = 0; i < PWM_COUNT; i++) {
if (pwmChannelPins[i] == 0xFFFFFFFF || pwmChannelPins[i] == ulPin) {
pwmChannelPins[i] = ulPin;
pwmChannelSequence[i] = ulValue;
pwmChannelSequence[i] = bit(15) | ulValue;
NRF_PWM_Type* pwm = pwms[i];