hi..........
i want to put my peripheral device in sleep mode ? how to do that?
i tried this one , its shows error
err_code= sd_power_system_off();
APP_ERROR_CHECK(err_code);
hi..........
i want to put my peripheral device in sleep mode ? how to do that?
i tried this one , its shows error
err_code= sd_power_system_off();
APP_ERROR_CHECK(err_code);
its shows error
So what error, exactly, does it show?
err_code undeclared (first use in this function)
The 'C' programming language requires that everything must be declared before it is used.
This is basic 'C' - nothing specific to Nordic.
So, when the error says that something is un-declared - the solution is to declare it.
In the code you posted, there clearly is no declaration of the variable 'error_code'.
How to properly post source code:
yes i know that meaning , what to declare ?
yes i know that meaning , what to declare ?
for system off what i want to declare ?
sleep_mode_enter(); this one ??
what to declare ?
It tells you what to declare!
You need to declare the thing which it told you was un-declared!
i tried ... leave that .. how to turn the device into sleep mode , using system off right . if i were wrong tell me and explain me about system on and off .......what function to used to turn the device into sleep and how to declare and tell me syntax .
i tried ... leave that
OK - so long as you have fixed the error and understood the issue.
As noted, it is a very basic 'C' programming issue - if you're still not clear on such basics, you are going to struggle with advanced stuff like BLE.
how to turn the device into sleep mode
Have you studied the documentation?
You haven't said what chip you're using, or what SoftDevice you're using.
For S132 v6.1.0, the documentation is here:
You will also need to study the chip documentation.
Have you looked at SDK examples?
Details of the nRF52832 power modes here:
leave that
OK - so long as you have fixed the error and understood the issue.
Apparently not: https://devzone.nordicsemi.com/f/nordic-q-a/40579/nus_data_handler-error