Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to create good software interface ?

Status
Not open for further replies.

jani12

Advanced Member level 4
Joined
Oct 30, 2014
Messages
108
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
2,536
Our embedded target board is based on Renesas RH850F1L Microcontroller. Our language is 'C'.
A software library creates a instance of this structure and provides me a pointer to this structure. What is a good application interface that can be used to provide d0.Fact and d1.Fact to application periodically?
Code:
typedef struct {
               unsigned short  count;
               unsigned short  hold;
               unsigned char    Fact;
} LtRXData;

typedef struct {
   unsigned short  speed;
   LtRXData  d0;
   LtRXData  d1;
} LtRData;
A software library creates instance of this structure and provides me pointer to the structure. What is a good application interface that can be used to provide d0_s1.Fact, d0_s2.Fact, d0_s3.Fact, d1_s1.Fact, d1_s2.Fact, and d1_s3.Fact to application periodically?
Code:
typedef struct {
   unsigned short  count;
   unsigned short  hold;
   unsigned char   Fact;
} LtSXData;

typedef struct {
   unsigned short speed;
   LtSXData  d0_s1;
   LtSXData  d0_s2;
   LtSXData  d0_s3;
   LtSXData  d1_s1;
   LtSXData  d1_s2;
   LtSXData  d1_s3;
} LtSData;
 
Last edited by a moderator:

you can search for DMA direct memory access. or may be you can use message queue.
 

Can't undestand what both of you means. How DMA is related to s/w interface and what for you wanna use the structures.
 

I also don't understand how DMA can be used to create software interface implementation.

I ended up using arrays. Application software instantiates array of structure. They pass me pointer to first element of the array and I use it to populate the array.

I would be interested to know how queue could be used to achieve this.

Structure is used because when system is running, many related data are stored.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top