/* Resolve the value of record location flags of the NFC NDEF record within a NFC NDEF message.  */
__STATIC_INLINE nfc_ndef_record_location_t record_location_get(uint32_t index, uint32_t record_count)
/* Resolve the value of record location flags of the NFC NDEF record within a NFC NDEF message.  */
__STATIC_INLINE nfc_ndef_record_location_t record_location_get(uint32_t index, uint32_t record_count)
{
    nfc_ndef_record_location_t record_location;
    if (index == 0)
    {
        if (record_count == 1)
        {
            record_location = NDEF_LONE_RECORD;
        }
        else
        {
            record_location = NDEF_FIRST_RECORD;
        }
    }
    else if (record_count == index + 1)
    {
        record_location = NDEF_LAST_RECORD;
    }
    else
    {
        record_location = NDEF_MIDDLE_RECORD;
    }
    return record_location;
}