⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wdp_common.c

📁 非常全的nrf2401设计资料
💻 C
字号:
/* Copyright (c) 2007 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
 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
 * the file.
 *
 * $LastChangedRevision: 2290 $
 */ 

/** @file
 * Common source file for Wireless Desktop Protocol device/host
 *
 * @author Lasse Olsen
 *
 */

#include "wdp_common.h"

void wdp_extract_channels(uint8_t seed, uint8_t *ch_tab)
{
  uint8_t index;
  uint8_t rand_var;

  rand_var = seed;

  for(index = 0; index < FAP_CH_TAB_SIZE; index++)
  {
    rand_var += 67;
    *(ch_tab+index) = (rand_var % WDP_CH_BIN_SIZE) + (index * WDP_CH_BIN_SIZE + WDP_CH_LOW);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -