summaryrefslogtreecommitdiffstats
path: root/c/src/libchip/network/dwmac-core.h
blob: 3a35d007293955aca1583c7de9537be9a3c3de99 (plain) (blame)
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
 *
 * @brief DWMAC 10/100/1000 Network Interface Controllers Core Handling
 *
 * DWMAC 10/100/1000 on-chip Synopsys IP Ethernet controllers.
 * Driver core handling.
 * This header file is NOT part of the driver API.
 */

/*
 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
 *
 *  embedded brains GmbH
 *  Dornierstr. 4
 *  82178 Puchheim
 *  Germany
 *  <rtems@embedded-brains.de>
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifndef DWMAC_CORE_H_
#define DWMAC_CORE_H_

#include <stdint.h>
#include "dwmac-common.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

void dwmac_core_set_mac_addr(
  const uint8_t      addr[6],
  volatile uint32_t *reg_high,
  volatile uint32_t *reg_low );

void dwmac_core_set_mac(
  dwmac_common_context *self,
  const bool            enable );

void dwmac_core_dma_start_tx( dwmac_common_context *self );

void dwmac_core_dma_stop_tx( dwmac_common_context *self );

void dwmac_core_dma_start_rx( dwmac_common_context *self );

void dwmac_core_dma_stop_rx( dwmac_common_context *self );

void dwmac_core_dma_restart_rx( dwmac_common_context *self );

void dwmac_core_dma_restart_tx( dwmac_common_context *self );

void dwmac_core_enable_dma_irq_rx( dwmac_common_context *self );

void dwmac_core_enable_dma_irq_tx( dwmac_common_context *self );

void dwmac_core_disable_dma_irq_tx( dwmac_common_context *self );

void dwmac_core_disable_dma_irq_rx( dwmac_common_context *self );

void dwmac_core_reset_dma_irq_status_tx( dwmac_common_context *self );

void dwmac_core_reset_dma_irq_status_rx( dwmac_common_context *self );

void dwmac_core_dma_interrupt( void *arg );

void dwmac_core_dma_flush_tx_fifo( dwmac_common_context *self );

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* DWMAC_CORE_H_ */