@@ -40,6 +40,11 @@ static void ep_bound(void *priv)
4040 LOG_INF ("Ep bounded" );
4141}
4242
43+ static void ep_unbound (void * priv )
44+ {
45+ LOG_INF ("Ep unbounded" );
46+ }
47+
4348static void ep_recv (const void * data , size_t len , void * priv )
4449{
4550#if defined(CONFIG_ASSERT )
@@ -68,6 +73,11 @@ static void ep_recv(const void *data, size_t len, void *priv)
6873 }
6974}
7075
76+ static void ep_error (const char * message , void * priv )
77+ {
78+ LOG_ERR ("ICMsg error: %s" , message );
79+ }
80+
7181static int send_for_time (struct ipc_ept * ep , const int64_t sending_time_ms )
7282{
7383 struct data_packet msg = {.data [0 ] = 'a' };
@@ -122,8 +132,10 @@ static int send_for_time(struct ipc_ept *ep, const int64_t sending_time_ms)
122132
123133static struct ipc_ept_cfg ep_cfg = {
124134 .cb = {
125- .bound = ep_bound ,
135+ .bound = ep_bound ,
136+ .unbound = ep_unbound ,
126137 .received = ep_recv ,
138+ .error = ep_error ,
127139 },
128140};
129141
@@ -137,7 +149,7 @@ int main(void)
137149
138150#if defined(CONFIG_SOC_NRF5340_CPUAPP )
139151 LOG_INF ("Run network core" );
140- nrf53_cpunet_enable (true);
152+ // nrf53_cpunet_enable(true); printk("sample" );
141153#endif
142154
143155 ipc0_instance = DEVICE_DT_GET (DT_NODELABEL (ipc0 ));
@@ -180,6 +192,14 @@ int main(void)
180192 LOG_INF ("Stop network core" );
181193 nrf53_cpunet_enable (false);
182194
195+ LOG_INF ("Run network core" );
196+ nrf53_cpunet_enable (true); printk ("sample 2" );
197+
198+ k_msleep (500 );
199+
200+ LOG_INF ("Stop network core" );
201+ nrf53_cpunet_enable (false);
202+
183203 LOG_INF ("Reset IPC service" );
184204
185205 ret = ipc_service_deregister_endpoint (& ep );
@@ -206,7 +226,7 @@ int main(void)
206226 }
207227
208228 LOG_INF ("Run network core" );
209- nrf53_cpunet_enable (true);
229+ nrf53_cpunet_enable (true); printk ( "sample 2" );
210230
211231 k_sem_take (& bound_sem , K_FOREVER );
212232
0 commit comments