<?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>initialization function uart inside a c++ function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18530/initialization-function-uart-inside-a-c-function</link><description>Hello all,
I try to initialize the uart module inside a c++ code as follow: 
 #include &amp;quot;uart.hpp&amp;quot;

void Uart::uart_init()
{
 uint32_t err_code;
 app_uart_comm_params_t comm_params;

 comm_params.rx_pin_no=RX_PIN_NUMBER;
 comm_params.tx_pin_no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Dec 2016 14:04:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18530/initialization-function-uart-inside-a-c-function" /><item><title>RE: initialization function uart inside a c++ function</title><link>https://devzone.nordicsemi.com/thread/71521?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2016 14:04:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7482c9e3-8e67-41a1-af0d-48dcc4c2c030</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You cannot not take a pointer to a method of your class.  If you want to use it as event handler callback, you need to declare that member function as static.  static function does not know about its instance (this). You will need to pass the object instance as parameter to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>