File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -483,19 +483,12 @@ bool RfalRfST25R3916Class::st25r3916CheckChipID(uint8_t *rev)
483483
484484 const uint8_t chipId = id & ST25R3916_REG_IC_IDENTITY_ic_type_mask;
485485
486- const bool isChipIdValid =
487- chipId == ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916 ||
488- chipId == ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916b;
489-
490- if (!isChipIdValid) {
491- return false ;
492- }
493-
494486 if (rev) {
495487 *rev = (id & ST25R3916_REG_IC_IDENTITY_ic_rev_mask);
496488 }
497489
498- return true ;
490+ return (chipId == ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916 ||
491+ chipId == ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916b);
499492}
500493
501494/* ******************************************************************************/
Original file line number Diff line number Diff line change 974974#define ST25R3916_REG_IC_IDENTITY_ic_type1 (1U<<4)
975975#define ST25R3916_REG_IC_IDENTITY_ic_type0 (1U<<3)
976976#define ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916 (5U<<3)
977+ #define ST25R3916_REG_IC_IDENTITY_ic_type_st25r3916b (6U<<3)
977978#define ST25R3916_REG_IC_IDENTITY_ic_type_mask (0x1fU<<3)
978979#define ST25R3916_REG_IC_IDENTITY_ic_type_shift (3U)
979980#define ST25R3916_REG_IC_IDENTITY_ic_rev2 (1U<<2)
You can’t perform that action at this time.
0 commit comments