linux - unimplemented -mgeneral-regs-only and floating point code
大家讲道理
大家讲道理 2017-04-17 13:35:08
0
0
2087

sorry, unimplemented: '-mgeneral-regs-only' and floating point code
static ssize_t CAMERA_HW_DumpReg_To_Proc(struct file file, char __user data, size_t len, loff_t *ppos)

confused by earlier errors, bailing out

gcc编译报错,出错信息如上
static ssize_t CAMERA_HW_DumpReg_To_Proc(struct file file, char __user data, size_t len, loff_t *ppos)
{

static int count = 0;
char buf[15] = {'\0'};
float tempture;
pr_err("sub camera data pointer 0x%p, len %d", data, (unsigned int)len);
sensorReg3.RegData = sensorReg3.RegData & 0x7F;
tempture = sensorReg3.RegData;
pr_err("temp %d", sensorReg3.RegData);
if(tempture > 43)
    tempture = (tempture - 43)*5.0/6 + 25;
else if(tempture > 36)
    tempture = (tempture - 36)*5.0/7 + 20;
else 
    tempture = (tempture - 12)*5.0/6;
if(tempture < 10) tempture = 10;
sprintf(buf, "%2.1f\n", tempture);
pr_err("liulian %s", buf);
if(copy_to_user(data, buf, 6))
           return -EFAULT;
if(count == 0){
           count = 6;
           return count;
   }
else if(count == 6){
   count = 0;
   return 0;
   }

}

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal