src/patch.c
__attribute__((at(0x00219200, "", CHIP_VER_BCM4375B1_BT, FW_VER_S20)))
int find_esb_address(uint8_t *buffer, uint8_t size) {
	uint8_t patterna = preamble & 0xFF;
	uint8_t patternb = (preamble & 0xFF00) >> 8;
	uint8_t patternc = (preamble & 0xFF0000) >> 16;
	int found = 0;
	if (patterna != 0 && patternb != 0 && patternc != 0) {
		for (int i=0;i<8*size-24;i++) {
			shift_buffer(buffer,size);
			if (buffer[2] == patterna && buffer[3] == patternb && buffer[4] == patternc) {
				found = 1;
				break;
			}
		}
	}
	return found;
}
/* 
This function is not used anymore
*/
This function is not used anymore
This function is not used anymore
__attribute__((at(0x00219200, "", CHIP_VER_BCM4375B1_BT, FW_VER_S20)))
int find_esb_address(uint8_t *buffer, uint8_t size) {
	uint8_t patterna = preamble & 0xFF;
	uint8_t patternb = (preamble & 0xFF00) >> 8;
	uint8_t patternc = (preamble & 0xFF0000) >> 16;
	int found = 0;
	if (patterna != 0 && patternb != 0 && patternc != 0) {
		for (int i=0;i<8*size-24;i++) {
			shift_buffer(buffer,size);
			if (buffer[2] == patterna && buffer[3] == patternb && buffer[4] == patternc) {
				found = 1;
				break;
			}
		}
	}
	return found;
}
__attribute__ ( ( at ( 0x00219200 , " " , CHIP_VER_BCM4375B1_BT , FW_VER_S20 ) ) ) int find_esb_address ( uint8_t * buffer , uint8_t size ) { uint8_t patterna = preamble & 0xFF ; uint8_t patternb = ( preamble & 0xFF00 ) >> 8 ; uint8_t patternc = ( preamble & 0xFF0000 ) >> 16 ; int found = 0 ; if ( patterna != 0 && patternb != 0 && patternc != 0 ) { for ( int i = 0 ; i < 8 * size - 24 ; i ++ ) { shift_buffer ( buffer , size ) ; if ( buffer [ 2 ] == patterna && buffer [ 3 ] == patternb && buffer [ 4 ] == patternc ) { found = 1 ; break ; } } } return found ; }
This function is not used anymore
This function is not used anymore