Add baseAddr function to HwPWM instance
This allows for PWM configuration when direct register access is required.
This commit is contained in:
1 parent
8a3978666c
commit
0ea975e6e3
1 file changed
+6
@@ -68,6 +68,12 @@ class HardwarePWM
|
||||
|
||||
void setClockDiv(uint8_t div); // value is PWM_PRESCALER_PRESCALER_DIV_x, DIV1 is 16Mhz
|
||||
|
||||
// Direct access to peripheral base address
|
||||
NRF_PWM_Type * const baseAddr(void)
|
||||
{
|
||||
return _pwm;
|
||||
}
|
||||
|
||||
// Cooperative ownership sharing
|
||||
|
||||
// returns true ONLY when (1) no PWM channel has a pin, and (2) the owner token is nullptr
|
||||
|
||||
Reference in new issue
Block a user