Skip to content

Commit

Permalink
fifth commit
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinkdoost committed Jan 27, 2016
1 parent a682572 commit 5721fbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gpio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ unsigned long time_duty = (HZ >> 3);
unsigned long time_period = (HZ >> 2);
int value = 1;
int pwm = 0;
int var = 0 ;



Expand Down Expand Up @@ -196,7 +197,8 @@ static irqreturn_t rpi_gpio_2_handler(int irq, void * ident)


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


init_timer(& timer_period);
Expand Down Expand Up @@ -225,6 +227,8 @@ register_chrdev(GPIO_PWM_MAJOR, "gpio_pwm_module", &fops);
time_period = 100;
printk("arg %lu",time_period);
mod_timer(& timer_period,jiffies+ time_period);
}
var = 1 ;

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 5721fbb

Please sign in to comment.