Mistake on this page?
Report an issue in GitHub or email us
phy.h
1 /***********************************************************************************************************************
2  * DISCLAIMER
3  * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
4  * other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5  * applicable laws, including copyright laws.
6  * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
7  * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
8  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM
9  * EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES
10  * SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS
11  * SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12  * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
13  * this software. By using this software, you agree to the additional terms and conditions found by accessing the
14  * following link:
15  * http://www.renesas.com/disclaimer
16  *
17  * Copyright (C) 2018-2020 Renesas Electronics Corporation. All rights reserved.
18  ***********************************************************************************************************************/
19 /* Copyright (c) 2018-2020 Renesas Electronics Corporation.
20  * SPDX-License-Identifier: Apache-2.0
21  *
22  * Licensed under the Apache License, Version 2.0 (the "License");
23  * you may not use this file except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  * http://www.apache.org/licenses/LICENSE-2.0
27  *
28  * Unless required by applicable law or agreed to in writing, software
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  */
34 /***********************************************************************************************************************
35  * File Name : phy.h
36  * Version : 1.00
37  * Description : Ethernet PHY device driver
38  ***********************************************************************************************************************/
39 
40 /* Guards against multiple inclusion */
41 #ifndef PHY_H
42 #define PHY_H
43 
44 /***********************************************************************************************************************
45  Includes <System Includes> , "Project Includes"
46  ***********************************************************************************************************************/
47 #include <stdint.h>
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 /***********************************************************************************************************************
53  Macro definitions
54  ***********************************************************************************************************************/
55 /* PHY return definitions */
56 #define R_PHY_OK (0)
57 #define R_PHY_ERROR (-1)
58 
59 /***********************************************************************************************************************
60  Typedef definitions
61  ***********************************************************************************************************************/
62 typedef enum LinkStatE {
63  PHY_NO_LINK = 0, PHY_LINK_10H, PHY_LINK_10F, PHY_LINK_100H, PHY_LINK_100F
64 } linkstat_t;
65 
66 /***********************************************************************************************************************
67  Exported global variables
68  ***********************************************************************************************************************/
69 
70 /***********************************************************************************************************************
71  Exported global functions (to be accessed by other files)
72  ***********************************************************************************************************************/
73 extern int16_t phy_init(uint32_t channel);
74 extern void phy_start_autonegotiate(uint32_t channel, uint8_t pause);
75 extern int16_t phy_set_autonegotiate(uint32_t channel, uint16_t *pline_speed_duplex, uint16_t *plocal_pause,
76  uint16_t *ppartner_pause);
77 extern int16_t phy_get_link_status(uint32_t channel);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif /* PHY_H */
84 
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.