Page 1 of 1

DMCP_SDK API

Posted: Fri Jun 15, 2018 6:52 pm
by Vitasam
Hello,

is dmcp.h an official API of DMCP_SDK? If so it will be really good to have something more comprehensive (in formats of header file comments or Doxygen generated).

Looking in to HelloWorld code:

Code: Select all

  lcd_clear_buf();
  lcd_writeClr(t24);
  lcd_putsR(t24, "TEST PROGRAM");
  lcd_putsAt(t24, 4, "Hello World!");
What is t24?

Code: Select all

#define t24             (sdb.pds_t24)
What does lcd_clear_buf() do?

Code: Select all

// Drawing Prototypes
void lcd_clear_buf();
What does lcd_writeClr() function (a pointer in to the proprietary binary library) do?

Code: Select all

#define lcd_writeClr (*(typeof(lcd_writeClr)*)(LIBRARY_FN_BASE+100))
Why some of "API" functions are in fact macros?

Code: Select all

#define lcd_putsAt(ds, ln, str)   do { lcd_setLine(ds, ln); lcd_puts(ds,str); } while(0)
What user should do in order to write string in to position of row=5, column=8 of LCD?

Re: DMCP_SDK API

Posted: Mon Jun 25, 2018 12:16 pm
by Thomas_ER
bump

Re: DMCP_SDK API

Posted: Thu Dec 06, 2018 10:12 pm
by Walter
To Michael & David:

Would you please care for answering the questions above after almost 6 months? :shock:

(I admit I needed help for decoding API - it's available in the net. Spoiler: it's not concerning bees!)

Re: DMCP_SDK API

Posted: Mon Dec 17, 2018 12:40 pm
by David
Sorry for not fulfilling your expectations, but we are not able to constantly monitor and answer forum questions. Even if we try at least to sample it time to time the truth is we answer forum questions rather incidentally. The reasonable step is to write email to us directly if you are not able to get answer in forum in some meaningful time.

I'm afraid my answer to your question isn't possibly going to completely satisfy you anyway. Unfortunately, we were forced (by external forces we weren't able to influence) to massively speed up the release of DMCP system interface, therefore it isn't in the state we would like it and the documentation is missing. We wasted so much effort for this abrupt change of our plans that it isn't even clear how soon even slight SDK interface description could be available. That is also reason for NOMAS state of the SDK.
So, we put it as kind of bonus for people able to figure out how that could be used. And supported that effort by providing more elaborated example code https://github.com/swissmicros/SDKdemo (but not so tangled as DM42PGM itself). This SDKdemo could be actually taken as the starting point for SDK use. The basic structure of code for power management, LCD, keyboard and menu usage could be seen there and reused in development.
The https://github.com/swissmicros/DMCP_SDK is rather useful just for build environment test and not as a base for actual development.
Despite the NOMAS state of the SDK our general attitude is to answer emails related to the SDK and help as long as our other load allows.

Now, after explanation of the background the answer to your initial questions is obvious ... look at more examples of usage of those functions and the functionality should become clear, look at declaration of variables and it should become clear what it means (like t24 is pointer to disp_stat_t). And answer to "What user should do in order to write string in to position of row=5, column=8 of LCD?" - you could use fixed font and calculate appropriate display coordinates so it reflects your idea of row/col on LCD.

Re: DMCP_SDK API

Posted: Mon Dec 17, 2018 2:13 pm
by Walter
David, dobry den!

Thank you for eventually answering this question. I'm sure the original poster will appreciate it.

By the way: How to get rid of a problem? Shoot the messenger!
And there's a significant difference between responding after 6 months and "constantly monitor and answer forum questions" IMHO. But anyway, thank you for reacting! We, the common forum members, are always grateful to learn something about facts and background information which may be self-explanatory for you but are not for us. Else we won't ask.

Re: DMCP_SDK API

Posted: Mon Dec 17, 2018 3:31 pm
by Vitasam
Hi David,

thanks for answering questions. Definitely it is possible to get an idea how does DMCP platform work after spending some time with searching through the code. For example void lcd_writeClr(disp_stat_t * ds) - my educated guess that this function does clean the whole LCD area, right?

By the way, is dmcp.h source file from your product software as well? If so how do you internally remember which corner of the display is a position x=0, y=0 ? ;)

Code: Select all

  int16_t x, y;      // Current x,y position
...
} disp_stat_t;
Please, don't take personally my nagging :) I just want this project to develop and get more contributors and supporters

Re: DMCP_SDK API

Posted: Mon Dec 24, 2018 12:50 am
by Thomas Okken
David wrote:
Mon Dec 17, 2018 12:40 pm
Unfortunately, we were forced (by external forces we weren't able to influence) to massively speed up the release of DMCP system interface
The choice to release the DM42 in a non-GPL-compliant state was entirely yours. The DMCP interface should have been available the moment you started selling beta units. Trying to hide behind "external forces you weren't able to influence" is despicable.

Re: DMCP_SDK API

Posted: Tue Dec 25, 2018 12:25 am
by ziggurat29
"Gentlemen, you can't fight in here! This is the War Room!"

Re: DMCP_SDK API

Posted: Tue Dec 25, 2018 1:05 pm
by Walter
ziggurat29 wrote:
Tue Dec 25, 2018 12:25 am
"Gentlemen, you can't fight in here! This is the War Room!"
Oh yeah, one of Stanley Kubrick's masterpieces! :D