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