Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: adf.h
- Revision:
- 328:2242ebc71be8
- Parent:
- 327:5a967a66c10f
- Child:
- 333:cddef120cae3
--- a/adf.h Fri Dec 16 08:53:12 2016 +0000
+++ b/adf.h Tue Dec 20 08:36:41 2016 +0000
@@ -249,9 +249,7 @@
spi.write(0x59);
spi.write(0x08);
gCS_ADF=1;
- uint16_t sum_temp = 0;
- for(int i =0; i< 10;i++)
- {
+
gCS_ADF=0;
spi.write(0x3B);
spi.write(0x27);
@@ -270,12 +268,12 @@
spi.write(0xFF);
secondbyte = spi.write(0xFF);
gCS_ADF=1;
- COM_ADF_TMP = firstbyte<<6;
- COM_ADF_TMP += secondbyte;
- COM_ADF_TMP = (COM_ADF_TMP/1.83) - 118.43 + temp_correction_value;
- sum_temp+=COM_ADF_TMP;
- }
- COM_ADF_TMP = sum_temp/10;
+
+ COM_ADF_TMP = firstbyte & 0x03;
+ COM_ADF_TMP |= secondbyte & 0xfc;
+ COM_ADF_TMP = 0.9474*(COM_ADF_TMP - 28) +28.2;
+
+ gPC.printf("\n\rCOM_ADF_TMP : %d",COM_ADF_TMP);
uint8_t txcurr = (3.3*COM_TX_OC_FAULT)/(0.05)*100;
}
