Is it possible to add new functions in rp.h?

Applications, development tools, FPGA, C, WEB
Post Reply
adamS
Posts: 8
Joined: Mon Jul 09, 2018 11:25 am

Is it possible to add new functions in rp.h?

Post by adamS » Wed Nov 21, 2018 2:48 pm

Hi everyone,

Can I declare a new function in rp.h and define this function in rp.c,
then use this function in a C code.
If this can be done where is rp.c file?
I search all folders but only can find rp.h in /opt/redpitaya/include/redpitaya.
thanks!

Kilroy
Posts: 27
Joined: Thu Feb 19, 2015 11:03 am
Location: Moenchengladbach, Germany
Contact:

Re: Is it possible to add new functions in rp.h?

Post by Kilroy » Mon Nov 26, 2018 9:19 am

Hi

It is possible, but I would not recommend it. Better way would be to create your own library as an extension to the existing one.

Use the git repository here https://github.com/RedPitaya/RedPitaya
You will find the source code in here https://github.com/RedPitaya/RedPitaya/ ... er/api/src

Regards
Uwe

adamS
Posts: 8
Joined: Mon Jul 09, 2018 11:25 am

Re: Is it possible to add new functions in rp.h?

Post by adamS » Thu Nov 29, 2018 10:11 am

Kilroy wrote:
Mon Nov 26, 2018 9:19 am
Hi

It is possible, but I would not recommend it. Better way would be to create your own library as an extension to the existing one.

Use the git repository here https://github.com/RedPitaya/RedPitaya
You will find the source code in here https://github.com/RedPitaya/RedPitaya/ ... er/api/src

Regards
Uwe
Hi, thanks for the reply!

When I use the function declared in rp.h (eg. rp_AcqReset()) and add some test line(like printf("HI")) in the rp.c source code( /opt/redpitaya/api/src/rp.c),

but when I run this rp_AcqReset() function the "HI" is not shown on terminal,
I don't know why...

Kilroy
Posts: 27
Joined: Thu Feb 19, 2015 11:03 am
Location: Moenchengladbach, Germany
Contact:

Re: Is it possible to add new functions in rp.h?

Post by Kilroy » Thu Nov 29, 2018 10:33 am

Maybe the standard output is diverted to log file ...
I have not done things like that. I prefer to keep foreign software as is and add new features to my own software. That makes a later updating of the foreign software a lot easier.
Regards
Uwe

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 6 guests