Mistake on this page?
Report an issue in GitHub or email us
numaker_eth_hal.h
1 /*
2  * Copyright (c) 2018 Nuvoton Technology Corp.
3  * Copyright (c) 2018 ARM Limited
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Description: NuMaker EMAC HAL header file
19  */
20 
21 #ifndef NUMAKER_ETH_HAL_
22 #define NUMAKER_ETH_HAL_
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include <ctype.h>
29 #include <stdio.h>
30 #include <string.h>
31 #include <stdlib.h>
32 
33 #ifdef NU_TRACE
34 #define NU_DEBUGF(x) { printf x; }
35 #else
36 #define NU_DEBUGF(x)
37 #endif
38 
39 typedef void (* eth_callback_t) (char, void*);
40 void mbed_mac_address(char *mac);
41 void numaker_eth_init(uint8_t *mac_addr);
42 void numaker_eth_trigger_rx(void);
43 int numaker_eth_get_rx_buf(uint16_t *len, uint8_t **buf);
44 uint8_t *numaker_eth_get_tx_buf(void);
45 void numaker_eth_trigger_tx(uint16_t length, void *p);
46 int numaker_eth_link_ok(void);
47 void numaker_eth_set_cb(eth_callback_t eth_cb, void *userData);
48 void numaker_set_mac_addr(uint8_t *addr);
49 void numaker_eth_enable_interrupts(void);
50 void numaker_eth_disable_interrupts(void);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif /* NUMAKER_ETH_HAL_ */
void mbed_mac_address(char *mac)
This returns a unique 6-byte MAC address, based on the interface UID If the interface is not present...
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.