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
User avatar
Vitasam
Posts: 217
Joined: Thu Jun 01, 2017 9:51 am
Location: Finland
Contact:

DMCP_SDK API

Post by Vitasam » Fri Jun 15, 2018 4:52 pm

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?
Elektronika MK-61, Elektronika MK-52, HP15c LE, DM42 SN#16 FW 3.11

Thomas_ER
Posts: 64
Joined: Mon Jul 24, 2017 1:19 pm
Location: Germany

Re: DMCP_SDK API

Post by Thomas_ER » Mon Jun 25, 2018 10:16 am

bump
[ HP48/49/50/42S/WP34/HP Prime/ DM42 (#00185+00318) ]

User avatar
Walter
Posts: 818
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: DMCP_SDK API

Post by Walter » Thu Dec 06, 2018 9:12 pm

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!)
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

David
Posts: 14
Joined: Fri Apr 07, 2017 5:32 am

Re: DMCP_SDK API

Post by David » Mon Dec 17, 2018 11:40 am

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: 818
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: DMCP_SDK API

Post by Walter » Mon Dec 17, 2018 1:13 pm

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.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

User avatar
Vitasam
Posts: 217
Joined: Thu Jun 01, 2017 9:51 am
Location: Finland
Contact:

Re: DMCP_SDK API

Post by Vitasam » Mon Dec 17, 2018 2:31 pm

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
Elektronika MK-61, Elektronika MK-52, HP15c LE, DM42 SN#16 FW 3.11

Post Reply