I've tested that code but it produces an error for me:
MURX: 4294967285
> config failed (failed executing Pru_Run instructions)
This is the code I used
#include <unistd.h>
#include "stdio.h"
#include "../c_wrapper/pruio.h"
int main(int argc, char **argv)
{
int n;
pruIo *io = pruio_new(PRUIO_DEF_ACTIVE, 0x98, 0, 1);
pruio_adc_setStep(io, 9, 4, 0, 0, 0); // step 9 for AIN-4
if (pruio_config(io, 0, 1 << 9, 6285, 0)){ // '1 << 9' -> step 9, '6285'
ns -> 159.1 kHz
printf("config failed (%s)\n", io->Errr);}
else{
pruio_rb_start(io);
for(n = 1; n <= 1000; n++){
printf("%u\n", io->DRam[0]);
sleep(1);
}
}
pruio_destroy(io);
return 0;
}
Greetings,
Nils Kohrs
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.