@@ -191,7 +191,7 @@ int zm_senddata(FAR struct zm_state_s *pzm, FAR const uint8_t *buffer,
191
191
{
192
192
if (zbin == ZBIN )
193
193
{
194
- crc = (uint32_t )crc16part (buffer , 1 , (uint16_t )crc );
194
+ crc = (uint32_t )crc16xmodempart (buffer , 1 , (uint16_t )crc );
195
195
}
196
196
else /* zbin = ZBIN32 */
197
197
{
@@ -209,7 +209,7 @@ int zm_senddata(FAR struct zm_state_s *pzm, FAR const uint8_t *buffer,
209
209
210
210
if (zbin == ZBIN )
211
211
{
212
- crc = crc16part ((FAR const uint8_t * )& term , 1 , crc );
212
+ crc = crc16xmodempart ((FAR const uint8_t * )& term , 1 , crc );
213
213
}
214
214
else
215
215
{
@@ -283,12 +283,12 @@ int zm_sendhexhdr(FAR struct zm_state_s *pzm, int type,
283
283
284
284
/* type */
285
285
286
- crc = crc16part ((FAR const uint8_t * )& type , 1 , 0 );
286
+ crc = crc16xmodempart ((FAR const uint8_t * )& type , 1 , 0 );
287
287
ptr = zm_puthex8 (ptr , type );
288
288
289
289
/* f3/p0 f2/p1 f1/p2 f0/p3 */
290
290
291
- crc = crc16part (buffer , 4 , crc );
291
+ crc = crc16xmodempart (buffer , 4 , crc );
292
292
for (i = 0 ; i < 4 ; i ++ )
293
293
{
294
294
ptr = zm_puthex8 (ptr , * buffer ++ );
@@ -359,12 +359,12 @@ int zm_sendbin16hdr(FAR struct zm_state_s *pzm, int type,
359
359
360
360
/* type */
361
361
362
- crc = crc16part ((FAR const uint8_t * )& type , 1 , 0 );
362
+ crc = crc16xmodempart ((FAR const uint8_t * )& type , 1 , 0 );
363
363
ptr = zm_putzdle (pzm , ptr , type );
364
364
365
365
/* f3/p0 f2/p1 f1/p2 f0/p3 */
366
366
367
- crc = crc16part (buffer , 4 , crc );
367
+ crc = crc16xmodempart (buffer , 4 , crc );
368
368
for (i = 0 ; i < 4 ; i ++ )
369
369
{
370
370
ptr = zm_putzdle (pzm , ptr , * buffer ++ );
0 commit comments