SG RFID nRF51822 fork

Fork of nRF51822 by Nordic Semiconductor

Committer:
soumi_ghsoh
Date:
Wed Apr 01 22:06:35 2015 +0000
Revision:
100:030804500597
Parent:
0:eff01767de02
TAG read with multiple instances of RX complete IRQ; Imp changes: reduced RX wait time, Vin=3V/AGC ON, RX_IN2(main) , RX_IN1(aux)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 0:eff01767de02 1 #include "ble_advdata_parser.h"
bogdanm 0:eff01767de02 2
bogdanm 0:eff01767de02 3 uint32_t ble_advdata_parser_field_find(uint8_t type, uint8_t * p_advdata, uint8_t * len, uint8_t ** pp_field_data)
bogdanm 0:eff01767de02 4 {
bogdanm 0:eff01767de02 5 uint32_t index = 0;
bogdanm 0:eff01767de02 6
bogdanm 0:eff01767de02 7 while (index < *len)
bogdanm 0:eff01767de02 8 {
bogdanm 0:eff01767de02 9 uint8_t field_length = p_advdata[index];
bogdanm 0:eff01767de02 10 uint8_t field_type = p_advdata[index+1];
bogdanm 0:eff01767de02 11
bogdanm 0:eff01767de02 12 if (field_type == type)
bogdanm 0:eff01767de02 13 {
bogdanm 0:eff01767de02 14 *pp_field_data = &p_advdata[index+2];
bogdanm 0:eff01767de02 15 *len = field_length-1;
bogdanm 0:eff01767de02 16 return NRF_SUCCESS;
bogdanm 0:eff01767de02 17 }
bogdanm 0:eff01767de02 18 index += field_length+1;
bogdanm 0:eff01767de02 19 }
bogdanm 0:eff01767de02 20 return NRF_ERROR_NOT_FOUND;
bogdanm 0:eff01767de02 21 }