added some cbor tools

This commit is contained in:
merlokk 2018-11-23 19:47:30 +02:00
commit a37082a825
2 changed files with 80 additions and 0 deletions

View file

@ -24,4 +24,9 @@
extern int TinyCborPrintFIDOPackage(uint8_t cmdCode, bool isResponse, uint8_t *data, size_t length);
extern int JsonToCbor(json_t *elm, CborEncoder *encoder);
extern int CborMapGetKeyById(CborParser *parser, CborValue *map, uint8_t *data, size_t dataLen, int key);
extern CborError CborGetBinStringValue(CborValue *elm, uint8_t *data, size_t maxdatalen, size_t *datalen);
extern CborError CborGetStringValue(CborValue *elm, char *data, size_t maxdatalen, size_t *datalen);
extern CborError CborGetStringValueBuf(CborValue *elm);
#endif /* __CBORTOOLS_H__ */