資源簡介
MPU6050驅動,采用I2C驅動,基于NRF52832官方庫函數,方便移植。

代碼片段和文件信息
/*?Copyright?(c)?2014?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?“bsp.h“
#include?
#include?
#include?“nordic_common.h“
#include?“nrf.h“
#include?“nrf_gpio.h“
#include?“nrf_error.h“
#ifdef?BSP_UART_SUPPORT
#include?“nrf_log.h“
#endif?//?BSP_UART_SUPPORT
#ifndef?BSP_SIMPLE
#include?“app_timer.h“
#include?“app_button.h“
#endif?//?BSP_SIMPLE
#define?ADVERTISING_LED_ON_INTERVAL????????????200
#define?ADVERTISING_LED_OFF_INTERVAL???????????1800
#define?ADVERTISING_DIRECTED_LED_ON_INTERVAL???200
#define?ADVERTISING_DIRECTED_LED_OFF_INTERVAL??200
#define?ADVERTISING_WHITELIST_LED_ON_INTERVAL??200
#define?ADVERTISING_WHITELIST_LED_OFF_INTERVAL?800
#define?ADVERTISING_SLOW_LED_ON_INTERVAL???????400
#define?ADVERTISING_SLOW_LED_OFF_INTERVAL??????4000
#define?BONDING_INTERVAL???????????????????????100
#define?SENT_OK_INTERVAL???????????????????????100
#define?SEND_ERROR_INTERVAL????????????????????500
#define?RCV_OK_INTERVAL????????????????????????100
#define?RCV_ERROR_INTERVAL?????????????????????500
#define?ALERT_INTERVAL?????????????????????????200
#if?LEDS_NUMBER?>?0?&&?!(defined?BSP_SIMPLE)
static?bsp_indication_t?m_stable_state????????=?BSP_INDICATE_IDLE;
static?uint32_t?????????m_app_ticks_per_100ms?=?0;
static?uint32_t?????????m_indication_type?????=?0;
static?uint32_t?????????m_alert_mask??????????=?0;
APP_TIMER_DEF(m_leds_timer_id);
APP_TIMER_DEF(m_alert_timer_id);
#endif?//?LEDS_NUMBER?>?0?&&?!(defined?BSP_SIMPLE)
#if?BUTTONS_NUMBER?>?0
#ifndef?BSP_SIMPLE
static?bsp_event_callback_t???m_registered_callback?????????=?NULL;
static?bsp_button_event_cfg_t?m_events_list[BUTTONS_NUMBER]?=?{{BSP_EVENT_NOTHING?BSP_EVENT_NOTHING}};
APP_TIMER_DEF(m_button_timer_id);
static?void?bsp_button_event_handler(uint8_t?pin_no?uint8_t?button_action);
#endif?//?BSP_SIMPLE
static?const?uint32_t?m_buttons_list[BUTTONS_NUMBER]?=?BUTTONS_LIST;
#ifndef?BSP_SIMPLE
static?const?app_button_cfg_t?app_buttons[BUTTONS_NUMBER]?=
{
????#ifdef?BSP_BUTTON_0
????{BSP_BUTTON_0?false?BUTTON_PULL?bsp_button_event_handler}
????#endif?//?BUTTON_0
????#ifdef?BSP_BUTTON_1
????{BSP_BUTTON_1?false?BUTTON_PULL?bsp_button_event_handler}
????#endif?//?BUTTON_1
????#ifdef?BSP_BUTTON_2
????{BSP_BUTTON_2?false?BUTTON_PULL?bsp_button_event_handler}
????#endif?//?BUTTON_2
????#ifdef?BSP_BUTTON_3
????{BSP_BUTTON_3?false?BUTTON_PULL?bsp_button_event_handler}
????#endif?//?BUTTON_3
????#ifdef?BSP_BUTTON_4
????{BSP_BUTTON_4?false?BUTTON_PULL?bsp_button_event_handler}
????#endif?/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2339??2016-03-11?01:01??mpu6050\bsp\boards.h
?????文件??????21510??2016-03-11?01:01??mpu6050\bsp\bsp.c
?????文件??????16286??2016-03-11?01:01??mpu6050\bsp\bsp.h
?????文件???????8895??2016-03-11?01:01??mpu6050\bsp\bsp_btn_ble.c
?????文件???????2755??2016-03-11?01:01??mpu6050\bsp\bsp_btn_ble.h
?????文件???????3408??2016-03-11?01:01??mpu6050\bsp\n5_starterkit.h
?????文件???????6487??2016-03-11?01:01??mpu6050\bsp\pca10028.h
?????文件???????2117??2016-03-11?01:01??mpu6050\bsp\pca10031.h
?????文件???????6623??2016-03-11?01:01??mpu6050\bsp\pca10040.h
?????文件???????7205??2016-03-11?01:01??mpu6050\components\drivers_nrf\adc\nrf_drv_adc.c
?????文件??????10135??2016-03-11?01:01??mpu6050\components\drivers_nrf\adc\nrf_drv_adc.h
?????文件???????8165??2016-03-11?01:01??mpu6050\components\drivers_nrf\ble_flash\ble_flash.c
?????文件???????5828??2016-03-11?01:01??mpu6050\components\drivers_nrf\ble_flash\ble_flash.h
?????文件??????13862??2016-03-11?01:01??mpu6050\components\drivers_nrf\clock\nrf_drv_clock.c
?????文件???????9873??2016-03-11?01:01??mpu6050\components\drivers_nrf\clock\nrf_drv_clock.h
?????文件???????5405??2016-03-11?01:01??mpu6050\components\drivers_nrf\common\nrf_drv_common.c
?????文件???????6320??2016-03-11?01:01??mpu6050\components\drivers_nrf\common\nrf_drv_common.h
?????文件???????5311??2016-03-11?01:01??mpu6050\components\drivers_nrf\comp\nrf_drv_comp.c
?????文件???????9624??2016-03-11?01:01??mpu6050\components\drivers_nrf\comp\nrf_drv_comp.h
?????文件??????13889??2016-04-08?12:14??mpu6050\components\drivers_nrf\config\nrf_drv_config.h
?????文件???????2447??2016-03-11?01:01??mpu6050\components\drivers_nrf\config\nrf_drv_config_validation.h
?????文件????????747??2016-03-11?01:01??mpu6050\components\drivers_nrf\delay\nrf_delay.c
?????文件???????4221??2016-03-11?01:01??mpu6050\components\drivers_nrf\delay\nrf_delay.h
?????文件??????18149??2016-03-11?01:01??mpu6050\components\drivers_nrf\gpiote\nrf_drv_gpiote.c
?????文件??????12356??2016-03-11?01:01??mpu6050\components\drivers_nrf\gpiote\nrf_drv_gpiote.h
?????文件???????2285??2016-03-11?01:01??mpu6050\components\drivers_nrf\hal\nrf_adc.c
?????文件??????12310??2016-03-11?01:01??mpu6050\components\drivers_nrf\hal\nrf_adc.h
?????文件??????15889??2016-03-11?01:01??mpu6050\components\drivers_nrf\hal\nrf_clock.h
?????文件??????13678??2016-03-11?01:01??mpu6050\components\drivers_nrf\hal\nrf_comp.h
?????文件???????1780??2016-03-11?01:01??mpu6050\components\drivers_nrf\hal\nrf_ecb.c
............此處省略362個文件信息
- 上一篇:基于51單片機的交通信號燈程序
- 下一篇:簡單二階互聯系統的非線性動力學分析
評論
共有 條評論