DMCP_SDK API

This is where developers can exchange ideas and ask questions relevant to the DM42 firmware.

Please note that Swiss Micros staff are unable to provide answers here as a general rule. This is intended as a community-driven forum.
Post Reply
Vitasam

DMCP_SDK API

Post 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?
Thomas_ER
Posts: 192
Joined: Mon Jul 24, 2017 3:19 pm
Location: Germany

Re: DMCP_SDK API

Post by Thomas_ER »

bump
[ HP48/49/50/42S/WP34/HP Prime/ DM42 (#00185+00318) ]
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: DMCP_SDK API

Post 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!)
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
David
Posts: 20
Joined: Fri Apr 07, 2017 7:32 am

Re: DMCP_SDK API

Post 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.
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: DMCP_SDK API

Post 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.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Vitasam

Re: DMCP_SDK API

Post 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
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: DMCP_SDK API

Post 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.
User avatar
ziggurat29
Posts: 83
Joined: Mon Apr 24, 2017 8:42 pm

Re: DMCP_SDK API

Post by ziggurat29 »

"Gentlemen, you can't fight in here! This is the War Room!"
Attachments
gentlemen-you-cant-fight-in-here-this-is-the-war-19437695.png
gentlemen-you-cant-fight-in-here-this-is-the-war-19437695.png (98.99 KiB) Viewed 9143 times
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: DMCP_SDK API

Post 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
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply