summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/inc/tonemask.h
blob: f2af7940194cfc2e101e14cec73b35cb232e1184 (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
#ifndef hal_phy_inc_tonemask_h
#define hal_phy_inc_tonemask_h
/* Cesar project {{{
 *
 * Copyright (C) 2013 MStar Semiconductor
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    hal/phy/inc/tonemask.h
 * \brief   HAL Phy tonemask tools.
 * \ingroup hal_phy
 */

/** Number of neighbors to look at to make a HP10 tonemask. */
#define PHY_HP10_TONEMASK_NEIGHBORS 1

BEGIN_DECLS

/**
 * Compute amplitude map which corresponds to tonemask.
 * \param  tonemask  tonemask data
 * \param  ampmap  room to store amplitude map (same size as tonemap,
 * PHY_TONEMAP_WORDS)
 */
void
phy_tonemask_to_ampmap (const u32 *tonemask, u32 *ampmap);

/**
 * Compute HP10 tonemask which corresponds to tonemask.
 * \param  tonemask  tonemask data
 * \param  tonemask10  room to store HP10 tonemask (PHY_HP10_TONEMASK_WORDS),
 * can directly map to hardware registers
 */
void
phy_tonemask_to_tonemask10 (const u32 *tonemask, volatile u32 *tonemask10);

END_DECLS

#endif /* hal_phy_inc_tonemask_h */