63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
/**
|
|
* @file aconnoHelpers.cpp
|
|
* @author Jurica Resetar (Jurica@aconno.de)
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2019-01-22
|
|
*
|
|
* @copyright Copyright (c) 2019
|
|
*
|
|
*/
|
|
|
|
#include "aconnoHelpers.h"
|
|
#include "aconnoHelpers.h"
|
|
#include "sdk_config.h"
|
|
#include "app_error.h"
|
|
#include "app_timer.h"
|
|
#include "nrf_drv_clock.h"
|
|
|
|
#include "nrf_log.h"
|
|
#include "nrf_log_ctrl.h"
|
|
#include "nrf_log_default_backends.h"
|
|
|
|
/**@brief Function for the Timer initialization.
|
|
*
|
|
* @details Initializes the timer module. This creates and starts application timers.
|
|
*/
|
|
void timers_init(void)
|
|
{
|
|
// Initialize timer module.
|
|
ret_code_t err_code = app_timer_init();
|
|
APP_ERROR_CHECK(err_code);
|
|
}
|
|
|
|
/**@brief Function for starting application timers.
|
|
* @details Timers are run after the scheduler has started.
|
|
*/
|
|
void application_timers_start(void)
|
|
{
|
|
}
|
|
|
|
/**@brief Clear bond information /*/
|
|
void delete_bonds(void)
|
|
{
|
|
NRF_LOG_INFO("Erase bonds!");
|
|
}
|
|
|
|
/**@brief Function for initializing the nrf log module. */
|
|
void log_init(void)
|
|
{
|
|
ret_code_t err_code = NRF_LOG_INIT(NULL);
|
|
APP_ERROR_CHECK(err_code);
|
|
|
|
NRF_LOG_DEFAULT_BACKENDS_INIT();
|
|
}
|
|
|
|
/**@brief Function for initializing the clock.
|
|
*/
|
|
void clock_init(void)
|
|
{
|
|
ret_code_t err_code = nrf_drv_clock_init();
|
|
APP_ERROR_CHECK(err_code);
|
|
}
|