您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ APP_TIMER_INIT函数代码示例

51自学网 2021-06-01 19:35:29
  C++
这篇教程C++ APP_TIMER_INIT函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中APP_TIMER_INIT函数的典型用法代码示例。如果您正苦于以下问题:C++ APP_TIMER_INIT函数的具体用法?C++ APP_TIMER_INIT怎么用?C++ APP_TIMER_INIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了APP_TIMER_INIT函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: utils_setup

/**@brief Function for the timer, tracer, and BSP initialization. */static void utils_setup(bool * p_erase_bonds){		uint32_t err_code;		bsp_event_t startup_event;    app_trace_init();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);		//bsp init ant		err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);	//FROM BLE uint32_t err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS,APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),bsp_event_handler);    APP_ERROR_CHECK(err_code);		  // Create timers for BLE    err_code = app_timer_create(&m_battery_timer_id,                                APP_TIMER_MODE_REPEATED,                                battery_level_meas_timeout_handler);    APP_ERROR_CHECK(err_code);    // Create battery timer.    err_code = app_timer_create(&m_rsc_meas_timer_id,                                APP_TIMER_MODE_REPEATED,                                rsc_meas_timeout_handler);    APP_ERROR_CHECK(err_code);				  err_code = bsp_btn_ble_init(NULL, &startup_event);    APP_ERROR_CHECK(err_code);    *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);		}
开发者ID:pavarinna,项目名称:AntBleCommunication,代码行数:34,


示例2: timers_init

