@@ -191,7 +191,7 @@ int zm_senddata(FAR struct zm_state_s *pzm, FAR const uint8_t *buffer,
191191 {
192192 if (zbin == ZBIN )
193193 {
194- crc = (uint32_t )crc16part (buffer , 1 , (uint16_t )crc );
194+ crc = (uint32_t )crc16xmodempart (buffer , 1 , (uint16_t )crc );
195195 }
196196 else /* zbin = ZBIN32 */
197197 {
@@ -209,7 +209,7 @@ int zm_senddata(FAR struct zm_state_s *pzm, FAR const uint8_t *buffer,
209209
210210 if (zbin == ZBIN )
211211 {
212- crc = crc16part ((FAR const uint8_t * )& term , 1 , crc );
212+ crc = crc16xmodempart ((FAR const uint8_t * )& term , 1 , crc );
213213 }
214214 else
215215 {
@@ -283,12 +283,12 @@ int zm_sendhexhdr(FAR struct zm_state_s *pzm, int type,
283283
284284 /* type */
285285
286- crc = crc16part ((FAR const uint8_t * )& type , 1 , 0 );
286+ crc = crc16xmodempart ((FAR const uint8_t * )& type , 1 , 0 );
287287 ptr = zm_puthex8 (ptr , type );
288288
289289 /* f3/p0 f2/p1 f1/p2 f0/p3 */
290290
291- crc = crc16part (buffer , 4 , crc );
291+ crc = crc16xmodempart (buffer , 4 , crc );
292292 for (i = 0 ; i < 4 ; i ++ )
293293 {
294294 ptr = zm_puthex8 (ptr , * buffer ++ );
@@ -359,12 +359,12 @@ int zm_sendbin16hdr(FAR struct zm_state_s *pzm, int type,
359359
360360 /* type */
361361
362- crc = crc16part ((FAR const uint8_t * )& type , 1 , 0 );
362+ crc = crc16xmodempart ((FAR const uint8_t * )& type , 1 , 0 );
363363 ptr = zm_putzdle (pzm , ptr , type );
364364
365365 /* f3/p0 f2/p1 f1/p2 f0/p3 */
366366
367- crc = crc16part (buffer , 4 , crc );
367+ crc = crc16xmodempart (buffer , 4 , crc );
368368 for (i = 0 ; i < 4 ; i ++ )
369369 {
370370 ptr = zm_putzdle (pzm , ptr , * buffer ++ );
0 commit comments