mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-08 16:11:18 +00:00
Added MDNS and driver support for multicast
This commit is contained in:
1 parent
b44193780e
commit
6f697db49d
31 files changed
+766
-168
No files matched your search
@@ -115,9 +115,21 @@ static bool mg_tcpip_driver_imxrt_init(struct mg_tcpip_if *ifp) {
|
||||
ENET->RDAR = MG_BIT(24); // Receive Descriptors have changed
|
||||
ENET->TDAR = MG_BIT(24); // Transmit Descriptors have changed
|
||||
// ENET->OPD = 0x10014;
|
||||
uint32_t hash_table[2] = {0, 0};
|
||||
ENET->IAUR = hash_table[1];
|
||||
ENET->IALR = hash_table[0];
|
||||
#if MG_TCPIP_MCAST
|
||||
// RM 37.3.4.3.2
|
||||
// uint8_t hash64 = ((~mg_crc32(0, mcast_addr, 6)) >> 26) & 0x3f;
|
||||
// hash_table[((uint8_t)hash64) >> 5] |= (1 << (hash64 & 0x1f));
|
||||
hash_table[1] = MG_BIT(1); // above reduces to this for mDNS addr
|
||||
#endif
|
||||
ENET->GAUR = hash_table[1];
|
||||
ENET->GALR = hash_table[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Transmit frame
|
||||
static size_t mg_tcpip_driver_imxrt_tx(const void *buf, size_t len,
|
||||
struct mg_tcpip_if *ifp) {
|
||||
|
||||
Reference in new issue
Block a user