File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -646,6 +646,11 @@ readSensorRegisterMAG3110(uint8_t deviceRegister)
646
646
i2c_status_t returnValue ;
647
647
648
648
649
+ if (deviceRegister > 0x11 )
650
+ {
651
+ return kWarpStatusBadDeviceCommand ;
652
+ }
653
+
649
654
i2c_device_t slave =
650
655
{
651
656
.address = deviceMAG3110State .i2cAddress ,
@@ -852,6 +857,22 @@ readSensorRegisterTMP006B(uint8_t deviceRegister)
852
857
uint8_t cmdBuf [1 ] = {0xFF };
853
858
i2c_status_t returnValue ;
854
859
860
+
861
+ switch (deviceRegister )
862
+ {
863
+ case 0x00 : case 0x01 : case 0x02 : case 0xFE : case 0xFF :
864
+ {
865
+ /* OK */
866
+ break ;
867
+ }
868
+
869
+ default :
870
+ {
871
+ return kWarpStatusBadDeviceCommand ;
872
+ }
873
+ }
874
+
875
+
855
876
i2c_device_t slave =
856
877
{
857
878
.address = deviceTMP006BState .i2cAddress ,
You can’t perform that action at this time.
0 commit comments