SAM7X EMAC registers. More...
Functions | |
outr (EMAC_NCR, inr(EMAC_NCR)&~EMAC_MPE) | |
outr (EMAC_USRIO, EMAC_CLKEN) | |
void | EmacRxThread (void *arg) |
int | EmacOutput (NUTDEVICE *dev, NETBUF *nb) |
Send Ethernet packet. | |
int | EmacInit (NUTDEVICE *dev) |
Initialize Ethernet hardware. | |
Variables | |
return | rc |
NUTDEVICE | devAt91Emac |
Device information structure. |
SAM7X EMAC registers.
outr | ( | EMAC_NCR | , |
inr(EMAC_NCR)&~ | EMAC_MPE | ||
) |
outr | ( | EMAC_USRIO | , |
EMAC_CLKEN | |||
) |
void EmacRxThread | ( | void * | arg | ) |
References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_icb, EMAC_IER, ETHER_IS_UNICAST, ifnet::if_mac, ifnet::if_recv, _NETBUF::nb_dl, _EMACINFO::ni_insane, _EMACINFO::ni_mutex, _EMACINFO::ni_rx_rdy, _EMACINFO::ni_tx_quelen, _EMACINFO::ni_tx_queued, NutEventPost(), NutEventWait(), NutIrqEnable(), NutNetBufFree(), NutSleep(), NutThreadSetPriority(), outr, sig_EMAC, and _NBDATA::sz.
Send Ethernet packet.
dev | Identifies the device to use. |
nb | Network buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc(). |
References _NUTDEVICE::dev_dcb, _EMACINFO::ni_insane, _EMACINFO::ni_mutex, _EMACINFO::ni_tx_rdy, NutEventPost(), NutEventWait(), rc, _BufDescriptor::stat, and TXS_USED.
int EmacInit | ( | NUTDEVICE * | dev | ) |
Initialize Ethernet hardware.
Applications should do not directly call this function. It is automatically executed during during device registration by NutRegisterDevice().
dev | Identifies the device to initialize. |
References _NUTDEVICE::dev_dcb, EmacRxThread(), memset(), NULL, NUT_THREAD_NICRXSTACK, NUT_THREAD_STACK_ADD, NUT_THREAD_STACK_MULT, NutRegisterIrqHandler(), NutThreadCreate(), and sig_EMAC.
return rc |
Referenced by _putf(), _sbrk(), AceInput(), AceIOCtl(), AcePut(), AceRead(), AhdlcAt91Init(), AhdlcAt91IOCtl(), AhdlcAt91Put(), AhdlcAt91Read(), AhdlcAvrInit(), AhdlcAvrIOCtl(), AhdlcAvrPut(), AhdlcAvrRead(), AsixOutput(), At24cRead(), At24cWrite(), At45dbPageWrite(), At45dbParamRead(), At45dbParamSize(), At45dbParamWrite(), At45dNodeStatus(), At45dNodeTransfer(), At49bvParamWrite(), At49bvSectorWrite(), At91EfcCmdEx(), At91EfcParamWrite(), At91EfcSectorWrite(), At91ResetCause(), At91Spi0ChipSelect(), At91SpiBus0Select(), At91SpiBusNodeInit(), At91SpiGetBits(), At91SpiGetModeFlags(), At91SpiInit(), At91SpiInitChipSelects(), At91SpiReset(), At91SpiSetRate(), At91SpiTransfer2(), At91TwiInit(), Avr32FlashcCmd(), Avr32FlashcParamWrite(), Avr32FlashcSectorWrite(), Avr32ResetCause(), Avr32Spi0ChipSelect(), Avr32Spi1ChipSelect(), Avr32SpiBus0Select(), Avr32SpiBus1Select(), Avr32SpiBusNodeInit(), AvrSpiBus0NodeInit(), AvrSpiBus0Select(), AvrTargetCmd(), AvrTargetFusesRead(), AvrTargetFusesWriteSafe(), AvrTargetSignature(), CanGetFeatures(), CanOutput(), CanSetFeatures(), cs8900Output(), CSNicOutput(), CtlHseClock(), CtlHsiClock(), CtlPllClock(), Cy2239xGetDivider(), Cy2239xGetFreq(), Cy2239xGetPll(), Cy2239xPllEnable(), Cy2239xPllGetFreq(), DmOutput(), DS1307Init(), DS1307RamRead(), DS1307RamWrite(), DS1307RtcGetClock(), DS1307RtcReadRegs(), DS1307RtcWrite(), EditHistoryGet(), EmacOutput(), EnvRegisterVariable(), fclose(), fgetc(), fprintf(), fprintf_P(), fread(), fscanf(), fscanf_P(), fwrite(), fwrite_P(), GenCharSize(), GpioPinConfigGet(), GpioPinConfigSet(), GpioPinGet(), GpioPortGet(), GpioRegisterIrqHandler(), GpioSpiBus0Select(), GpioSpiBusSetRate(), HttpAuthBasicValidate(), HttpParseMultipartHeader(), HttpRegisterAuthBasic(), HttpRegisterCgiFunction(), HttpRegisterRedir(), HttpRegisterSsiVarHandler(), IntIsEnabled(), IpcpRxConfReq(), ISC_LIST(), LancOutput(), LiLiFindItem(), LiLiNodes(), LiLiPushItem(), Lpc17xxEmacOutput(), Lpc17xxIapParamWrite(), main(), MakePhatName(), MediaTypeHandlerBinary(), MmCardIOCtl(), MmCardUnmount(), NicOutput(), NicPhyRead(), NplRegisterIrqHandler(), NplSpiBusNodeInit(), NplSpiBusSelect(), NplUledStatus(), NutArchClockGet(), NutArpCacheQuery(), NutBlockDeviceClose(), NutBlockDeviceIOCtl(), NutBlockDeviceRead(), NutBlockDeviceWrite(), NutBlockDeviceWrite_P(), NutChat(), NutChat_P(), NutChatExpect(), NutDhcpError(), NutEventBroadcast(), NutEventBroadcastAsync(), NutEventPost(), NutFtpDataConnect(), NutFtpProcessRequest(), NutFtpServerSession(), NutGetKeyState(), NutGetKeyTime(), NutGetTickClock(), NutGetTickCount(), NutHeapRootAvailable(), NutHeapRootRegionAvailable(), NutHttpAuthValidate(), NutIpOutput(), NutIpRouteAdd(), NutIpRouteDel(), NutIpRouteList(), NutIrqDisable(), NutIrqEnable(), NutIrqSetMode(), NutIrqSetPriority(), NutNetBufCollect(), NutNetIfAddMcastAddr(), NutNetIfDelMcastAddr(), NutPhyCtl(), NutRegisterCanBus(), NutRegisterDevice(), NutRegisterDiscoveryCallback(), NutRegisterIrqHandler(), NutRegisterPhy(), NutRegisterSpiDevice(), NutRegisterSysIrqHandler(), NutRegisterTwiBus(), NutSmtpSendMailRequest(), NutSpiBusSetBits(), NutSpiBusSetMode(), NutSpiBusSetRate(), NutTcpDeviceIOCtl(), NutTcpDeviceWrite(), NutTcpDeviceWrite_P(), NutTcpGetSockOpt(), NutTcpSetSockOpt(), NutTwiGetSpeed(), NutTwiIOCtl(), NutTwiMasterError(), NutTwiMasterRegRead(), NutTwiMasterRegWrite(), NutTwiMasterTranceive(), NutTwiSetSpeed(), NutTwiSlaveError(), NutTwiSlaveListen(), NutTwiSlaveRespond(), NutUdpDestroySocket(), NutUdpError(), NutUdpGetSockOpt(), NutUdpSendTo(), NutUdpSetSockOpt(), PcfRtcGetClock(), PcfRtcGetStatus(), PcfRtcInit(), PcfRtcReadRegs(), PerCiWriteFormat(), Phat32FreeClusters(), PhatDirDelEntry(), PhatDirEntryFind(), PhatDirEntryStatus(), PhatDirOpenParent(), PhatDirReleaseChain(), PhatDirRemove(), PhatDirRenameEntry(), PhatFileClose(), PhatFileRead(), PhatFileWrite(), PhatSectorWrite(), PnutIOCtl(), printf(), printf_P(), putenv(), RawFsFileClose(), RawFsFileRead(), RawFsFileWrite(), rename(), s_printf(), s_vputs(), Sc16is752UsartGetClockMode(), Sc16is752UsartGetFlowControl(), Sc16is752UsartGetStatus(), scanf(), scanf_P(), setlogmask(), setlogserver(), SetPllClockSource(), SetSysClock(), SetSysClockSource(), ShtCommand(), ShtInit(), ShtRead(), SnmpAgent(), SnmpMibFind(), SnmpOidCmp(), SnmpOidCmpIdx(), SnmpOidTreeCmp(), SnmpSessionSendPdu(), SpiAt25IOCtl(), SpiAt25PageWrite(), SpiAt45dConfigRead(), SpiAt45dConfigSize(), SpiAt45dConfigWrite(), SpiAt45dIOCtl(), SpiAt45dPageWrite(), SpiFlashEnable(), SpiMmcIOCtl(), SpiMmcUnmount(), sprintf(), sprintf_P(), sscanf(), sscanf_P(), Stm32CanHw2Init(), Stm32RtcGetClock(), Stm32RtcInit(), Stm32Usart3BusSelect(), Stm32Usart3ChipSelect(), Stm32UsartBusNodeInit(), Stm32UsartSetStopBits(), StreamClientAccept(), StreamReadUntilChars(), StreamReadUntilString(), syslog_header(), Tlv320DacFlush(), UartAvrInput(), UartAvrIOCtl(), UartAvrPut(), UartAvrRead(), UDPReceiver(), UFlashFormat(), UromIOCtl(), UsartInit(), UsartIOCtl(), UsartRead(), UxmlParseTag(), vfprintf_P(), vfscanf_P(), VsCodecBeep(), VsCodecClose(), VsCodecIOCtl(), VsCodecMode(), VsCodecRead(), VsCodecWrite(), VsMemoryTest(), VsPlayerInterrupts(), VsPlayerThrottle(), VsPlayTime(), vsprintf(), vsprintf_P(), vsscanf_P(), X12EepromRead(), X12EepromWrite(), X12Init(), X12RtcGetAlarm(), X12RtcGetClock(), X12RtcGetStatus(), X12RtcReadRegs(), and X12RtcWrite().
{ 0, {'e', 't', 'h', '0', 0, 0, 0, 0, 0}, IFTYP_NET, 0, 0, &ifn_eth0, &dcb_eth0, EmacInit, 0, 0, 0, 0, 0, 0, 0 }
Device information structure.
A pointer to this structure must be passed to NutRegisterDevice() to bind this Ethernet device driver to the Nut/OS kernel. An application may then call NutNetIfConfig() with the name eth0 of this driver to initialize the network interface.