This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_motor_init_freq

Function Documentation

int rc_motor_init_freq(int pwm_frequency_hz)

Just like rc_motor_init but allows the user to set the pwm frequency.

RC_MOTOR_DEFAULT_PWM_FREQ is a good frequency to start at.

Note, if the user is optionally using the rc_motor_standby functionality they should be aware that rc_motor_init starts standby mode in a disabled state so it is not necessary for the majority of users who are not interested in standby mode.


pwm_frequency_hz[in] The pwm frequency in hz


0 on success, -1 on failure which is usually due to lack of user permissions to access the gpio and pwm systems.