From 43f3621fa05c6dc874d703ba2198b07ff0797ff3 Mon Sep 17 00:00:00 2001 From: wh201906 Date: Mon, 23 Aug 2021 13:29:42 +0800 Subject: [PATCH] Fix the mask of CHAN[9:0] in register 0x03 The CHAN[9:0] has 10 bits, so the inverted mask should be 0xFC00 rather than 0xFE00 --- src/SparkFunSi4703.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SparkFunSi4703.cpp b/src/SparkFunSi4703.cpp index fda0919..e193304 100644 --- a/src/SparkFunSi4703.cpp +++ b/src/SparkFunSi4703.cpp @@ -26,7 +26,7 @@ void Si4703_Breakout::setChannel(int channel) //These steps come from AN230 page 20 rev 0.5 readRegisters(); - si4703_registers[CHANNEL] &= 0xFE00; //Clear out the channel bits + si4703_registers[CHANNEL] &= 0xFC00; //Clear out the channel bits si4703_registers[CHANNEL] |= newChannel; //Mask in the new channel si4703_registers[CHANNEL] |= (1<