dlog_print(DLOG_INFO, LOG_TAG, "Bluetooth: %s", value ? "Enabled" : "Disabled");
}
</pre></li>
-<li>Get the Wi-Fi status.
-<p>Use the <span style="font-family: Courier New,Courier,monospace">RUNTIME_INFO_KEY_WIFI_STATUS</span> key to get the Wi-Fi status. The type of the value is <span style="font-family: Courier New,Courier,monospace">integer</span>, and the <span style="font-family: Courier New,Courier,monospace">runtime_info_get_value_int()</span> function is used for the information.</p>
+<li>Get the audio jack status.
+<p>Use the <span style="font-family: Courier New,Courier,monospace">RUNTIME_INFO_KEY_AUDIO_JACK_STATUS</span> key to get the audio jack status. The type of the value is <span style="font-family: Courier New,Courier,monospace">integer</span>, and the <span style="font-family: Courier New,Courier,monospace">runtime_info_get_value_int()</span> function is used for the information.</p>
<pre class="prettyprint">
#include <runtime_info.h>
int value;
int ret;
- ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_WIFI_STATUS, &value);
+ ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value);
if (ret != RUNTIME_INFO_ERROR_NONE)
{
// Error handling
return;
}
- dlog_print(DLOG_INFO, LOG_TAG, "Wi-Fi status: %d", value);
+ dlog_print(DLOG_INFO, LOG_TAG, "Audio jack status: %d", value);
switch (value)
{
- case RUNTIME_INFO_WIFI_STATUS_DISABLED:
- // Wi-Fi is disabled
+ case RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED:
+ // Audio jack is disabled
break;
- case RUNTIME_INFO_WIFI_STATUS_UNCONNECTED:
- // Wi-Fi is disconnected
+ case RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE:
+ // 3-conductor wire is disconnected
break;
- case RUNTIME_INFO_WIFI_STATUS_CONNECTED:
- // Wi-Fi is connected
+ case RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE:
+ // 4-conductor wire is connected
break;
}
}