Beispiel #1
0
 /** @brief Creates and returns the TNF and Flags byte.
  *
  *  @param msgBegin is the flag indicating if the NDEF Record is the first
  *  @param msgEnd is the flag indicating if the NDEF Record is the last
  *  @param chunkFlag is the flag indicating if it is a chunked message part
  *  @param shortRecord is the flag indicating if the message is shorter than 2^8-1
  *  @param idLength indicates the length of the id
  *  @param type indicats the name format type
  *
  * @return the TNF and Flag byte
  */
 public byte getNdefTNFandFlagsByte(bool msgBegin, bool msgEnd, bool chunkFlag, bool
                                    shortRecord, byte idLength, TypeNameFormatType type)
 {
     return(NDEF.getTNFandFlagsByte(msgBegin, msgEnd,
                                    chunkFlag, shortRecord, idLength, type));
 }
Beispiel #2
0
 /** @brief Write the data on the user memory formatted as a text NDEF message.
  *
  *  @param i2cAddress is the address of the device to be found on the i2c bus
  *  @param payload is the byte array with the data to be written as payload of the NDEF message
  *
  * @return the result of the transaction
  */
 public I2CData writeTextNdef(byte I2Caddress, byte[] payload)
 {
     byte[] ndef = NDEF.createTextNdefMessage(payload);
     return(writeMessage(I2Caddress, ndef));
 }