Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow multitouch calibration to be uploaded even when there is no pro…

…x calibration
  • Loading branch information...
commit 3846d87462e0b6db77a50488cb285fe1413b0c77 1 parent ae18594
@planetbeing authored
Showing with 20 additions and 12 deletions.
  1. +20 −12 openiboot/actions.c
View
32 openiboot/actions.c
@@ -241,27 +241,18 @@ static void setup_wifi_tags()
params = tag_next(params); /* move pointer to next tag */
}
-static void setup_mt_tags()
+static void setup_prox_tag()
{
-#ifndef CONFIG_IPHONE
+#ifdef CONFIG_3G
uint8_t* prox_cal;
int prox_cal_size;
- uint8_t* cal;
- int cal_size;
-
prox_cal = syscfg_get_entry(SCFG_PxCl, &prox_cal_size);
if(!prox_cal)
{
return;
}
- cal = syscfg_get_entry(SCFG_MtCl, &cal_size);
- if(!cal)
- {
- return;
- }
-
params->u.mt_cal.size = prox_cal_size;
memcpy(params->u.mt_cal.data, prox_cal, prox_cal_size);
@@ -269,6 +260,22 @@ static void setup_mt_tags()
params->hdr.size = (sizeof(struct atag_header) + sizeof(struct atag_iphone_cal_data) + prox_cal_size + 4) >> 2;
params = tag_next(params); /* move pointer to next tag */
+ bufferPrintf("Proximity calibration data installed.\r\n");
+#endif
+}
+
+static void setup_mt_tag()
+{
+#ifndef CONFIG_IPHONE
+ uint8_t* cal;
+ int cal_size;
+
+ cal = syscfg_get_entry(SCFG_MtCl, &cal_size);
+ if(!cal)
+ {
+ return;
+ }
+
params->u.mt_cal.size = cal_size;
memcpy(params->u.mt_cal.data, cal, cal_size);
@@ -362,7 +369,8 @@ static void setup_tags(struct atag* parameters, const char* commandLine)
setup_initrd2_tag(INITRD_LOAD, ramdiskSize);
}
setup_cmdline_tag(commandLine);
- setup_mt_tags();
+ setup_prox_tag();
+ setup_mt_tag();
setup_wifi_tags();
#ifndef NO_HFS
setup_iphone_nand_tag();
Please sign in to comment.
Something went wrong with that request. Please try again.