wdp_common.c

来自「这是nrf24lu1的无线鼠标源代码,应用平台是keil c」· C语言 代码 · 共 30 行

C
30
字号
/* Copyright (c) 2007 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is confidential property of 
 * Nordic Semiconductor. The use, copying, transfer or disclosure 
 * of such information is prohibited except by express written
 * agreement with Nordic Semiconductor.
 */ 

/** @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 + =
减小字号Ctrl + -
显示快捷键?