Ejemplo n.º 1
0
static void
servo_motor_close(struct sol_flow_node *node, void *data)
{
    struct servo_motor_data *mdata = data;

    sol_pwm_close(mdata->pwm);
}
Ejemplo n.º 2
0
SOL_API struct sol_pwm *
sol_pwm_open(int device, int channel, const struct sol_pwm_config *config)
{
    struct sol_pwm *pwm;

    SOL_LOG_INTERNAL_INIT_ONCE;

    pwm = sol_pwm_open_raw(device, channel, config);
#ifdef HAVE_PIN_MUX
    if (pwm && sol_pin_mux_setup_pwm(device, channel)) {
        SOL_WRN("Pin Multiplexer Recipe for pwm device=%d channel=%d found, \
            but couldn't be applied.", device, channel);
        sol_pwm_close(pwm);
        pwm = NULL;
    }