Skip to content

Commit

Permalink
hello commit
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinkdoost committed Jan 27, 2016
1 parent 5721fbb commit 15d0040
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gpio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void period_function (unsigned long unused)
{
if(pwm==1){
value = 1;
gpio_set_value(RPI_GPIO_OUT, value);
gpio_set_value(GPIO_PWM_MAJOR, value);
mod_timer(& timer_duty,jiffies+ time_duty);
mod_timer(& timer_period,jiffies+ time_period);
}
Expand All @@ -120,7 +120,7 @@ static void duty_function (unsigned long unused)
{
if(pwm==1){
value = 0;
gpio_set_value(RPI_GPIO_OUT, value);
gpio_set_value(GPIO_PWM_MAJOR, value);
}
}

Expand Down Expand Up @@ -217,7 +217,7 @@ if ( var == 0 ) {

pwm = 1 - pwm;
printk("pwm %d",pwm);
gpio_direction_output(RPI_GPIO_OUT, pwm);
gpio_direction_output(GPIO_PWM_MAJOR, pwm);

time_duty = 50;
printk("arg %lu",time_duty);
Expand Down

0 comments on commit 15d0040

Please sign in to comment.