src/patch.c
__attribute__((at(0x00219300, "", CHIP_VER_BCM4375B1_BT, FW_VER_S20)))
uint8_t extract_payload_esb(uint8_t *buffer, uint8_t *dest) {
	uint8_t size = buffer[0] >> 2;
	if (size > 0 && size < 30) {
		for (int i=0;i<size;i++) {
			dest[i] = 0xFF & (buffer[1+i] << 1 | buffer[1+i] >> 7);
		}	
	}
	else {
		size = 0;
	}
	return size;
}
/*
This function extracts the payload of an Enhanced ShockBurst frame 
*/
This function extracts the payload of an Enhanced ShockBurst frame
This function extracts the payload of an Enhanced ShockBurst frame
__attribute__((at(0x00219300, "", CHIP_VER_BCM4375B1_BT, FW_VER_S20)))
uint8_t extract_payload_esb(uint8_t *buffer, uint8_t *dest) {
	uint8_t size = buffer[0] >> 2;
	if (size > 0 && size < 30) {
		for (int i=0;i<size;i++) {
			dest[i] = 0xFF & (buffer[1+i] << 1 | buffer[1+i] >> 7);
		}	
	}
	else {
		size = 0;
	}
	return size;
}
__attribute__ ( ( at ( 0x00219300 , " " , CHIP_VER_BCM4375B1_BT , FW_VER_S20 ) ) ) uint8_t extract_payload_esb ( uint8_t * buffer , uint8_t * dest ) { uint8_t size = buffer [ 0 ] >> 2 ; if ( size > 0 && size < 30 ) { for ( int i = 0 ; i < size ; i ++ ) { dest [ i ] = 0xFF & ( buffer [ 1 + i ] << 1 | buffer [ 1 + i ] >> 7 ) ; } } else { size = 0 ; } return size ; }
This function extracts the payload of an Enhanced ShockBurst frame
This function extracts the payload of an Enhanced ShockBurst frame