If you're stuck until you get the data, it won't make any difference.
if (cmd->resp_type & MMC_RSP_136)
{
cmd->response[0] = readl(&priv->reg->resp3);
cmd->response[1] = readl(&priv->reg->resp2);
cmd->response[2] = readl(&priv->reg->resp1);
cmd->response[3] = readl(&priv->reg->resp0);
debug("mmc resp 0x%08x 0x%08x 0x%08x 0x%08x\n", cmd->response[3], cmd->response[2], cmd->response[1], cmd->response[0]);
}
else
{
cmd->response[0] = readl(&priv->reg->resp0);
debug("mmc resp 0x%08x\n", cmd->response[0]);
}
//Send some initialization commands until the card is ready?????
do
{
//Send application specific command follows command to the card
command.cmdidx = 55;
command.cmdarg = 0;
command.resp_type = 5;
sd_card_send_command(&command, 0);
//Send host capacity support information command
command.cmdidx = 41;
command.cmdarg = 0x40FF8000; //Need to figure out these settings
command.resp_type = 7;
result = sd_card_send_command(&command, 0);
//0 means still initializing
} while((command.response[3] & 0x80000000) == 0);
cmd->response[0] = puVar6[8];
cmd->response[1] = puVar6[9];
if ((cmd->resp_type & 2) != 0)
{
cmd->response[2] = puVar6[10];
cmd->response[3] = puVar6[11];
}
Hello, is it me you're looking for?
but that probably is to expensive
if (uVar2 < 0x50)
{
cVar1 = *PTR_DAT_80022bb8; //0x80192f02
while (cVar1 != '\0') //Wait for touch release
{
tp_i2c_read_status();
cVar1 = *puVar3;
}
wait_for_touch_release();
return 1; //Return button touched
}
void wait_for_touch_release(void)
{
undefined *puVar1;
tp_i2c_read_status();
puVar1 = PTR_DAT_8002b120; //0x80192f02
if (*PTR_DAT_8002b120 == '\0') //0 means no touch
{
return;
}
do
{
tp_i2c_read_status();
} while (*puVar1 != '\0'); //not 0 means touch
return;
}
void tp_i2c_wait_for_touch_release(void)
{
//Wait until touch is released
while(havetouch)
{
//Read the touch panel status
tp_i2c_read_status();
}
}
If they opened the code and offered it as a platform similar to some of the phone projects there would be a lot of opportunities as display devices. I would really like a stand alone low frequency FFT analyzer. The current FFT in it is borderline useless. I suspect there are other special cases that do not need extended bandwidth.
/*-----------------------------------------------------------------------*/
/* Read File */
/*-----------------------------------------------------------------------*/
FRESULT f_read (
FIL* fp, /* Open file to be read */
void* buff, /* Data buffer to store the read data */
UINT btr, /* Number of bytes to read */
UINT* br /* Number of bytes read */
)
{
FRESULT res;
FATFS *fs;
DWORD clst;
LBA_t sect;
FSIZE_t remain;
UINT rcnt, cc, csect;
BYTE *rbuff = (BYTE*)buff;
*br = 0; /* Clear read byte counter */
res = validate(&fp->obj, &fs); /* Check validity of the file object */
if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res); /* Check validity */
if (!(fp->flag & FA_READ)) LEAVE_FF(fs, FR_DENIED); /* Check access mode */
remain = fp->obj.objsize - fp->fptr;
if (btr > remain) btr = (UINT)remain; /* Truncate btr by remaining bytes */
for ( ; btr > 0; btr -= rcnt, *br += rcnt, rbuff += rcnt, fp->fptr += rcnt) { /* Repeat until btr bytes read */
if (fp->fptr % SS(fs) == 0) { /* On the sector boundary? */
csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1)); /* Sector offset in the cluster */
if (csect == 0) { /* On the cluster boundary? */
if (fp->fptr == 0) { /* On the top of the file? */
clst = fp->obj.sclust; /* Follow cluster chain from the origin */
} else { /* Middle or end of the file */
#if FF_USE_FASTSEEK
if (fp->cltbl) {
clst = clmt_clust(fp, fp->fptr); /* Get cluster# from the CLMT */
} else
#endif
{
clst = get_fat(&fp->obj, fp->clust); /* Follow cluster chain on the FAT */
}
}
if (clst < 2) ABORT(fs, FR_INT_ERR);
if (clst == 0xFFFFFFFF) ABORT(fs, FR_DISK_ERR);
fp->clust = clst; /* Update current cluster */
}
sect = clst2sect(fs, fp->clust); /* Get current sector */
if (sect == 0) ABORT(fs, FR_INT_ERR);
sect += csect;
cc = btr / SS(fs); /* When remaining bytes >= sector size, */
if (cc > 0) { /* Read maximum contiguous sectors directly */
if (csect + cc > fs->csize) { /* Clip at cluster boundary */
cc = fs->csize - csect;
}
if (disk_read(fs->pdrv, rbuff, sect, cc) != RES_OK) ABORT(fs, FR_DISK_ERR);
#if !FF_FS_READONLY && FF_FS_MINIMIZE <= 2 /* Replace one of the read sectors with cached data if it contains a dirty sector */
#if FF_FS_TINY
if (fs->wflag && fs->winsect - sect < cc) {
memcpy(rbuff + ((fs->winsect - sect) * SS(fs)), fs->win, SS(fs));
}
#else
if ((fp->flag & FA_DIRTY) && fp->sect - sect < cc) {
memcpy(rbuff + ((fp->sect - sect) * SS(fs)), fp->buf, SS(fs));
}
#endif
#endif
rcnt = SS(fs) * cc; /* Number of bytes transferred */
continue;
}
#if !FF_FS_TINY
if (fp->sect != sect) { /* Load data sector if not in cache */
#if !FF_FS_READONLY
if (fp->flag & FA_DIRTY) { /* Write-back dirty sector cache */
if (disk_write(fs->pdrv, fp->buf, fp->sect, 1) != RES_OK) ABORT(fs, FR_DISK_ERR);
fp->flag &= (BYTE)~FA_DIRTY;
}
#endif
if (disk_read(fs->pdrv, fp->buf, sect, 1) != RES_OK) ABORT(fs, FR_DISK_ERR); /* Fill sector cache */
}
#endif
fp->sect = sect;
}
rcnt = SS(fs) - (UINT)fp->fptr % SS(fs); /* Number of bytes remains in the sector */
if (rcnt > btr) rcnt = btr; /* Clip it by btr if needed */
#if FF_FS_TINY
if (move_window(fs, fp->sect) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Move sector window */
memcpy(rbuff, fs->win + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
#else
memcpy(rbuff, fp->buf + fp->fptr % SS(fs), rcnt); /* Extract partial sector */
#endif
}
LEAVE_FF(fs, FR_OK);
}
//----------------------------------------------------------------------------------------------------------------------------------
//Read File
//
//Return:
// A FRESULT value
//
//Input:
// Pointer to the file structure
// Buffer to store the read data
// Number of bytes to read
// Pointer to a varialble to return the number of bytes read in
//
//----------------------------------------------------------------------------------------------------------------------------------
FRESULT f_read(FIL* fp, void* buff, UINT btr, UINT* br)
{
FRESULT res;
FATFS *fs;
DWORD clst;
LBA_t sect;
FSIZE_t remain;
UINT rcnt, cc, csect;
BYTE *rbuff = (BYTE*)buff;
//Check if the input parameters are valid
if(!fp || !buff)
return(FR_INVALID_OBJECT);
//Clear read byte counter when given
if(br)
*br = 0;
//Check validity of the file object
res = validate(&fp->obj, &fs);
//Check validity
if(res != FR_OK || (res = (FRESULT)fp->err) != FR_OK)
LEAVE_FF(fs, res);
//Check access mode
if(!(fp->flag & FA_READ))
LEAVE_FF(fs, FR_DENIED);
//Calculate how many bytes are left in the file
remain = fp->obj.objsize - fp->fptr;
//Truncate btr by remaining bytes
if(btr > remain)
btr = (UINT)remain;
//Repeat until btr bytes read
while(btr > 0)
{
//On the sector boundary?
if((fp->fptr % SS(fs)) == 0)
{
//Sector offset in the cluster
csect = (UINT)(fp->fptr / SS(fs) & (fs->csize - 1));
//On the cluster boundary?
if(csect == 0)
{
//On the top of the file?
if(fp->fptr == 0)
{
//Follow cluster chain from the origin
clst = fp->obj.sclust;
}
//Middle or end of the file
else
{
#if FF_USE_FASTSEEK
if(fp->cltbl)
{
//Get cluster# from the CLMT
clst = clmt_clust(fp, fp->fptr);
}
else
#endif
{
//Follow cluster chain on the FAT
clst = get_fat(&fp->obj, fp->clust);
}
}
//cluster in wrong place??
if(clst < 2)
ABORT(fs, FR_INT_ERR);
//Cluster out of range??
if(clst == 0xFFFFFFFF)
ABORT(fs, FR_DISK_ERR);
//Update current cluster
fp->clust = clst;
}
//Get current sector
sect = clst2sect(fs, fp->clust);
//Invalid sector??
if(sect == 0)
ABORT(fs, FR_INT_ERR);
sect += csect;
cc = btr / SS(fs);
//When remaining bytes >= sector size,
if(cc > 0)
{
//Read maximum contiguous sectors directly
//Clip at cluster boundary
if((csect + cc) > fs->csize)
{
cc = fs->csize - csect;
}
if(disk_read(fs->pdrv, rbuff, sect, cc) != RES_OK)
ABORT(fs, FR_DISK_ERR);
#if !FF_FS_READONLY && FF_FS_MINIMIZE <= 2
//Replace one of the read sectors with cached data if it contains a dirty sector
#if FF_FS_TINY
if(fs->wflag && ((fs->winsect - sect) < cc))
{
memcpy((rbuff + ((fs->winsect - sect) * SS(fs))), fs->win, SS(fs));
}
#else
if((fp->flag & FA_DIRTY) && ((fp->sect - sect) < cc))
{
memcpy((rbuff + ((fp->sect - sect) * SS(fs))), fp->buf, SS(fs));
}
#endif
#endif
//Number of bytes transferred
rcnt = SS(fs) * cc;
//Continue after update of counters and pointers. Original code uses for loop and continue
goto read_update;
}
#if !FF_FS_TINY
//Load data sector if not in cache
if(fp->sect != sect)
{
#if !FF_FS_READONLY
if(fp->flag & FA_DIRTY)
{
//Write-back dirty sector cache
if(disk_write(fs->pdrv, fp->buf, fp->sect, 1) != RES_OK)
ABORT(fs, FR_DISK_ERR);
fp->flag &= (BYTE)~FA_DIRTY;
}
#endif
//Fill sector cache
if(disk_read(fs->pdrv, fp->buf, sect, 1) != RES_OK)
ABORT(fs, FR_DISK_ERR);
}
#endif
fp->sect = sect;
}
//Number of bytes remains in the sector
rcnt = SS(fs) - (UINT)fp->fptr % SS(fs);
//Clip it by btr if needed
if(rcnt > btr)
rcnt = btr;
#if FF_FS_TINY
//Move sector window
if(move_window(fs, fp->sect) != FR_OK)
ABORT(fs, FR_DISK_ERR);
//Extract partial sector
memcpy(rbuff, (fs->win + (fp->fptr % SS(fs))), rcnt);
#else
//Extract partial sector
memcpy(rbuff, (fp->buf + (fp->fptr % SS(fs))), rcnt);
#endif
//Update counters and pointers
read_update:
btr -= rcnt;
rbuff += rcnt;
fp->fptr += rcnt;
//Return bytes read, only when variable is given
if(br)
*br += rcnt;
}
LEAVE_FF(fs, FR_OK);
}
//----------------------------------------------------------------------------------------------------------------------------------
//Data is saved as shorts.
*(ushort *)buffer = (ushort)pbVar2[0x3a]; //run mode
*(ushort *)((int)buffer + 2) = (ushort)*pbVar2; //channel 1 enable
*(ushort *)((int)buffer + 4) = (ushort)pbVar2[3]; //volts/div
*(ushort *)((int)buffer + 6) = (ushort)pbVar2[4]; //fft enable
*(ushort *)((int)buffer + 8) = (ushort)pbVar2[1]; //coupling
*(ushort *)((int)buffer + 10) = (ushort)pbVar2[2]; //magnification
*(ushort *)((int)buffer + 0xc) = (ushort)pbVar2[0xc]; //channel 2 enable
*(ushort *)((int)buffer + 0xe) = (ushort)pbVar2[0xf]; //volt/div
*(ushort *)((int)buffer + 0x10) = (ushort)pbVar2[0x10]; //fft enable
*(ushort *)((int)buffer + 0x12) = (ushort)pbVar2[0xd]; //coupling
*(ushort *)((int)buffer + 0x14) = (ushort)pbVar2[0xe]; //magnification
*(ushort *)((int)buffer + 0x16) = (ushort)pbVar2[10]; //time base setting
*(ushort *)((int)buffer + 0x18) = (ushort)pbVar2[0x16]; //move speed
*(ushort *)((int)buffer + 0x1a) = (ushort)pbVar2[0x21]; //trigger mode
*(ushort *)((int)buffer + 0x1c) = (ushort)pbVar2[0x22]; //trigger edge
*(ushort *)((int)buffer + 0x1e) = (ushort)pbVar2[0x23]; //trigger channel
*(ushort *)((int)buffer + 0x20) = (ushort)pbVar2[0x38]; //battery charge level. Is used to display the state of when picture or waveform was taken
*(ushort *)((int)buffer + 0x22) = (ushort)pbVar2[0x42]; //right menu mode
*(ushort *)((int)buffer + 0x24) = (ushort)pbVar2[0x18]; //triggerflag2
*(ushort *)((int)buffer + 0x26) = (ushort)pbVar2[0x17]; //triggerflag1
*(undefined2 *)((int)buffer + 0x28) = *(undefined2 *)(pbVar2 + 0x1a); //disp_x_start.
puVar10 = PTR_DAT_80002024; //0x80192ece
iVar21 = DAT_8000201c; //0x80361378
if (pbVar2[10] < 9) //time base setting. Long time base values 50S - 100mS
{
sVar4 = *(short *)PTR_DAT_80002014 + -1; //0x80192eaa (disp_xpos)
}
else //short time base settings. 50mS - 10nS
{
sVar4 = *(short *)(pbVar2 + 0x1c); //disp_sample_count
}
*(short *)((int)buffer + 0x2a) = sVar4; //time base dependent save of sample count info
iVar25 = DAT_80002020; //0x801FA24C base address of measurement settings
puVar30 = (ushort *)((int)buffer + 0x12e); //index into the buffer
*(undefined2 *)((int)buffer + 0x2c) = *(undefined2 *)PTR_DAT_80002018; //0x80192ec4 State flag for getting start+end in sample buffers???
pbVar15 = (byte *)(iVar25 + -1); //0x801FA24B
sVar4 = 0xc;
*(undefined2 *)((int)buffer + 0x2e) = *(undefined2 *)puVar10; //0x80192ece
*(undefined2 *)((int)buffer + 0x30) = *(undefined2 *)PTR_DAT_80002028; //0x80192ebc
*(undefined2 *)((int)buffer + 0x32) = *(undefined2 *)PTR_DAT_8000202c; //0x80192ebe
*(ushort *)((int)buffer + 0x34) = (ushort)pbVar2[0xb]; //copy of time base settings
*(ushort *)((int)buffer + 0x36) = (ushort)pbVar2[0x43]; //view mode
*(undefined2 *)((int)buffer + 0x50) = *(undefined2 *)(pbVar2 + 0x24); //trigger pos on screen
*(undefined2 *)((int)buffer + 0x52) = *(undefined2 *)(pbVar2 + 0x26); //trigger level screen offset
*(undefined2 *)((int)buffer + 0x54) = *(undefined2 *)(pbVar2 + 6); //channel 1 trace offset
*(undefined2 *)((int)buffer + 0x56) = *(undefined2 *)(pbVar2 + 0x12); //channel 2 trace offset
*(ushort *)((int)buffer + 0x78) = (ushort)*(byte *)(iVar21 + 2); //screen brightness
*(ushort *)((int)buffer + 0x7a) = (ushort)*(byte *)(iVar21 + 3); //grid brightness
*(ushort *)((int)buffer + 0x7c) = (ushort)*(byte *)(iVar21 + 4); //always trigger 50%
*(ushort *)((int)buffer + 0x7e) = (ushort)*(byte *)(iVar21 + 7); //x-y display mode
//measurements enable channel 1
*(ushort *)((int)buffer + 0xa0) = (ushort)*(byte *)(iVar25 + 0x100); //vmax
*(ushort *)((int)buffer + 0xa2) = (ushort)*(byte *)(iVar25 + 0x112); //vmin
*(ushort *)((int)buffer + 0xa4) = (ushort)*(byte *)(iVar25 + 0x122);
*(ushort *)((int)buffer + 0xa6) = (ushort)*(byte *)(iVar25 + 0x132);
*(ushort *)((int)buffer + 0xa8) = (ushort)*(byte *)(iVar25 + 0x142);
*(ushort *)((int)buffer + 0xaa) = (ushort)*(byte *)(iVar25 + 0x152);
*(ushort *)((int)buffer + 0xac) = (ushort)*(byte *)(iVar25 + 0x162);
*(ushort *)((int)buffer + 0xae) = (ushort)*(byte *)(iVar25 + 0x172);
*(ushort *)((int)buffer + 0xb0) = (ushort)*(byte *)(iVar25 + 0x182);
*(ushort *)((int)buffer + 0xb2) = (ushort)*(byte *)(iVar25 + 0x192);
*(ushort *)((int)buffer + 0xb4) = (ushort)*(byte *)(iVar25 + 0x1a2);
*(ushort *)((int)buffer + 0xb6) = (ushort)*(byte *)(iVar25 + 0x1b2); //duty-
//measurements enable channel 2
*(ushort *)((int)buffer + 0xb8) = (ushort)*(byte *)(iVar25 + 0x1c2); //vmax
*(ushort *)((int)buffer + 0xba) = (ushort)*(byte *)(iVar25 + 0x1d2);
*(ushort *)((int)buffer + 0xbc) = (ushort)*(byte *)(iVar25 + 0x1e2);
*(ushort *)((int)buffer + 0xbe) = (ushort)*(byte *)(iVar25 + 0x1f2);
*(ushort *)((int)buffer + 0xc0) = (ushort)*(byte *)(iVar25 + 0x202);
*(ushort *)((int)buffer + 0xc2) = (ushort)*(byte *)(iVar25 + 0x212);
*(ushort *)((int)buffer + 0xc4) = (ushort)*(byte *)(iVar25 + 0x232);
*(ushort *)((int)buffer + 0xc6) = (ushort)*(byte *)(iVar25 + 0x242);
*(ushort *)((int)buffer + 200) = (ushort)*(byte *)(iVar25 + 0x252);
*(ushort *)((int)buffer + 0xca) = (ushort)*(byte *)(iVar25 + 0x262);
*(ushort *)((int)buffer + 0xcc) = (ushort)*(byte *)(iVar25 + 0x272);
*(ushort *)((int)buffer + 0xce) = (ushort)*(byte *)(iVar25 + 0x282); //duty-
//Channel 1 measured values????
*(short *)((int)buffer + 0xd0) = (short)((uint)*(undefined4 *)(iVar25 + 0x104) >> 0x10);
*(short *)((int)buffer + 0xd2) = (short)*(undefined4 *)(iVar25 + 0x104);
*(short *)((int)buffer + 0xd4) = (short)((uint)*(undefined4 *)(iVar25 + 0x114) >> 0x10);
*(short *)((int)buffer + 0xd6) = (short)*(undefined4 *)(iVar25 + 0x114);
*(short *)((int)buffer + 0xd8) = (short)((uint)*(undefined4 *)(iVar25 + 0x124) >> 0x10);
*(short *)((int)buffer + 0xda) = (short)*(undefined4 *)(iVar25 + 0x124);
*(short *)((int)buffer + 0xdc) = (short)((uint)*(undefined4 *)(iVar25 + 0x134) >> 0x10);
*(short *)((int)buffer + 0xde) = (short)*(undefined4 *)(iVar25 + 0x134);
*(short *)((int)buffer + 0xe0) = (short)((uint)*(undefined4 *)(iVar25 + 0x144) >> 0x10);
*(short *)((int)buffer + 0xe2) = (short)*(undefined4 *)(iVar25 + 0x144);
*(short *)((int)buffer + 0xe4) = (short)((uint)*(undefined4 *)(iVar25 + 0x154) >> 0x10);
*(short *)((int)buffer + 0xe6) = (short)*(undefined4 *)(iVar25 + 0x154);
*(short *)((int)buffer + 0xe8) = (short)((uint)*(undefined4 *)(iVar25 + 0x164) >> 0x10);
*(short *)((int)buffer + 0xea) = (short)*(undefined4 *)(iVar25 + 0x164);
*(short *)((int)buffer + 0xec) = (short)((uint)*(undefined4 *)(iVar25 + 0x174) >> 0x10);
*(short *)((int)buffer + 0xee) = (short)*(undefined4 *)(iVar25 + 0x174);
*(short *)((int)buffer + 0xf0) = (short)((uint)*(undefined4 *)(iVar25 + 0x184) >> 0x10);
*(short *)((int)buffer + 0xf2) = (short)*(undefined4 *)(iVar25 + 0x184);
*(short *)((int)buffer + 0xf4) = (short)((uint)*(undefined4 *)(iVar25 + 0x194) >> 0x10);
*(short *)((int)buffer + 0xf6) = (short)*(undefined4 *)(iVar25 + 0x194);
*(short *)((int)buffer + 0xf8) = (short)((uint)*(undefined4 *)(iVar25 + 0x1a4) >> 0x10);
*(short *)((int)buffer + 0xfa) = (short)*(undefined4 *)(iVar25 + 0x1a4);
*(short *)((int)buffer + 0xfc) = (short)((uint)*(undefined4 *)(iVar25 + 0x1b4) >> 0x10);
*(short *)((int)buffer + 0xfe) = (short)*(undefined4 *)(iVar25 + 0x1b4);
//Channel 2 measured values????
*(short *)((int)buffer + 0x100) = (short)((uint)*(undefined4 *)(iVar25 + 0x1c4) >> 0x10);
*(short *)((int)buffer + 0x102) = (short)*(undefined4 *)(iVar25 + 0x1c4);
*(short *)((int)buffer + 0x104) = (short)((uint)*(undefined4 *)(iVar25 + 0x1d4) >> 0x10);
*(short *)((int)buffer + 0x106) = (short)*(undefined4 *)(iVar25 + 0x1d4);
*(short *)((int)buffer + 0x108) = (short)((uint)*(undefined4 *)(iVar25 + 0x1e4) >> 0x10);
*(short *)((int)buffer + 0x10a) = (short)*(undefined4 *)(iVar25 + 0x1e4);
*(short *)((int)buffer + 0x10c) = (short)((uint)*(undefined4 *)(iVar25 + 500) >> 0x10);
*(short *)((int)buffer + 0x10e) = (short)*(undefined4 *)(iVar25 + 500);
*(short *)((int)buffer + 0x110) = (short)((uint)*(undefined4 *)(iVar25 + 0x204) >> 0x10);
*(short *)((int)buffer + 0x112) = (short)*(undefined4 *)(iVar25 + 0x204);
*(short *)((int)buffer + 0x114) = (short)((uint)*(undefined4 *)(iVar25 + 0x214) >> 0x10);
*(short *)((int)buffer + 0x116) = (short)*(undefined4 *)(iVar25 + 0x214);
*(short *)((int)buffer + 0x118) = (short)((uint)*(undefined4 *)(iVar25 + 0x234) >> 0x10);
*(short *)((int)buffer + 0x11a) = (short)*(undefined4 *)(iVar25 + 0x234);
*(short *)((int)buffer + 0x11c) = (short)((uint)*(undefined4 *)(iVar25 + 0x244) >> 0x10);
*(short *)((int)buffer + 0x11e) = (short)*(undefined4 *)(iVar25 + 0x244);
*(short *)((int)buffer + 0x120) = (short)((uint)*(undefined4 *)(iVar25 + 0x254) >> 0x10);
*(short *)((int)buffer + 0x122) = (short)*(undefined4 *)(iVar25 + 0x254);
*(short *)((int)buffer + 0x124) = (short)((uint)*(undefined4 *)(iVar25 + 0x264) >> 0x10);
*(short *)((int)buffer + 0x126) = (short)*(undefined4 *)(iVar25 + 0x264);
*(short *)((int)buffer + 0x128) = (short)((uint)*(undefined4 *)(iVar25 + 0x274) >> 0x10);
*(short *)((int)buffer + 0x12a) = (short)*(undefined4 *)(iVar25 + 0x274);
*(short *)((int)buffer + 300) = (short)((uint)*(undefined4 *)(iVar25 + 0x284) >> 0x10);
*(short *)((int)buffer + 0x12e) = (short)*(undefined4 *)(iVar25 + 0x284);
//Copy 12 * 2 values. This is the list of enabled measurements to show them on the display
do //puVar30 = (ushort *)((int)buffer + 0x12e);
{
sVar4 = sVar4 + -1;
puVar30[1] = (ushort)pbVar15[1]; //Initial pVar15 = //0x801FA24B
pbVar15 = pbVar15 + 2;
puVar30 = puVar30 + 2;
*puVar30 = (ushort)*pbVar15;
} while (sVar4 != 0);
*(ushort *)((int)buffer + 400) = (ushort)pbVar2[0x39]; //charging indicator
*(ushort *)((int)buffer + 0x192) = (ushort)pbVar2[0x38]; //battery charge level
*(undefined2 *)((int)buffer + 0x194) = *(undefined2 *)PTR_DAT_80002030; //0x80192ec6
*(undefined2 *)((int)buffer + 0x196) = *(undefined2 *)PTR_DAT_80002034; //0x80192ec8