Hello Nori Shinozaki,
Unfortunately we do not have a document explaining the code. The only recommendation we can provide is to review the code in order to understand what each of the definitions represent.
For example, EINK_WAIT_MODE_xxx is used in the followed code, so we can understand it tells the driver to wait for the EINK operation to be complete or not.
+ if((updatemode & EINK_WAIT_MODE_MASK) == EINK_WAIT_MODE_NOWAIT)
+ wait_for_complete = false;
+ else if((updatemode & EINK_WAIT_MODE_MASK) == EINK_WAIT_MODE_WAIT)
+ wait_for_complete = true;
+ else
+ LOGI("wait_for_complete wrong\n");
+
...
+ if (wait_for_complete) {
+ /* Get unique marker value */
+ upd_data.update_marker = marker_val++;
+ } else {
+ upd_data.update_marker = 0;
+ }
+
+ retval = ioctl(fb_dev, MXCFB_SEND_UPDATE, &upd_data);
+ while (retval < 0) {
+ /* We have limited memory available for updates, so wait and
+ * then try again after some updates have completed */
+ usleep(300000);
+ retval = ioctl(fb_dev, MXCFB_SEND_UPDATE, &upd_data);
+ LOGI("MXCFB_SEND_UPDATE retval = 0x%x try again maybe", retval);
+ }
I hope this helps!