File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
targets/TARGET_RENESAS/TARGET_RZ_A2XX Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,11 @@ void pwmout_period_us(pwmout_t *obj, int us)
166
166
pwmout_write (obj , obj -> duty );
167
167
}
168
168
169
+ int pwmout_read_period_us (pwmout_t * obj )
170
+ {
171
+ return obj -> pwm -> GTPR .LONG ;
172
+ }
173
+
169
174
void pwmout_pulsewidth (pwmout_t * obj , float seconds )
170
175
{
171
176
pwmout_pulsewidth_us (obj , seconds * 1000000.0f );
@@ -188,6 +193,14 @@ void pwmout_pulsewidth_us(pwmout_t *obj, int us)
188
193
pwmout_write (obj , value );
189
194
}
190
195
196
+ int pwmout_read_pulsewidth_us (pwmout_t * obj )
197
+ {
198
+ if (obj -> type == 0 ) {
199
+ return (float )obj -> pwm -> GTCCRC .LONG ;
200
+ }
201
+ return (float )obj -> pwm -> GTCCRE .LONG ;
202
+ }
203
+
191
204
const PinMap * pwmout_pinmap ()
192
205
{
193
206
return PinMap_PWM ;
You can’t perform that action at this time.
0 commit comments