@@ -41,15 +41,16 @@ typedef struct {
4141 * @param device_address The address of the LAN8670.
4242 * @param read Function pointer for reading data from the LAN8670.
4343 * @param write Function pointer for writing data to the LAN8670.
44+ * @return 0 on success, or a non-zero error code.
4445 */
45- void lan8670_init (lan8670_t * lan , uint32_t device_address , lan8670_ReadReg_Func read , lan8670_WriteReg_Func write ); // Initializes a LAN8670 instance.
46+ int32_t LAN8670_Init (lan8670_t * lan ); // Initializes a LAN8670 instance.
4647
4748/**
4849 * @brief Performs a software reset of the LAN8670 Ethernet PHY.
4950 * @param lan Pointer to the lan8670_t instance.
5051 * @return 0 on success, or a non-zero error code.
5152 */
52- int lan8670_reset (lan8670_t * lan ); // Performs a software reset of the LAN8670 Ethernet PHY.
53+ int32_t LAN8670_Reset (lan8670_t * lan ); // Performs a software reset of the LAN8670 Ethernet PHY.
5354
5455/**
5556 * @brief Enables or disables loopback mode on the LAN8670.
@@ -62,7 +63,7 @@ int lan8670_reset(lan8670_t *lan); // Performs a software reset of the LAN8670 E
6263 * @param setting true to enable loopback mode, false to disable it.
6364 * @return 0 on success, or a non-zero error code.
6465 */
65- int lan8670_loopback (lan8670_t * lan , bool setting ); // Enables or disables loopback mode on the LAN8670.
66+ int32_t LAN8670_Loopback (lan8670_t * lan , bool setting ); // Enables or disables loopback mode on the LAN8670.
6667
6768/**
6869 * @brief Enables or disables the LAN8670's low power mode.
@@ -74,15 +75,15 @@ int lan8670_loopback(lan8670_t *lan, bool setting); // Enables or disables loopb
7475 * @param setting true to enable low power mode, false to disable it.
7576 * @return 0 on success, or a non-zero error code.
7677 */
77- int lan8670_low_power_mode (lan8670_t * lan , bool setting ); // Enables or disables the LAN8670's low power mode.
78+ int32_t LAN8670_Low_Power_Mode (lan8670_t * lan , bool setting ); // Enables or disables the LAN8670's low power mode.
7879
7980/**
8081 * @brief Electrically isolates the LAN8670 from MII/RMII.
8182 * @param lan Pointer to the lan8670_t instance.
8283 * @param setting true to isolate the device, false for normal operation.
8384 * @return 0 on success, or a non-zero error code.
8485 */
85- int lan8670_isolate (lan8670_t * lan , bool setting ); // Electrically isolates the LAN8670 from MII/RMII.
86+ int32_t LAN8670_Isolate (lan8670_t * lan , bool setting ); // Electrically isolates the LAN8670 from MII/RMII.
8687
8788/**
8889 * @brief Enables or disables the LAN8670's collision test mode.
@@ -95,23 +96,23 @@ int lan8670_isolate(lan8670_t *lan, bool setting); // Electrically isolates the
9596 * @param setting true to enable collision test mode, false to disable it.
9697 * @return 0 on success, or a non-zero error code.
9798 */
98- int lan8670_collision_test (lan8670_t * lan , bool setting ); // Enables or disables the LAN8670's collision test mode.
99+ int32_t LAN8670_Collision_Test (lan8670_t * lan , bool setting ); // Enables or disables the LAN8670's collision test mode.
99100
100101/**
101102 * @brief Detects jabber condition on the LAN8670.
102103 * @param lan Pointer to the lan8670_t instance.
103104 * @param jabber_status Pointer to a boolean variable to store the jabber status.
104105 * @return 0 on success, or a non-zero error code.
105106 */
106- int lan8670_detect_jabber (lan8670_t * lan , bool * jabber_status ); // Detects jabber condition on the LAN8670.
107+ int32_t LAN8670_Detect_Jabber (lan8670_t * lan , bool * jabber_status ); // Detects jabber condition on the LAN8670.
107108
108109/**
109110 * @brief Enables or disables collision detection on the LAN8670.
110111 * @param lan Pointer to the lan8670_t instance.
111112 * @param setting true to enable collision detection, false to disable it.
112113 * @return 0 on success, or a non-zero error code.
113114 */
114- int lan8670_collision_detection (lan8670_t * lan , bool setting );
115+ int32_t LAN8670_Collision_Detection (lan8670_t * lan , bool setting );
115116
116117/**
117118 * @brief Enables or disables Physical Layer Collision Avoidence (PLCA).
@@ -124,15 +125,15 @@ int lan8670_collision_detection(lan8670_t *lan, bool setting);
124125 * @param setting true to enable PLCA, false to disable it.
125126 * @return 0 on success, or a non-zero error code.
126127 */
127- int lan8670_plca_on (lan8670_t * lan , bool setting );
128+ int32_t LAN8670_PLCA_On (lan8670_t * lan , bool setting );
128129
129130/**
130131 * @brief Resets the PLCA reconciliation sublayer.
131132 *
132133 * @param lan Pointer to the lan8670_t instance.
133134 * @return 0 on success, or a non-zero error code.
134135 */
135- int lan8670_plca_reset (lan8670_t * lan );
136+ int32_t LAN8670_PLCA_Reset (lan8670_t * lan );
136137
137138/**
138139 * @brief Configures the maximum number of nodes supported on the multidrop network.
@@ -144,7 +145,7 @@ int lan8670_plca_reset(lan8670_t *lan);
144145 * @param node_count The number of nodes on the network.
145146 * @return 0 on success, or a non-zero error code.
146147 */
147- int lan8670_plca_set_node_count (lan8670_t * lan , uint8_t node_count );
148+ int32_t LAN8670_PLCA_Set_Node_Count (lan8670_t * lan , uint8_t node_count );
148149
149150/**
150151 * @brief Sets the ID of the PLCA node.
@@ -156,14 +157,14 @@ int lan8670_plca_set_node_count(lan8670_t *lan, uint8_t node_count);
156157 * @param id The ID of the PLCA node (0-31).
157158 * @return 0 on success, or a non-zero error code.
158159 */
159- int lan8670_plca_set_node_id (lan8670_t * lan , uint8_t id );
160+ int32_t LAN8670_PLCA_Set_Node_Id (lan8670_t * lan , uint8_t id );
160161
161162/**
162163 * @brief Gets the current link state of the LAN8670.
163164 * @param lan Pointer to the lan8670_t instance.
164165 * @param link_up Pointer to a boolean variable to store the link state (true if link is up, false if down).
165166 * @return 0 on success, or a non-zero error code.
166167 */
167- int lan8670_get_link_state (lan8670_t * lan , bool * link_up );
168+ int32_t LAN8670_Get_Link_State (lan8670_t * lan , bool * link_up );
168169
169170// clang-format on
0 commit comments