ISM RF transmitter library for MAX4146X family devices

Library for MAX41460, MAX41461, MAX41462, MAX41463, MAX41464 RF Transmitter ICs.

Revision:
2:80969d8f6d2b
Parent:
1:ccf0e1d28860
--- a/Max4146x.cpp	Thu May 02 14:11:03 2019 +0300
+++ b/Max4146x.cpp	Thu Jan 13 13:27:54 2022 +0300
@@ -275,7 +275,7 @@
 template <class REG>
 int MAX4146X<REG>::set_crystal_frequency(float freq)
 {
-    if (freq < 250 || freq > 950) {
+    if (freq < 12.7 || freq > 19.3) {
         return -1;
     }
     this->crystal_frequency = freq;
@@ -442,20 +442,6 @@
 
 //        this->set_i2c_txen1(I2C_TXEN1_DISABLE);
 
-        char * value = (char *)malloc(17 * sizeof(char));
-
-        if (value == NULL) {
-        	return -99;
-        }
-
-        int rtn_val = i2c_handler->write(I2C_ADDRESS, (char *) 0x00, 1, true);
-        rtn_val = i2c_handler->read(I2C_ADDRESS, value, length, true);
-		if (rtn_val != 0) {
-			return rtn_val;
-		}
-
-		free(value);
-
         uint8_t local_data[4+length];
 
         local_data[0] = CFG7_ADDR;