<?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>Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114334/using-zephyr-mcp23xxx-driver-for-buttons-with-nordic-nrf-caf-buttons-module</link><description>Developing a device based on the nrf5340/nrf7002 pair, with a user interface. 
 I decided to use the Nordic &amp;#39;buttons&amp;#39; and &amp;#39;click-buttons&amp;#39; modules from the CAF framework for my device button handling. 
 This worked fine on the dev board (nrf5340DK). 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Sep 2024 11:14:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114334/using-zephyr-mcp23xxx-driver-for-buttons-with-nordic-nrf-caf-buttons-module" /><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501520?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 11:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daaa915c-8f9f-4ce1-9c4b-432b4438b420</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I&amp;nbsp;will&amp;nbsp;certainly do that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501517?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 11:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:499ec341-7d22-4952-a58e-434f6603f58b</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;Maybe you can get the team to update the button module documentation to make it clear that it will not work with gpio controllers that are not gpio0/gpio1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501515?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 11:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab75679b-0714-4aea-ae67-e7f9ede0612d</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I think that is the best approach&amp;nbsp;considering the information you have given me. It&amp;#39;s great to know that it is working for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501508?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 10:36:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3a3045d-d1a3-438b-8797-95b411c2b234</guid><dc:creator>BrianW</dc:creator><description>[quote userid="9456" url="~/f/nordic-q-a/114334/using-zephyr-mcp23xxx-driver-for-buttons-with-nordic-nrf-caf-buttons-module/501347"]Yet, if you find the idea&amp;nbsp;of event-base framework of CAF fitting, we can explore the option of a custom module.[/quote]
&lt;p&gt;I have essentially switched to this - a basic button click module that generates the same button events as the CAF one, so my other event based modules can work as before using the app_event_* framework.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501347?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 11:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e20646d-aaca-4a25-8ff0-1363f742da4e</guid><dc:creator>Hieu</dc:creator><description>[quote user="BrianW"]Although now I am wondering if this is really a production ready framework in the Zephyr environment.[/quote]
&lt;p&gt;I would say that it is production ready, but unfortunately quite dated. I&amp;nbsp;can say that&amp;nbsp;the team has received some feedback about CAF recently, and&amp;nbsp;updating it is on their list.&lt;/p&gt;
[quote user="BrianW"]I already gave up on the led module (kept causing core dumps)[/quote]
&lt;p&gt;Ok... that should not happen. I&amp;nbsp;haven&amp;#39;t used it lately, but it worked for me before.&amp;nbsp;If you want to look into it, please open a new case and either I or someone else will&amp;nbsp;help you look into it.&lt;/p&gt;
[quote user="BrianW"]now will be giving up on the buttons module...&amp;nbsp;[/quote]
&lt;p&gt;I probably agree with the decision to skip on the CAF Button module for your case.&lt;/p&gt;
&lt;p&gt;As I mentioned, it was designed for keyboard matrix, so it keeps track of keys in&amp;nbsp;rows and columns. In addition, it was implemented long ago, before a lot of recent good Devicetree updates, and hasn&amp;#39;t been updated yet.&lt;/p&gt;
&lt;p&gt;Yet, if you find the idea&amp;nbsp;of event-base framework of CAF fitting, we can explore the option of a custom module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/501218?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 16:52:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7321c0f9-fe7e-4aad-b224-af7a03a8b743</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;&lt;em&gt;Is your application built on top of the CAF?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Yes, we are using the event framework and some CAF modules. Although now I am wondering if this is really a production ready framework in the Zephyr environment.&lt;/p&gt;
&lt;p&gt;I already gave up on the led module (kept causing core dumps), and now will be giving up on the buttons module...&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/500829?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 15:25:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a76e2b4c-748e-4e06-9195-e5e03271c2b2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi BrianW,&lt;/p&gt;
[quote user=""]I thought the whole point of this insanely complicated DTS stuff was to make this sort of hw transition easy???[/quote]
&lt;p&gt;This depends on the kind of replacement. For example, replacing the UART output of a module from an actual UART port to a USB CDC ACM is simple, because the USB CDC ACM supports the same APIs too.&lt;/p&gt;
&lt;p&gt;Though for the case of GPIO expander, it would work.&amp;nbsp;See for example, the Thingy:52&amp;#39;s LED definition and usage is the same as that of the nRF52 DK, even though the Thingy:52&amp;#39;s LEDs are controlled by an IO Expander, and the nRF52 DK&amp;#39;s LEDs are controlled by the SoC&amp;#39;s GPIO ports.&lt;/p&gt;
&lt;p&gt;The problem in this case is that the CAF Button Module is made&amp;nbsp;to only work with the nRF SoC&amp;#39;s GPIO controllers. To be specific,&amp;nbsp;the module&amp;nbsp;appears designed specifically for the use-case of PC keyboard matrix that uses a nRF SoC&amp;#39;s GPIO port to sweep.&lt;/p&gt;
&lt;p&gt;Is your application built on top of the CAF?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using zephyr MCP23xxx driver for buttons with Nordic nrf CAF buttons module?</title><link>https://devzone.nordicsemi.com/thread/500485?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 21:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c4f1c5b-45d4-460a-b4b7-971fa224c127</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;this is my buttons_def.h:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;static const struct gpio_pin col[] = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;static const struct gpio_pin row[] = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { .port = DT_PROP(DT_GPIO_CTLR(DT_ALIAS(butt_left), gpios), port), .pin = DT_GPIO_PIN(DT_ALIAS(butt_left), gpios) &amp;nbsp;}, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;#39;left&amp;#39; button&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { .port = DT_PROP(DT_GPIO_CTLR(DT_ALIAS(butt_home), gpios), port), .pin = DT_GPIO_PIN(DT_ALIAS(butt_home), gpios) &amp;nbsp;}, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;#39;home&amp;#39; button&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { .port = DT_PROP(DT_GPIO_CTLR(DT_ALIAS(butt_right), gpios), port), .pin = DT_GPIO_PIN(DT_ALIAS(butt_right), gpios) }, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// &amp;#39;right button&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { .port = DT_PROP(DT_GPIO_CTLR(DT_ALIAS(butt_alert), gpios), port), .pin = DT_GPIO_PIN(DT_ALIAS(butt_alert), gpios) }, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// alert hall sensor&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I guess the problem is that the definition expects a port/pin pair of integers, instead of a DT_NODE to define the GPIO and there is no &amp;#39;port&amp;#39; on the ioexpander?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>