Permalink
Browse files

Fix sense of pru exec and path to gpio lines

  • Loading branch information...
root
root committed Jan 1, 2000
1 parent 9342d2b commit 816b3fd73b5965186d4c0f6480c65d3f80701d75
Showing with 4 additions and 3 deletions.
  1. +4 −3 pru.c
View
7 pru.c
@@ -114,7 +114,8 @@ pru_exec(
const char * const program
)
{
- if (!prussdrv_exec_program(pru->pru_num, program))
+ char * program_unconst = (char*)(uintptr_t) program;
+ if (prussdrv_exec_program(pru->pru_num, program_unconst) < 0)
die("%s failed", program);
}
@@ -154,7 +155,7 @@ pru_gpio(
char value_name[64];
snprintf(value_name, sizeof(value_name),
- "/sys/class/gpio%u/value",
+ "/sys/class/gpio/gpio%u/value",
pin_num
);
@@ -170,7 +171,7 @@ pru_gpio(
char dir_name[64];
snprintf(dir_name, sizeof(dir_name),
- "/sys/class/gpio%u/direction",
+ "/sys/class/gpio/gpio%u/direction",
pin_num
);

0 comments on commit 816b3fd

Please sign in to comment.