-
Notifications
You must be signed in to change notification settings - Fork 1
/
cllc_linux.c
76 lines (66 loc) · 2.42 KB
/
cllc_linux.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/******************************************************************************
@file cllc_linux.c
@brief Linux Specific Coordinator Logical Link Controller
Group: CMCU LPC
$Target Device: DEVICES $
******************************************************************************
$License: BSD3 2019 $
******************************************************************************
$Release Name: PACKAGE NAME $
$Release Date: PACKAGE RELEASE DATE $
*****************************************************************************/
/******************************************************************************
Includes
*****************************************************************************/
#include <string.h>
#include "cllc.h"
#include "cllc_linux.h"
/******************************************************************************
Public Functions
*****************************************************************************/
/*!
Linux specific init
Public function defined in cllc_linux.h
*/
void CLLC_LINUX_init(uint8_t *chanMask, uint16_t *shortAddr, uint32_t *fhPAtrickleTime, uint32_t *fhPCtrickleTime)
{
if(CONFIG_FH_ENABLE)
{
memcpy( chanMask, linux_FH_ASYNC_CHANNEL_MASK, APIMAC_154G_CHANNEL_BITMAP_SIZ);
}
else
{
memcpy( chanMask, linux_CONFIG_CHANNEL_MASK, APIMAC_154G_CHANNEL_BITMAP_SIZ);
}
*shortAddr = CONFIG_COORD_SHORT_ADDR;
if(!linux_CERTIFICATION_TEST_MODE)
{
linux_CONFIG_TRICKLE_MIN_CLK_DURATION = linux_CONFIG_TRICKLE_MIN_CLK_DURATION;
linux_CONFIG_TRICKLE_MAX_CLK_DURATION = linux_CONFIG_TRICKLE_MAX_CLK_DURATION;
}
else if((linux_CONFIG_PHY_ID >= APIMAC_MRFSK_STD_PHY_ID_BEGIN) && (CONFIG_PHY_ID <= APIMAC_MRFSK_GENERIC_PHY_ID_BEGIN))
{
linux_CONFIG_TRICKLE_MIN_CLK_DURATION = 6000;
linux_CONFIG_TRICKLE_MAX_CLK_DURATION = 6000;
}
else
{
linux_CONFIG_TRICKLE_MIN_CLK_DURATION = 30000;
linux_CONFIG_TRICKLE_MAX_CLK_DURATION = 30000;
}
*fhPAtrickleTime = linux_CONFIG_TRICKLE_MIN_CLK_DURATION;
*fhPCtrickleTime = linux_CONFIG_TRICKLE_MAX_CLK_DURATION;
}
/*
* ========================================
* Texas Instruments Micro Controller Style
* ========================================
* Local Variables:
* mode: c
* c-file-style: "bsd"
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
* vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true
*/