1.相关文件
2.示例
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "nrf.h"
#include "nrf_delay.h"
#include "app_error.h"
# include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
/** @brief Función para la entrada de la aplicación principal.
*/
int main(void)
{ APP_ERROR_CHECK(NRF_LOG_INIT(NULL)); NRF_LOG_DEFAULT_BACKENDS_INIT(); NRF_LOG_INFO("Ejemplo de temperatura iniciado.");
while (verdadero)
{ NRF_LOG_INFO("Temperatura real"); nrf_delay_ms(500);
NRF_LOG_FLUSH();
}
}