Skip to content

Commit

Permalink
hello 2 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinkdoost committed Jan 27, 2016
1 parent fd448fa commit da78f30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gpio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ var++;
printk("valeur de var est %d \n", var);

/*****************/
if ( var == 1 ) {
if ( var == 2 ) {
register_chrdev(GPIO_PWM_MAJOR, "gpio_pwm_module", &fops);

init_timer(& timer_period);
Expand Down Expand Up @@ -227,7 +227,13 @@ if ( var == 1 ) {
printk("arg %lu",time_period);
mod_timer(& timer_period,jiffies+ time_period);
}
if ( var == 3 ) {
pwm = 1 - pwm;
printk("pwm %d",pwm);
gpio_direction_output(GPIO_PWM_MAJOR, pwm);
var = 1 ;

}

return IRQ_HANDLED;
}
Expand Down

0 comments on commit da78f30

Please sign in to comment.