drivers: minimize additional I2C retries

This commit is contained in:
Daniel Agar
2021-06-27 12:52:36 -04:00
parent 8a8171c7aa
commit cb610caf1e
18 changed files with 44 additions and 109 deletions
+1 -4
View File
@@ -185,9 +185,6 @@ BST::BST(const I2CSPIDriverConfig &config) :
int BST::probe()
{
int retries_prev = _retries;
_retries = 3;
BSTPacket<BSTDeviceInfoRequest> dev_info_req = {};
dev_info_req.type = 0x0A;
dev_info_req.payload.cmd = 0x04;
@@ -213,7 +210,7 @@ int BST::probe()
(int)swap_uint32(dev_info_reply.payload.hw_id), (int)swap_uint16(dev_info_reply.payload.fw_id),
dev_info_reply.payload.dev_name);
_retries = retries_prev;
_retries = 1;
return OK;
}