summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/soft/bridgedma/inc/bridgedma.h
blob: 79fd9aedbf8d022a5ac1d204759f34493adafad7 (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
#ifndef hal_phy_soft_bridgedma_inc_bridgedma_h
#define hal_phy_soft_bridgedma_inc_bridgedma_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    hal/phy/soft/bridgedma/inc/bridgedma.h
 * \brief   Context for the bridge DMA soft version.
 * \ingroup hal_phy
 *
 */
#include "lib/crc.h"
#include "hal/phy/inc/bridgedma_common.h"

typedef enum
{
    HAL_PHY_BRIDGEDMA_PB_TO_MACFRAME,
    HAL_PHY_BRIDGEDMA_MACFRAME_TO_PB
} bridgedma_copy_dir_t;

struct phy_bridgedma_t
{
    /* Bridge DMA context. */
    phy_bridgedma_common_t bridge;

    /** crc context. */
    crc_t crc_ctx;
    uint icv_substitution;
    uint icv_current;

    /** Bridge DMA status. */
    phy_bridgedma_status_t status;

    /** Bridge job current. */
    phy_bridgedma_job_t *job_current;
};

#endif /* hal_phy_soft_bridgedma_inc_bridgedma_h */