资源简介
sx1301驱动源码,软件测试程序,全频道网络配置文件。只需要更改linux平台下交叉编译器编译就可以完成。里面包含常发,常收测试程序。
代码片段和文件信息
/*
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2013 Semtech-Cycleo
Description:
LoRa concentrator HAL auxiliary functions
License: Revised BSD License see LICENSE.TXT file include in the project
Maintainer: Sylvain Miermont
*/
/* -------------------------------------------------------------------------- */
/* --- DEPENDANCIES --------------------------------------------------------- */
/* fix an issue between POSIX and C99 */
#if __STDC_VERSION__ >= 199901L
#define _XOPEN_SOURCE 600
#else
#define _XOPEN_SOURCE 500
#endif
#include /* printf fprintf */
#include /* clock_nanosleep */
/* -------------------------------------------------------------------------- */
/* --- PRIVATE MACROS ------------------------------------------------------- */
#if DEBUG_AUX == 1
#define DEBUG_MSG(str) fprintf(stderr str)
#define DEBUG_PRINTF(fmt args...) fprintf(stderr“%s:%d: “fmt __FUNCTION__ __LINE__ args)
#else
#define DEBUG_MSG(str)
#define DEBUG_PRINTF(fmt args...)
#endif
/* -------------------------------------------------------------------------- */
/* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */
/* This implementation is POSIX-pecific and require a fix to be compatible with C99 */
void wait_ms(unsigned long a) {
struct timespec dly;
struct timespec rem;
dly.tv_sec = a / 1000;
dly.tv_nsec = ((long)a % 1000) * 1000000;
DEBUG_PRINTF(“NOTE dly: %ld sec %ld ns\n“ dly.tv_sec dly.tv_nsec);
if((dly.tv_sec > 0) || ((dly.tv_sec == 0) && (dly.tv_nsec > 100000))) {
clock_nanosleep(CLOCK_MONOTONIC 0 &dly &rem);
DEBUG_PRINTF(“NOTE remain: %ld sec %ld ns\n“ rem.tv_sec rem.tv_nsec);
}
return;
}
/* --- EOF ------------------------------------------------------------------ */
相关资源
- IAR For ARM 7.3最新注册机
- 郭天祥ARM9视频教程
- IAR ARM 7.8破解
- IAR For ARM V5.5 注册机
- IAR for ARM 7.40 破解
- IAR For ARM 7.4 破解
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- arm触摸屏与LCD校准程序三点校准法
- MP3文件ID3v2ID3v2APEv2标签读取
- ARM嵌入式项目实战
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- 基于ARM蓝牙传输源程序
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- USB 驱动 让电脑与arm进行通信
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
评论
共有 条评论