8000 board: pluto & m2k: Temperature look-up table calib · analogdevicesinc/buildroot@9dcc088 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 9dcc088

Browse files
btogoreancommodo
authored andcommitted
board: pluto & m2k: Temperature look-up table calib
This commit adds the possibility to load a look-up table with calibration points using the USB mass storage device into internal JFFS partition. The LUT data will be exported at boot as an iio context attribute. Signed-off-by: Bogdan Togorean <bogdan.togorean@analog.com>
1 parent 1daa690 commit 9dcc088

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

board/m2k/S21misc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ handle_calibration_files() {
1111
elif [[ -s /mnt/jffs2/${CALIBFILENAME_FACTORY} ]]; then
1212
cp /mnt/jffs2/${CALIBFILENAME_FACTORY} /opt/${CALIBFILENAME}
1313
fi
14+
15+
if [[ -s /mnt/jffs2/${CALIBFILENAME_TEMP_LUT} ]]; then
16+
cp /mnt/jffs2/${CALIBFILENAME_TEMP_LUT} /opt/${CALIBFILENAME_TEMP_LUT}
17+
fi
1418
}
1519

1620
case "$1" in

board/m2k/device_config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ FIRMWARE=/mnt/msd/m2k.frm
1414
FRM_MAGIC="ITB M2k (ADALM-2000)"
1515
CALIBFILENAME=m2k-calib.ini
1616
CALIBFILENAME_FACTORY=m2k-calib-factory.ini
17+
CALIBFILENAME_TEMP_LUT=m2k-calib-temp-lut.ini
1718

board/pluto/S23udc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ create_iiod_context_attributes() {
4343

4444
elif [ "$USBPID" == "0xb672" ]; then
4545
cat /opt/${CALIBFILENAME} | grep ^cal,* >> /etc/libiio.ini
46+
cat /opt/${CALIBFILENAME_TEMP_LUT} | grep ^cal,* >> /etc/libiio.ini
4647
fi
4748
}
4849

board/pluto/update.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ do
248248
do_reset=1
249249
fi
250250
fi
251+
252+
if [[ -s /mnt/msd/${CALIBFILENAME_TEMP_LUT} ]]; then
253+
cp /mnt/msd/${CALIBFILENAME_TEMP_LUT} /mnt/jffs2/${CALIBFILENAME_TEMP_LUT}
254+
do_reset=1
255+
fi
251256
fi
252257

253258
if [[ $do_reset = 1 ]]

0 commit comments

Comments
 (0)
0