资源简介
手环APP很详细的资料
代码片段和文件信息
/* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is property of Nordic Semiconductor ASA.
* Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
*
* Licensees are granted free non-transferable use of the information. NO
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* the file.
*
*/
#include “app_button.h“
#include
#include “nordic_common.h“
#include “app_util.h“
#include “app_gpiote.h“
#include “app_timer.h“
#include “app_error.h“
static app_button_cfg_t * mp_buttons = NULL; /**< Button configuration. */
static uint8_t m_button_count; /**< Number of configured buttons. */
static uint32_t m_active_low_states_mask; /**< Mask representing buttons which are active low. */
static uint32_t m_active_high_states_mask; /**< Mask representing buttons which are active high. */
static uint32_t m_detection_delay; /**< Delay before a button is reported as pushed. */
static app_button_evt_schedule_func_t m_evt_schedule_func; /**< Pointer to function for propagating button events to the scheduler. */
static app_gpiote_user_id_t m_gpiote_user_id; /**< GPIOTE user id for buttons module. */
static app_timer_id_t m_detection_delay_timer_id; /**< Polling timer id. */
/**@brief Function for executing the application button handler for specified button.
*
* @param[in] p_btn Button that has been pushed.
*/
static void button_handler_execute(app_button_cfg_t * p_btn)
{
if (m_evt_schedule_func != NULL)
{
uint32_t err_code = m_evt_schedule_func(p_btn->button_handler p_btn->pin_no);
APP_ERROR_CHECK(err_code);
}
else
{
p_btn->button_handler(p_btn->pin_no);
}
}
/**@brief Function for handling the timeout that delays reporting buttons as pushed.
*
* @details The detection_delay_timeout_handler(...) is a call-back issued from the app_timer
* module. It is called with the p_context parameter. The p_context parameter is
* provided to the app_timer module when a timer is started using the call
* @ref app_timer_start. On @ref app_timer_start the p_context will be holding the
* currently pressed buttons.
*
* @param[in] p_context Pointer used for passing information app_start_timer() was called.
* In the app_button module the p_context holds information on pressed
* buttons.
*/
static void detection_delay_timeout_handler(void * p_context)
{
uint32_t err_code;
uint32_t event_pins_mask;
uint32_t current_state_pins;
uint32_t active_pins = 0;
// Get state of pins when timer was started.
event_pins_mask = (uint32_t)p_context;
//
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-09-16 03:53 duband-master\
文件 1063249 2014-09-16 03:53 duband-master\BaiduWristbandTester-v1.apk
文件 11324 2014-09-16 03:53 duband-master\LICENSE
文件 240 2014-09-16 03:53 duband-master\README.md
文件 5463591 2014-09-16 03:53 duband-master\Wearable.apk
目录 0 2014-09-16 03:53 duband-master\bootloader\
目录 0 2014-09-16 03:53 duband-master\bootloader\Source\
目录 0 2014-09-16 03:53 duband-master\bootloader\Source\inc\
文件 1865 2014-09-16 03:53 duband-master\bootloader\Source\inc\bootloader.h
文件 1571 2014-09-16 03:53 duband-master\bootloader\Source\inc\bootloader_types.h
文件 1123 2014-09-16 03:53 duband-master\bootloader\Source\inc\bootloader_util.h
文件 2095 2014-09-16 03:53 duband-master\bootloader\Source\inc\dfu.h
文件 979 2014-09-16 03:53 duband-master\bootloader\Source\inc\dfu_transport.h
文件 6847 2014-09-16 03:53 duband-master\bootloader\Source\inc\dfu_types.h
目录 0 2014-09-16 03:53 duband-master\bootloader\Source\src\
文件 7609 2014-09-16 03:53 duband-master\bootloader\Source\src\arm_startup_nrf51.s
文件 6108 2014-09-16 03:53 duband-master\bootloader\Source\src\bootloader.c
文件 2961 2014-09-16 03:53 duband-master\bootloader\Source\src\bootloader_util_arm.c
文件 15813 2014-09-16 03:53 duband-master\bootloader\Source\src\dfu_dual_bank.c
文件 9915 2014-09-16 03:53 duband-master\bootloader\Source\src\dfu_single_bank.c
文件 33910 2014-09-16 03:53 duband-master\bootloader\Source\src\dfu_transport_ble.c
文件 9484 2014-09-16 03:53 duband-master\bootloader\Source\src\dfu_transport_serial.c
文件 2625 2014-09-16 03:53 duband-master\bootloader\Source\src\hci_transport_config.h
文件 7359 2014-09-16 03:53 duband-master\bootloader\Source\src\main.c
目录 0 2014-09-16 03:53 duband-master\bootloader\nrf51822\
目录 0 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\
目录 0 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\app_common\
文件 8076 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\app_common\app_button.h
文件 2931 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\app_common\app_error.h
文件 3277 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\app_common\app_fifo.h
文件 7989 2014-09-16 03:53 duband-master\bootloader\nrf51822\Include\app_common\app_gpiote.h
............此处省略561个文件信息
- 上一篇:电子技术自学完全版PDF
- 下一篇:《互联网+:从IT到DT》完整版.pdf
评论
共有 条评论