资源简介
百度手环开源资料
ROM烧写工具.rar,
百度智能手环ROM设计.pdf,
百度智能手环蓝牙私有通信协议.pdf
百度智能手环硬件设计.pdf,
参考设计BOM.xls
duband-master.zip(源代码)
代码片段和文件信息
/* 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;
//
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 642048 2012-08-06 20:38 Release\bin\Depends.Exe
文件 32256 2013-11-08 17:57 Release\bin\hasher.exe
文件 199016 2013-11-04 18:52 Release\bin\Jli
文件 6269288 2013-11-04 18:52 Release\bin\Jli
文件 78848 2013-10-31 14:45 Release\bin\mergehex.exe
文件 421200 2013-08-01 13:22 Release\bin\msvcp100.dll
文件 770384 2013-08-01 13:22 Release\bin\msvcr100.dll
文件 93696 2013-10-31 14:37 Release\bin\nrfjprog.dll
文件 537600 2013-10-31 14:38 Release\bin\nrfjprog.exe
文件 345 2013-11-11 12:39 Release\config.ini
文件 210 2013-11-22 17:43 Release\merge.bat
文件 32 2014-03-14 17:43 Release\merge.crc
文件 14895976 2013-11-08 18:40 Release\tools\Setup_Jli
文件 2328576 2013-11-26 18:54 Release\YunFlash.exe
目录 0 2013-11-11 15:52 Release\bin
目录 0 2014-10-10 18:29 Release\logs
目录 0 2013-11-11 16:28 Release\tools
目录 0 2014-10-10 18:31 Release
----------- --------- ---------- ----- ----
26269475 18
评论
共有 条评论