Skip to content

Commit

Permalink
[PROFILES] : Allow profiles with numeric offsets, so we can handle th…
Browse files Browse the repository at this point in the history
…ings like:

             ad9371-phy.out_altvoltage1_TX_LO_frequency = <i>
             ad9371-phy.out_altvoltage2_RX_SN_LO_frequency = {{<i>} + {1000000}}

             This helps with testing of boards.

Signed-off-by: Robin Getz <[email protected]>
  • Loading branch information
rgetz committed Sep 7, 2016
1 parent b9a1fdb commit 7265ce2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions osc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,8 +2348,17 @@ static int osc_read_nonenclosed_value(struct iio_context *ctx,
struct iio_device *dev;
struct iio_channel *chn;
const char *attr;
char *pend;
bool debug;
int ret = osc_identify_attrib(ctx, value, &dev, &chn, &attr, &debug);

if (ret == -EINVAL) {
*out = strtoll(value, &pend, 10);
/* if we are pointing to the end of the string, we are fine */
if ((strlen(value) + value) == pend) {
return 0;
}
}
if (ret < 0)
return ret;

Expand Down

0 comments on commit 7265ce2

Please sign in to comment.