Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. 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

Member
/* 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? */
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? */
typed 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;
 
Hello jani12 ,

Please reformat your code (including proper indentation) and use the code tags under the "Insert" menu. Otherwise, your code is very difficult to read.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top