Il giorno giovedì 24 settembre 2015 19:57:45 UTC+2, TJF ha scritto:
Hi Valeria!
I'm working C language directly on the bbb from PuTTy, ...
>
That's a big step in the right direction ... (consider a replacement for C
language?)
You mean, FreeBasic? :D:D
Am Donnerstag, 24. September 2015 05:38:23 UTC+2 schrieb hllpc:
>>
>> I'm new to embedded system and programmation in general, I wouldn't be
>> able to start from 'scratch' for sure!
>> I'm still trying to understand why the constructor PruIo::PruIo() is
>> defined differently in pruio.h
>> pruIo* pruio_new(uint16 Act, uint8 Av, uint32 OpD, uint8 SaD);
>> and in pruio_c_wrapper.h
>> PruIo* pruio_new(uint8 Av, uint32 OpD, uint8 SaD, uint8 Pru);
>> and which one should I use. I get that pruIo and PruIo are two different
>> struct, but that's it.
>> R
>>
>
> You still mixed up versions:
>
> - pruio_c_wrapper.h is from version 0.0.2, it's removed in version 0.2
> (which you should use)
> - you must use #include "../c_wrapper/pruio.h" (as in all the examples)
> - there's just one constructor: pruIo* pruio_new()
> - you may optional also #include "../c_wrapper/pruio_pins.h"
> (predefined macros for convenience)
>
> Note: In version 0.2 PruIo (capital P) isn't a struct, It's a pointer to a
> FreeBASIC UDT (= User Defined Type) -- a class that cannot be used directly
> from C source due to missing features in that language.
>
>
> BR
>
>
Thank's for the clarification, the 'funny' thing was that in my pc I
dawnloaded the new version of libpruio for reference, but in the bbb I
installed the old one.
Can I ask something else about a function of the library? I've troubles
understand how pruio_config(io, Samp, Mask,Tmr, Mds) work in rb mode, in
particular the mask parameter.
Let's say that I want to sample 2 channel, AIN-1 and AIN-2 (Mask =0b110),
Samp is the buffer size in term of sampling set so 2(channel)x(sample per
channel that I want to 'collect' in the buffer, say 50), Tmr =1e6 ns and
Mds= 4.
The Value array will be something like:
Value[0] | 1. sample AIN-1
Value[1] | 1. sample AIN-2
Value[2] | 2. sample AIN-1
Value[3] | 2. sample AIN-2
...
Value[98] | 50. sample AIN-1
Value[99] | 50. sample AIN-2
What's the difference between this and Single mode? or which I have:
Value[1] | sample AIN-1
Value[2] | sample AIN-2
In this case Samp=1 as the comments in pruio.bas says or 50 (samples per
channel that I want to 'collect' in the buffer) and then I'll have 25
samples per channel?
--
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.