/**@brief Timer initialization. * * @details Initializes the timer module. This creates and starts application timers. */void timers_init(void){    uint32_t err_code;    // Initialize timer module    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);    // Create battery timer    err_code = app_timer_create(&m_battery_timer_id,                                APP_TIMER_MODE_REPEATED,                                battery_level_meas_timeout_handler);    APP_ERROR_CHECK(err_code);        err_code = app_timer_create(&m_alert_led_blink_timer_id,                                APP_TIMER_MODE_SINGLE_SHOT,                                mild_alert_timeout_handler);    APP_ERROR_CHECK(err_code);    err_code = app_timer_create(&m_adv_led_blink_timer_id,                                APP_TIMER_MODE_SINGLE_SHOT,                                adv_led_blink_timeout_handler);    APP_ERROR_CHECK(err_code);		  err_code = app_timer_create(&m_rtc_update_timer_id,                                APP_TIMER_MODE_REPEATED,                                rtc_timeout_handler);    APP_ERROR_CHECK(err_code); 		 	}
开发者ID:johnsonhk88,项目名称:nrf51-ble-fittless-wearable,代码行数:34,


示例3: main

/** * @brief Function for application main entry. */int main(void){    uint8_t new_duty_cycle;    uint32_t err_code;    lfclk_init();    // Start APP_TIMER to generate timeouts.    APP_TIMER_INIT(APP_TIMER_PRESCALER, OP_QUEUES_SIZE, NULL);    /*Initialize low power PWM for all 3  channels of RGB or 3 channels of leds on pca10028*/    pwm_init();    while (true)    {        /* Duty cycle can also be changed from main context. */        new_duty_cycle = low_power_pwm_2.period - low_power_pwm_2.duty_cycle;        err_code = low_power_pwm_duty_set(&low_power_pwm_2, new_duty_cycle);        APP_ERROR_CHECK(err_code);        nrf_delay_ms(500);        new_duty_cycle = low_power_pwm_2.period - low_power_pwm_2.duty_cycle;        err_code = low_power_pwm_duty_set(&low_power_pwm_2, new_duty_cycle);        APP_ERROR_CHECK(err_code);        nrf_delay_ms(500);    }}
开发者ID:lyncxy119,项目名称:Sentry,代码行数:30,


示例4: main

/**@brief Application main function. */int main(void){	    uint32_t err_code;    bool erase_bonds;    uint8_t  start_string[] = START_STRING;	    // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    uart_init();    buttons_leds_init(&erase_bonds);    ble_stack_init();    gap_params_init();    services_init();    advertising_init();    conn_params_init();        printf("%s",start_string);	    UnityMain(0, NULL, RunAllTests);    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    APP_ERROR_CHECK(err_code);    // Enter main loop.    for (;;)    {        power_manage();    }}
开发者ID:KimmTY,项目名称:nRF51_Unit_Testing,代码行数:30,


示例5: main

/**@brief Function for application main entry. */int main(void){    uint32_t err_code = NRF_SUCCESS;    // Initialize.    ble_stack_init();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);    err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS,                        APP_TIMER_TICKS(APP_BUTTON_DETECTION_DELAY, APP_TIMER_PRESCALER),                        bsp_event_handler);    APP_ERROR_CHECK(err_code);    // Initialize advertising.    advertising_init();    // Start execution.    advertising_start();    // Enter main loop.    for (;;)    {        err_code = sd_app_evt_wait();        APP_ERROR_CHECK(err_code);    }}
开发者ID:kevin-ledinh,项目名称:banana-tree,代码行数:28,


示例6: main

/** * @brief Function for application main entry. */int main(void){    uint32_t err_code;    // Initialize.    err_code = NRF_LOG_INIT(NULL);    APP_ERROR_CHECK(err_code);    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);    APP_ERROR_CHECK(err_code);    ble_stack_init();    advertising_init();    // Start execution.    NRF_LOG_INFO("BLE Beacon started/r/n");    advertising_start();    // Enter main loop.    for (;; )    {        if (NRF_LOG_PROCESS() == false)        {            power_manage();        }    }}
开发者ID:AaltoNEPPI,项目名称:nRF52_dev,代码行数:29,


示例7: main

int main(void){    uint32_t err_code;        APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL);    err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),NULL);    APP_ERROR_CHECK(err_code);    leds_init();    timers_init();    uart_init();       ble_stack_init();    device_manager_init();    db_discovery_init();    uart_c_init();        printf("Scanning .../r/n");	    // Start scanning for peripherals and initiate connection    // with devices that advertise NUS UUID.    scan_start();    for (;;)    {        power_manage();    }}
开发者ID:NordicSemiconductor,项目名称:ble_app_uart_c_S120,代码行数:27,


示例8: main

int main(void){    nrf_gpio_cfg_output(PIN_LED_0);    nrf_gpio_cfg_output(PIN_LED_1);    nrf_gpio_cfg_input(PIN_BUTTON_0, GPIO_PIN_CNF_PULL_Pullup);    nrf_gpio_pin_clear(PIN_LED_0);    nrf_gpio_pin_clear(PIN_LED_1);    lfclk_request();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS,                   APP_TIMER_OP_QUEUE_SIZE, app_timer_evt_schedule);    APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);     create_timers();    timer_start(0);    timer_start(1);        while (1) {        app_sched_execute();        __WFI();    }}
开发者ID:sloboste,项目名称:eecs473-fitness-watch,代码行数:26,


示例9: jswrap_nrf_bluetooth_init

/*JSON{    "type" : "staticmethod",    "class" : "Bluetooth",    "name" : "init",     "generate" : "jswrap_nrf_bluetooth_init"}*/void jswrap_nrf_bluetooth_init(void){    uint32_t err_code;    bool erase_bonds;        // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);    buttons_leds_init(&erase_bonds);    ble_stack_init();    gap_params_init();    services_init();    advertising_init();    conn_params_init();        err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    APP_ERROR_CHECK(err_code);        ble_com = false;    // Enter main loop.    //for (;;)    //{        //power_manage();    //}}
开发者ID:programmicha,项目名称:Espruino,代码行数:31,


示例10: socket_medium_init

uint32_tsocket_medium_init(void){    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    static ipv6_medium_init_params_t ipv6_medium_init_params;    memset(&ipv6_medium_init_params, 0x00, sizeof(ipv6_medium_init_params));    ipv6_medium_init_params.ipv6_medium_evt_handler    = on_ipv6_medium_evt;    ipv6_medium_init_params.ipv6_medium_error_handler  = on_ipv6_medium_error;    ipv6_medium_init_params.use_scheduler              = false;    uint32_t err_code = ipv6_medium_init(&ipv6_medium_init_params, IPV6_MEDIUM_ID_BLE, &m_ipv6_medium);    APP_ERROR_CHECK(err_code);    eui48_t ipv6_medium_eui48;    err_code = ipv6_medium_eui48_get(m_ipv6_medium.ipv6_medium_instance_id, &ipv6_medium_eui48);    ipv6_medium_eui48.identifier[EUI_48_SIZE - 1] = 0x00;    err_code = ipv6_medium_eui48_set(m_ipv6_medium.ipv6_medium_instance_id, &ipv6_medium_eui48);    APP_ERROR_CHECK(err_code);    err_code = ipv6_medium_eui64_get(m_ipv6_medium.ipv6_medium_instance_id, &eui64_local_iid);    APP_ERROR_CHECK(err_code);    return NRF_SUCCESS;}
开发者ID:sische,项目名称:MasterThesis,代码行数:27,


示例11: utils_setup

/** * @brief Function for setup all thinks not directly associated witch ANT stack/protocol. * @desc Initialization of: @n *         - app_tarce for debug. *         - app_timer, presetup for bsp and ant pulse simulation. *         - bsp for signaling leds and user buttons (if use button is enabled in example). *         - ant pulse simulate for task of filling hrm profile data. */static void utils_setup(void){    uint32_t err_code;    app_trace_init();    // Initialize and start a single continuous mode timer, which is used to update the event time    // on the main data page.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);    #if (MODIFICATION_TYPE == MODIFICATION_TYPE_BUTTON)    /** @snippet [ANT Pulse simulator button init] */    err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS,                        APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),                        bsp_evt_handler);    /** @snippet [ANT Pulse simulator button init] */    #else    err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);    APP_ERROR_CHECK(err_code);    #endif    err_code = app_timer_create(&m_tick_timer,                                APP_TIMER_MODE_REPEATED,                                app_tick_handler);    APP_ERROR_CHECK(err_code);    // Schedule a timeout event every 2 seconds    err_code = app_timer_start(m_tick_timer, APP_TICK_EVENT_INTERVAL, NULL);    APP_ERROR_CHECK(err_code);}
开发者ID:kevin-ledinh,项目名称:banana-tree,代码行数:38,


示例12: main

int main(void){    bool erase_bonds;    // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL);    buttons_leds_init(&erase_bonds);    uart_init();    printf("Battery collector example/r/n");    ble_stack_init();    device_manager_init(erase_bonds);    db_discovery_init();    //hrs_c_init();    bas_c_init();    pwm_init();    // Start scanning for peripherals and initiate connection    // with devices that advertise Heart Rate UUID.    scan_start();    for (;; )    {        power_manage();    }}
开发者ID:rm2k3ru6ru6,项目名称:nRF51_SDK_8.1.0,代码行数:25,


示例13: main

/**@brief Application main function. */int main(void){    uint32_t err_code;    bool erase_bonds;    // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    buttons_leds_init(&erase_bonds);    ble_stack_init();    gap_params_init();    services_init();    advertising_init();    conn_params_init();	gpio_init();	timer_init(); //timer task to refresh RGB LED Board	game_init();    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    APP_ERROR_CHECK(err_code);    // Enter main loop.    for (;;) {        power_manage();		moveDisc(getInput());    }}
开发者ID:IamTechknow,项目名称:connect-four-ble,代码行数:29,


示例14: main

/**@brief Application main function. */int main(void){    uint32_t err_code;    bool erase_bonds;    // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    uart_init();        buttons_leds_init(&erase_bonds);    ble_stack_init();    gap_params_init();    services_init();    advertising_init();    conn_params_init();    printf("/r/nUART Start!/r/n");    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    APP_ERROR_CHECK(err_code);        // Enter main loop.    for (;;)    {        power_manage();    }}
开发者ID:monpetit,项目名称:inventus-factory-examples,代码行数:28,


示例15: main

int main(void){//	uint32_t err_code;    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);    APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);    ble_stack_init();    sys_Initialize();    sys_Timer_Handler_Init();    gap_params_init();    services_init();    advertising_init();    conn_params_init();    sec_params_init();    sys_printf("Gift Air Project Start/n/r");    advertising_start();    sys_Timer_Handler_Start();    NRF_WDT->RR[0] = WDT_RR_RR_Reload;  //Reload watchdog register 0    // Enter main loop    for (;;)    {        power_manage();       //2sec, 200ms    }}
开发者ID:Dalsoo,项目名称:Project2_20151023,代码行数:33,


示例16: timers_init

/**@brief Function for the Timer initialization. * * @details Initializes the timer module. This creates and starts application timers. */static void timers_init(void){    uint32_t err_code;    // Initialize timer module.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);    // Create timers.    err_code = app_timer_create(&m_battery_timer_id,                                APP_TIMER_MODE_REPEATED,                                battery_level_meas_timeout_handler);    APP_ERROR_CHECK(err_code);    err_code = app_timer_create(&m_heart_rate_timer_id,                                APP_TIMER_MODE_REPEATED,                                heart_rate_meas_timeout_handler);    APP_ERROR_CHECK(err_code);    err_code = app_timer_create(&m_rr_interval_timer_id,                                APP_TIMER_MODE_REPEATED,                                rr_interval_timeout_handler);    APP_ERROR_CHECK(err_code);    err_code = app_timer_create(&m_sensor_contact_timer_id,                                APP_TIMER_MODE_REPEATED,                                sensor_contact_detected_timeout_handler);    APP_ERROR_CHECK(err_code);}
开发者ID:NordicSemiconductor,项目名称:nrf51-ADC-examples,代码行数:32,


示例17: timers_app_init

void timers_app_init(void) {        APP_TIMER_INIT(BIKE_TIMER_PRESCALER, BIKE_TIMER_MAX_TIMERS,             BIKE_TIMER_OP_QUEUE_SIZE, false);    APP_TIMER_APPSH_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS,             APP_TIMER_OP_QUEUE_SIZE, true);}
开发者ID:azhn,项目名称:smartbike,代码行数:7,


示例18: main

int main(void){    ret_code_t err_code;    err_code = NRF_LOG_INIT();    APP_ERROR_CHECK(err_code);    NRF_LOG_PRINTF("[APP]: Multilink Example/r/n");    leds_init();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);    buttons_init();    ble_stack_init();    db_discovery_init();    lbs_c_init();    // Start scanning for peripherals and initiate connection to devices which    // advertise.    scan_start();    // Turn on the LED to signal scanning.    LEDS_ON(CENTRAL_SCANNING_LED);    for (;;)    {        // Wait for BLE events.        power_manage();    }}
开发者ID:xueliu,项目名称:nRF51822,代码行数:28,


示例19: main

/**@brief  Application main function. */int main(void){	//printf("main");    uint8_t start_string[] = START_STRING;    uint32_t err_code;        // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);    APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);    ble_stack_init();    //uart_init();    err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS,                        APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),                        NULL);    APP_ERROR_CHECK(err_code);    err_code = bsp_buttons_enable(1 << WAKEUP_BUTTON_ID);    APP_ERROR_CHECK(err_code);    gap_params_init();    services_init();    advertising_init();    conn_params_init();    sec_params_init();        printf("%s",start_string);    advertising_start();				init_leds();			    for (;;)    {        power_manage();		}}
开发者ID:inamuj,项目名称:ble_app_uart,代码行数:36,


示例20: main

int main(void){    uint32_t err_code;    bool erase_bonds;    // Initialize.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL);    buttons_leds_init(&erase_bonds);    uart_init();    printf("Relay Example/r/n");    ble_stack_init();    device_manager_init(erase_bonds);    db_discovery_init();    hrs_c_init();    rscs_c_init();        gap_params_init();    services_init();    advertising_init();    conn_params_init();    // Start scanning for peripherals and initiate connection    // with devices that advertise Heart Rate UUID.    scan_start();        // Start advertising.    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);    APP_ERROR_CHECK(err_code);        for (;; )    {        power_manage();    }}
开发者ID:451506709,项目名称:automated_machine,代码行数:34,


示例21: main

/** * @brief Function for application main entry. * @return 0. int return type required by ANSI/ISO standard. */int main(void){    uint32_t err_code = NRF_SUCCESS;    clock_initialization();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);    err_code = NRF_LOG_INIT(NULL);    APP_ERROR_CHECK(err_code);    err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);    APP_ERROR_CHECK(err_code);    // Set radio configuration parameters    radio_configure();    NRF_RADIO->PACKETPTR = (uint32_t)&packet;    err_code = bsp_indication_set(BSP_INDICATE_USER_STATE_OFF);    NRF_LOG_INFO("Wait for first packet/r/n");    APP_ERROR_CHECK(err_code);    NRF_LOG_FLUSH();        while (true)    {        uint32_t received = read_packet();        err_code = bsp_indication_set(BSP_INDICATE_RCV_OK);        NRF_LOG_INFO("Packet was received/r/n");        APP_ERROR_CHECK(err_code);        NRF_LOG_INFO("The contents of the package is %u/r/n", (unsigned int)received);        NRF_LOG_FLUSH();    }}
开发者ID:Goodjamp,项目名称:ble_app_template,代码行数:37,


示例22: main

/** * Function for application main entry. */int main(void){	    init_leds();    init_clock();    uint32_t err_code;    // Button configuration structure.    static app_button_cfg_t p_button[] = {  {BUTTON_1, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_handler},                                            {BUTTON_2, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_handler},                                            {BUTTON_3, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_handler},                                            {BUTTON_4, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_handler}};            // Macro for initializing the application timer module.    // It will handle dimensioning and allocation of the memory buffer required by the timer, making sure that the buffer is correctly aligned. It will also connect the timer module to the scheduler (if specified).    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL);    // Macro for initializing the GPIOTE module.    // It will handle dimensioning and allocation of the memory buffer required by the module, making sure that the buffer is correctly aligned.    APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);    // Initializing the buttons.    err_code = app_button_init(p_button, sizeof(p_button) / sizeof(p_button[0]), BUTTON_DEBOUNCE_DELAY);    APP_ERROR_CHECK(err_code);                                                // Enabling the buttons.										    err_code = app_button_enable();    APP_ERROR_CHECK(err_code);    while(true)    {        // Do nothing.    }}
开发者ID:ClarePhang,项目名称:nrf51-app-button-example,代码行数:37,


示例23: timers_init

/**@brief Function for the Timer initialization. * * @details Initializes the timer module. This creates and starts application timers. */static void timers_init(void){	uint32_t err_code;		/* Initialise timer module */	APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);	  // Create timers.  err_code = app_timer_create(&m_battery_timer_id,                              APP_TIMER_MODE_REPEATED,                              battery_level_meas_timeout_handler);  if (err_code == NRF_SUCCESS)		debug_printf("Battery timer initialised!/r/n");	else	{		debug_printf("Error with initialising battery timer./r/n");		APP_ERROR_CHECK(err_code);	}		err_code = app_timer_create(&m_temperature_timer_id,                              APP_TIMER_MODE_REPEATED,                              temperature_timeout_handler);		err_code = app_timer_create(&m_door_timer_id,                              APP_TIMER_MODE_REPEATED,                              door_timeout_handler);		    }
开发者ID:stelios26,项目名称:Aphrodite,代码行数:32,


示例24: timers_init

static void timers_init(void){    // Initialize timer module.    APP_TIMER_INIT(APP_TIMER_PRESCALER, 1, 2, false);        // Create timers.}
开发者ID:NordicSemiconductor,项目名称:ble_app_uart_c_S120,代码行数:7,


示例25: timers_init

/**@brief Function for the Timer initialization. * * @details Initializes the timer module. */static void timers_init(void){    // Initialize timer module, making it use the scheduler    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);        uint32_t err_code = app_timer_create(&m_advdata_update_timer, APP_TIMER_MODE_REPEATED, advdata_update_timer_timeout_handler);    APP_ERROR_CHECK(err_code);}
开发者ID:Chadizzm,项目名称:nrf51-ble-app-temp,代码行数:12,


示例26: timers_init

/**@brief Ladybug_Flash uses an app timer.  App timers require the low frequency clock to be ticking. * Initialize the timer module. * /callgraph */static void timers_init(void){  // Initialize the low frequency clock.  uint32_t err_code = nrf_drv_clock_init(NULL);  APP_ERROR_CHECK(err_code);  nrf_drv_clock_lfclk_request();  // Initialize the timer queue.  APP_TIMER_INIT(m_app_timer_prescaler, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);}
开发者ID:BitKnitting,项目名称:LadybugLiteBlue_Firmware,代码行数:12,


示例27: main

/**@brief Function for application main entry, does not return. * * @details The main function will do all necessary initalization. This includes sdm rx module * and SoftDevice. */int main(void){    uint32_t err_code;#if defined(TRACE_UART)    app_uart_comm_params_t comm_params =    {        RX_PIN_NUMBER,        TX_PIN_NUMBER,        RTS_PIN_NUMBER,        CTS_PIN_NUMBER,        APP_UART_FLOW_CONTROL_DISABLED,        false,        UART_BAUDRATE_BAUDRATE_Baud38400    };    APP_UART_FIFO_INIT(&comm_params,                       UART_RX_BUF_SIZE,                       UART_TX_BUF_SIZE,                       uart_error_handle,                       APP_IRQ_PRIORITY_LOW,                       err_code);    APP_ERROR_CHECK(err_code);#endif // TRACE_UART#if defined(TRACE_GPIO)    // Initialize timer module.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);    err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);    APP_ERROR_CHECK(err_code);#endif // TRACE_GPIO    // In case of logging enabled, we enable sdm_rx module first.    err_code = sdm_rx_init();    APP_ERROR_CHECK(err_code);    // Enable SoftDevice.    err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_50_PPM, softdevice_assert_callback);    APP_ERROR_CHECK(err_code);    // Set application IRQ to lowest priority.    err_code = sd_nvic_SetPriority(SD_EVT_IRQn, NRF_APP_PRIORITY_LOW);    APP_ERROR_CHECK(err_code);    // Enable application IRQ (triggered from protocol).    err_code = sd_nvic_EnableIRQ(SD_EVT_IRQn);    APP_ERROR_CHECK(err_code);    err_code = ant_stack_static_config();    APP_ERROR_CHECK(err_code);    // Setup Channel_0 as a SDM RX.    ant_channel_sdm_rx_setup();    sdm_main_loop();}
开发者ID:451506709,项目名称:automated_machine,代码行数:61,


示例28: main

int main(void){    uint32_t err_code;    bool erase_bonds;   // uint8_t  start_string[] = START_STRING;	  //const ble_gap_addr_t  t_addr={0,{0xaa,0x55,0x33,0x44,0x55,0x66}};//    const char  temp_str[]={0xaa,0x5c,0x00,0x02,0x00,0x00,0xa1,0x55};    // Initialize.    //bsp_configuration();    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);        buttons_leds_init(&erase_bonds);#if ENABLE_COS    simple_uart_init(UART_POWEROFF_BT_DELAY);#else     uart_init_lowPower();#endif		etSpim1NorFlashInit();#if DEBUG_UART_EN       //DbgPrintf("/r/n===flash_init===/r/n");#endif    ble_stack_init();    #ifdef BLE_DFU_APP_SUPPORT     device_manager_init(erase_bonds);#endif        //BT_set_address((UINT8 *)DEVICE_MAC_ADDR);    BT_set_address();    gap_params_init();       advertising_init();        services_init();    //advertising_init();    conn_params_init();  #if ENABLE_COS       SetToGetKEYID();#endif    dev_init();			      //err_code = ble_advertising_start(BLE_ADV_MODE_SLOW);#if DEBUG_UART_EN    //    DbgPrintf("go to advertising7/r/n");#endif     	 err_code = ble_advertising_start(BLE_ADV_MODE_FAST);   APP_ERROR_CHECK(err_code);        // Enter main loop.    for (;;)    {		  main_loop();		  		  power_manage();		  #if TAP_DOUBLE_CLCIK_ENABLE		  	test_display_step_num(test_click_count);		  #endif    }}
开发者ID:liuyuanbin,项目名称:ET-smart-band,代码行数:56,


示例29: timers_init

static void timers_init(void){	app_timer_id_t clockTimerId;    // Initialize timer module.    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);		app_timer_create( &clockTimerId, APP_TIMER_MODE_REPEATED, clockTickHandler );		app_timer_start( clockTimerId, APP_TIMER_TICKS( 500, APP_TIMER_PRESCALER), NULL );}
开发者ID:pilotniq,项目名称:WordWatch,代码行数:10,



注:本文中的APP_TIMER_INIT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ APP_TIMER_TICKS函数代码示例
C++ APP_LOG函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。