summaryrefslogtreecommitdiff
path: root/cp/beacon/test/sync/hal/phy/src/phy.c
blob: 9a28b9b9d8eb729fb27828bd78923b05a80a9ea7 (plain)
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
/* Cesar project {{{
 *
 * Copyright (C) 2007 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    hal/phy/src/phy.c
 * \brief   « brief description »
 * \ingroup « module »
 *
 * « long description »
 */
#include "common/std.h"
#include "hal/phy/phy.h"

phy_t phy_global;

phy_t *
phy_init (void)
{
    phy_t *ctx = &phy_global;
    phy_clock_set_numerator(ctx, 1000000);
    phy_set_freqerror (ctx, 0);
    return ctx;
}


void
phy_clock_set_numerator (phy_t *ctx, uint numerator)
{
    ctx->numerator = numerator;
}

void
phy_set_freqerror (phy_t *ctx, double rho)
{
    ctx->rho = rho;
}