This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I use the cJSON library?

I need to use cJSON to parse the uart data. I found the file in SDK15.3 but how can I use the related function?

Parents Reply
  • Depends on how you've implemented it. You can allocate a very small buffer, then send your data fragment by fragment at APP_UART_TX_EMPTY event (if you use app_uart_fifo). WIth nrfx_uarte library you don't need any intermediate buffer, transmission is done directly from buffer you've passed to tx function (just make sure not to free it until it transferred completely). nRF52840 can transfer up to 65535 bytes with nrfx_uarte, but if you require compatibility with lower series, you have to split transmission by 255 bytes.

Children
Related