Recycle example.cydsn/Generated_Source/PSoC5/XBEE.c
uint8_t XBEE_Checksum(XBEE_packet_t * packet) {
    uint16_t i;
    uint8_t sum;
    
    sum = 0xFF;
    
    for(i=0; i<packet->length; i++) {
        sum -= packet->payload[i];
    }
    
    return sum;
}
/**
* Calculate checksum.
* Calculate checksum of a given packet. This method does not populate the
* checksum field.
*
* @param packet. Pointer to the packet.
* @return Checksum result.
*/
Calculate checksum.
Calculate checksum of a given packet. This method does not populate the
checksum field.
Calculate checksum . Calculate checksum of a given packet . This method does not populate the checksum field .
uint8_t XBEE_Checksum(XBEE_packet_t * packet) {
    uint16_t i;
    uint8_t sum;
    sum = 0xFF;
    for(i=0; i<packet->length; i++) {
        sum -= packet->payload[i];
    }
    return sum;
}
uint8_t XBEE_Checksum ( XBEE_packet_t * packet ) { uint16_t i ; uint8_t sum ; sum = 0xFF ; for ( i = 0 ; i < packet -> length ; i ++ ) { sum -= packet -> payload [ i ] ; } return sum ; }
Calculate checksum.
Calculate checksum .