You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* This file contains NetX-specific debug helpers. */
9
+
10
+
/* API */
11
+
constchar*nx_status_toString(UINTstatus); /* Converts a NetX status macro to a printable string. Meant to be used with PRINTLN_...() macros (defined in another file). */
LAN8670_PLCA_Set_Node_Id(&lan8670, PLCA_VCU) // replace 'PLCA_VCU' with whatever board it is
39
+
*/
40
+
typedefenum {
41
+
PLCA_VCU, // 0. This is the PLCA coordinator node.
42
+
PLCA_COMPUTE,
43
+
PLCA_TPU,
44
+
PLCA_MSB1,
45
+
PLCA_MSB2,
46
+
PLCA_MSB3,
47
+
PLCA_MSB4,
48
+
PLCA_NODE8,
49
+
PLCA_NUM_NODES
50
+
} plca_node_id_t;
51
+
/* END CONFIG */
52
+
53
+
typedefstruct {
54
+
uint8_tsender_id;
55
+
uint8_trecipient_id;
56
+
uint8_tmessage_id;
57
+
uint8_tdata_length;
58
+
uint8_tdata[ETH_MESSAGE_SIZE];
59
+
} ethernet_message_t;
60
+
61
+
/* Function Pointers (for initialization). */
62
+
typedefvoid (*DriverFunction)(NX_IP_DRIVER*); /* User-supplied network driver used to send and receive IP packets. */
63
+
typedefvoid (*OnRecieve)(ethernet_message_tmessage); /* User-supplied function that will be called whenever an ethernet message is recieved. */
64
+
65
+
/**
66
+
* @brief Initializes the NetX ethernet system in a repo.
67
+
* @param node_id The ID (ethernet_node_t) of this node.
68
+
* @param driver User-supplied network driver function. Should be set to nx_stm32_eth_driver (from "nx_stm32_eth_driver.h") for STM32 projects.
69
+
* @param on_recieve User-supplied function to be called whenever an ethernet message is recieved. The function's only parameter is an ethernet_message_t instance containing the recieved message.
0 commit comments