Lines Matching refs:tmpAtp
59 Atp tmpAtp; in Atp_setAtp() local
62 tmpAtp.len = (uint8_t)baAtp[LEN_OFFSET_IN_ATP]; in Atp_setAtp()
64 if (tmpAtp.len > ATP_MAX_ALLOWED_LENGTH) { in Atp_setAtp()
67 memcpy(gATP, baAtp, tmpAtp.len); in Atp_setAtp()
68 tmpAtp.checksum = Atp_getChecksumValue(baAtp, CHECKSUM_OFFSET_IN_ATP); in Atp_setAtp()
71 if (computeCrc(baAtp, LEN_LENGTH_IN_ATP + tmpAtp.len - CRC_LENGTH_IN_ATP) != in Atp_setAtp()
72 tmpAtp.checksum) { in Atp_setAtp()
79 tmpAtp.checksumType = LRC; in Atp_setAtp()
81 tmpAtp.checksumType = CRC; in Atp_setAtp()
90 tmpAtp.vendorID[i] = baAtp[VENDOR_ID_OFFSET_IN_ATP + i]; in Atp_setAtp()
94 tmpAtp.bwt = 0; in Atp_setAtp()
96 tmpAtp.bwt = in Atp_setAtp()
97 (uint16_t)(tmpAtp.bwt << 8) + (uint8_t)baAtp[BWT_OFFSET_IN_ATP + i]; in Atp_setAtp()
101 tmpAtp.cwt = (uint8_t)baAtp[CWT_OFFSET_IN_ATP]; in Atp_setAtp()
104 tmpAtp.pwt = (uint8_t)baAtp[PWT_OFFSET_IN_ATP]; in Atp_setAtp()
107 STLOG_HAL_V("Configuring ATP %i", tmpAtp.msf); in Atp_setAtp()
108 tmpAtp.msf = 0; in Atp_setAtp()
110 tmpAtp.msf = in Atp_setAtp()
111 (uint16_t)(tmpAtp.msf << 8) + (uint8_t)baAtp[MSF_OFFSET_IN_ATP + i]; in Atp_setAtp()
116 tmpAtp.ifsc = (uint8_t)baAtp[IFSC_OFFSET_IN_ATP]; in Atp_setAtp()
120 tmpAtp.historicalCharacter[i] = in Atp_setAtp()
125 ATP = tmpAtp; in Atp_setAtp()