<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to count no of elements in an Atomic_FIFO ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35126/how-to-count-no-of-elements-in-an-atomic_fifo</link><description>Hi, I&amp;#39;m using Atomic_FIFO library and for my application I need to know the number of elements currently in the fifo, the library itself doesn&amp;#39;t provide any functionality that tells the fifo size so I made some changes to it. I added following two lines</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jun 2018 05:48:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35126/how-to-count-no-of-elements-in-an-atomic_fifo" /><item><title>RE: How to count no of elements in an Atomic_FIFO ?</title><link>https://devzone.nordicsemi.com/thread/135281?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 05:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02c7931a-b276-4867-bdef-5044c27d4ce3</guid><dc:creator>Salman Azmat</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The buffer size tells the total buffer size allocated for fifo, so I think I&amp;#39;ll have to keep an array for fifo_size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to count no of elements in an Atomic_FIFO ?</title><link>https://devzone.nordicsemi.com/thread/135076?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcbd19e2-0f3f-4ebb-9cfd-98f155ea4cec</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should be able to get the available size from the FIFO object,&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__atfifo.html#gad621f8aba0ef06539ad40f6959cb4aed"&gt;nrf_atfifo_t&lt;/a&gt;. This object contain buffer size, item size, head and tail position for read and write.&lt;/p&gt;
&lt;p&gt;If you are not able to utilize this, you will have to create an array that can hold the size for each available FIFO, and update the size value for the corresponding FIFO object.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>