上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 取字符串时候很有用:http://hi.baidu.com/pursuitofacm/item/d1e5ecfe93055804ff358230char* gpsinfo="$GPRMC,123456.78,A,2308.28715,N,11322.09875,E,0.195,123.1,24021... 阅读全文
posted @ 2014-04-22 18:15 wwjdwy 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 之前IAP时候记录过一些,今天对特定地方写又加深了印象,写与擦除都需要先unclock1 //读取指定地址的半字(16位数据)2 //faddr:读地址(此地址必须为2的倍数!!)3 //返回值:对应数据.4 u16 STMFLASH_ReadHalfWord(u32 faddr)5 {6 return *(vu16*)faddr; 7 }STMFLASH_ReadHalfWord1 //读取指定地址的字(32位数据)2 //faddr:读地址(此地址必须为2的倍数!!)3 //返回值:对应数据. 4 u32 STMFLASH_... 阅读全文
posted @ 2014-04-03 18:52 wwjdwy 阅读(793) 评论(0) 推荐(0) 编辑
摘要: uint8 ownAddress[B_ADDR_LEN]; //B_ADDR_LEN=6GAPRole_GetParameter(GAPROLE_BD_ADDR, ownAddress);#define GAPROLE_BD_ADDR0x304Device's Address. Read Only. Size is uint8[B_ADDR_LEN]. This item is read from the controller.读出正确,低字节在前 阅读全文
posted @ 2014-03-31 17:14 wwjdwy 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 主机会运行SCAN来搜寻广播中的设备运行函数: GAPCentralRole_StartDiscovery( DEFAULT_DISCOVERY_MODE, DEFAULT_DISCOVERY_ACTIVE_SCAN, DEFAULT_DISCOVERY_WHITE_LIST ); 1 /** 2 * @brief Start a device discovery scan. 3 * 4 * Public function... 阅读全文
posted @ 2014-03-31 16:37 wwjdwy 阅读(2157) 评论(0) 推荐(1) 编辑
摘要: #define GAPROLE_ADVERT_ENABLED 0x305 //!< Enable/Disable Advertising. Read/Write. Size is uint8. Default is TRUE=Enabled.#define GAPROLE_ADVERT_OFF_TIME 0x306 //!< Advertising Off Time for Limited advertisements (in milliseconds). Read/Write. Size is uint16. Defaultis 30 seconds. GAPROLE_ADVER 阅读全文
posted @ 2014-03-28 20:38 wwjdwy 阅读(2318) 评论(0) 推荐(1) 编辑
摘要: // Setup the GAP Bond Manager { uint32 passkey = 0; // passkey "000000" uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ; uint8 mitm = TRUE; uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY; uint8 bonding = TRUE; GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &pa... 阅读全文
posted @ 2014-03-28 20:26 wwjdwy 阅读(1381) 评论(0) 推荐(0) 编辑
摘要: TI 的OSAL做的很不错,不过看起来也挺费劲可能自己水平太差吧,网上买的谷雨的开发板觉得确实挺不错的。做点学习笔记,首先是记录OSAL里执行的顺序流程,主要是task ,event,message1,APP_Main.c:/* Initialize the operating system */ ... 阅读全文
posted @ 2014-03-26 15:33 wwjdwy 阅读(1957) 评论(0) 推荐(0) 编辑
摘要: STM32的分区从0x2000 0000开始。静态区,堆,栈。所有的全局变量,包括静态变量之类的,全部存储在静态存储区。紧跟静态存储区之后的,是堆区(如没用到malloc,则没有该区),之后是栈区,栈在程序中存储局部变量先看启动文件startup_stm32f10x_md.s的定义:; Amount of memory (in bytes) allocated for Stack; Tailor this value to your application needs; Stack Configuration; Stack Size (in Bytes) ; Stack_Size ... 阅读全文
posted @ 2014-03-14 19:35 wwjdwy 阅读(2760) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 * DS1302.h 3 * 4 * Created on: 2013-11-27 5 * Author: Allen 6 */ 7 8 #ifndef DS1302_H_ 9 #define DS1302_H_10 11 #include 12 #include "MyType.h"13 14 //时间结构体15 typedef struct16 {17 uchar year; //00-99,前面自己加入20,比如读出13为201318 uchar month;19 uchar date;20 uc... 阅读全文
posted @ 2013-12-01 21:20 wwjdwy 阅读(785) 评论(0) 推荐(0) 编辑
摘要: 搞了两天单脉冲没搞定,无意中发现,这个利用主从模式的门控方式来控制一路PWM的输出长度很有效。 1 //TIM2 PWM输出,由TIM4来控制其输出与停止 2 //frequency_tim2:TIM2 PWM输出周期:KHz 3 //duty_tim2:TIM2 PWM占空比 0-100 4 //period_tim4: TIM4控制TIM2总周期,单位0.1ms 5 //duty_tim4: TIM4控制TIM2输出时间,单位0.1ms 6 7 void TIM2_CH3_PA2_PWM_TIM4_CH4_GATE(unsigned short int frequency_tim2,c.. 阅读全文
posted @ 2013-11-25 13:22 wwjdwy 阅读(1986) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页