Searched refs:inp (Results 1 – 2 of 2) sorted by relevance
17 static int strtomicro(char *inp, char units, int32_t *val) in strtomicro() argument22 len = strlen(inp); in strtomicro()28 if (tolower(inp[len - 1]) != units) { in strtomicro()32 if ((len > 2) && (inp[len - 2] == 'u')) { in strtomicro()35 } else if ((len > 2) && (inp[len - 2] == 'm')) { in strtomicro()38 } else if (isdigit((unsigned char)inp[len - 2]) > 0) { in strtomicro()46 if (inp[0] == '-') { in strtomicro()49 } else if (inp[0] == '+') { in strtomicro()58 if (isdigit((unsigned char)inp[i]) > 0) { in strtomicro()60 (int32_t)(inp[i] - '0') * mult / decdiv; in strtomicro()[all …]
1209 static inline int sensor_value_from_double(struct sensor_value *val, double inp) in sensor_value_from_double() argument1211 if (inp < INT32_MIN || inp > INT32_MAX) { in sensor_value_from_double()1215 double val2 = (inp - (int32_t)inp) * 1000000.0; in sensor_value_from_double()1221 val->val1 = (int32_t)inp; in sensor_value_from_double()1234 static inline int sensor_value_from_float(struct sensor_value *val, float inp) in sensor_value_from_float() argument1236 float val2 = (inp - (int32_t)inp) * 1000000.0f; in sensor_value_from_float()1242 val->val1 = (int32_t)inp; in sensor_value_from_float()