Macros | Functions
emac.c File Reference
#include <ti/devices/msp432e4/inc/msp432e411y.h>
#include "types.h"
#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_emac.h"
#include "debug.h"
#include "emac.h"
#include "sysctl.h"
#include "interrupt.h"
#include "sw_crc.h"

Macros

#define VALID_CONFIG_FLAGS
 
#define VALID_FRMFILTER_FLAGS
 
#define EMAC_MASKABLE_INTS
 
#define EMAC_NORMAL_INTS
 
#define EMAC_ABNORMAL_INTS
 
#define EMAC_NON_MASKED_INTS
 
#define NUM_MAC_ADDR   4
 
#define MAC_ADDR_OFFSET   (EMAC_O_ADDR1L - EMAC_O_ADDR0L)
 
#define EMAC_O_ADDRL(n)   (EMAC_O_ADDR0L + (MAC_ADDR_OFFSET * (n)))
 
#define EMAC_O_ADDRH(n)   (EMAC_O_ADDR0H + (MAC_ADDR_OFFSET * (n)))
 
#define NUM_CLOCK_DIVISORS
 
#define DEV_ADDR(x)   ((x & 0xF000) >> 12)
 
#define REG_ADDR(x)   ((x & 0x0FFF))
 

Functions

void EMACInit (uint32_t ui32Base, uint32_t ui32SysClk, uint32_t ui32BusConfig, uint32_t ui32RxBurst, uint32_t ui32TxBurst, uint32_t ui32DescSkipSize)
 
void EMACReset (uint32_t ui32Base)
 
void EMACPHYConfigSet (uint32_t ui32Base, uint32_t ui32Config)
 
void EMACConfigSet (uint32_t ui32Base, uint32_t ui32Config, uint32_t ui32ModeFlags, uint32_t ui32RxMaxFrameSize)
 
void EMACConfigGet (uint32_t ui32Base, uint32_t *pui32Config, uint32_t *pui32Mode, uint32_t *pui32RxMaxFrameSize)
 
void EMACAddrSet (uint32_t ui32Base, uint32_t ui32Index, const uint8_t *pui8MACAddr)
 
void EMACAddrGet (uint32_t ui32Base, uint32_t ui32Index, uint8_t *pui8MACAddr)
 
uint32_t EMACNumAddrGet (uint32_t ui32Base)
 
void EMACAddrFilterSet (uint32_t ui32Base, uint32_t ui32Index, uint32_t ui32Config)
 
uint32_t EMACAddrFilterGet (uint32_t ui32Base, uint32_t ui32Index)
 
void EMACFrameFilterSet (uint32_t ui32Base, uint32_t ui32FilterOpts)
 
uint32_t EMACFrameFilterGet (uint32_t ui32Base)
 
void EMACHashFilterSet (uint32_t ui32Base, uint32_t ui32HashHi, uint32_t ui32HashLo)
 
void EMACHashFilterGet (uint32_t ui32Base, uint32_t *pui32HashHi, uint32_t *pui32HashLo)
 
uint32_t EMACHashFilterBitCalculate (uint8_t *pui8MACAddr)
 
void EMACRxWatchdogTimerSet (uint32_t ui32Base, uint8_t ui8Timeout)
 
uint32_t EMACStatusGet (uint32_t ui32Base)
 
void EMACTxDMAPollDemand (uint32_t ui32Base)
 
void EMACRxDMAPollDemand (uint32_t ui32Base)
 
void EMACRxDMADescriptorListSet (uint32_t ui32Base, tEMACDMADescriptor *pDescriptor)
 
tEMACDMADescriptorEMACRxDMADescriptorListGet (uint32_t ui32Base)
 
tEMACDMADescriptorEMACRxDMACurrentDescriptorGet (uint32_t ui32Base)
 
uint8_t * EMACRxDMACurrentBufferGet (uint32_t ui32Base)
 
void EMACTxDMADescriptorListSet (uint32_t ui32Base, tEMACDMADescriptor *pDescriptor)
 
tEMACDMADescriptorEMACTxDMADescriptorListGet (uint32_t ui32Base)
 
tEMACDMADescriptorEMACTxDMACurrentDescriptorGet (uint32_t ui32Base)
 
uint8_t * EMACTxDMACurrentBufferGet (uint32_t ui32Base)
 
uint32_t EMACDMAStateGet (uint32_t ui32Base)
 
void EMACTxFlush (uint32_t ui32Base)
 
void EMACTxEnable (uint32_t ui32Base)
 
void EMACTxDisable (uint32_t ui32Base)
 
void EMACRxEnable (uint32_t ui32Base)
 
void EMACRxDisable (uint32_t ui32Base)
 
void EMACIntRegister (uint32_t ui32Base, void(*pfnHandler)(void))
 
void EMACIntUnregister (uint32_t ui32Base)
 
void EMACIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags)
 
void EMACIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags)
 
uint32_t EMACIntStatus (uint32_t ui32Base, bool bMasked)
 
void EMACIntClear (uint32_t ui32Base, uint32_t ui32IntFlags)
 
void EMACPHYWrite (uint32_t ui32Base, uint8_t ui8PhyAddr, uint8_t ui8RegAddr, uint16_t ui16Data)
 
uint16_t EMACPHYRead (uint32_t ui32Base, uint8_t ui8PhyAddr, uint8_t ui8RegAddr)
 
uint16_t EMACPHYExtendedRead (uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr)
 
void EMACPHYExtendedWrite (uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr, uint16_t ui16Value)
 
void EMACPHYPowerOff (uint32_t ui32Base, uint8_t ui8PhyAddr)
 
void EMACPHYPowerOn (uint32_t ui32Base, uint8_t ui8PhyAddr)
 
void EMACTimestampConfigSet (uint32_t ui32Base, uint32_t ui32Config, uint32_t ui32SubSecondInc)
 
uint32_t EMACTimestampConfigGet (uint32_t ui32Base, uint32_t *pui32SubSecondInc)
 
void EMACTimestampEnable (uint32_t ui32Base)
 
void EMACTimestampDisable (uint32_t ui32Base)
 
void EMACTimestampSysTimeSet (uint32_t ui32Base, uint32_t ui32Seconds, uint32_t ui32SubSeconds)
 
void EMACTimestampSysTimeGet (uint32_t ui32Base, uint32_t *pui32Seconds, uint32_t *pui32SubSeconds)
 
void EMACTimestampSysTimeUpdate (uint32_t ui32Base, uint32_t ui32Seconds, uint32_t ui32SubSeconds, bool bInc)
 
void EMACTimestampAddendSet (uint32_t ui32Base, uint32_t ui32Increment)
 
void EMACTimestampTargetSet (uint32_t ui32Base, uint32_t ui32Seconds, uint32_t ui32SubSeconds)
 
void EMACTimestampTargetIntEnable (uint32_t ui32Base)
 
void EMACTimestampTargetIntDisable (uint32_t ui32Base)
 
uint32_t EMACTimestampIntStatus (uint32_t ui32Base)
 
void EMACTimestampPPSSimpleModeSet (uint32_t ui32Base, uint32_t ui32FreqConfig)
 
void EMACTimestampPPSCommandModeSet (uint32_t ui32Base, uint32_t ui32Config)
 Configures the Ethernet MAC PPS output in command mode. More...
 
void EMACTimestampPPSCommand (uint32_t ui32Base, uint8_t ui8Cmd)
 
void EMACTimestampPPSPeriodSet (uint32_t ui32Base, uint32_t ui32Period, uint32_t ui32Width)
 
void EMACVLANRxConfigSet (uint32_t ui32Base, uint16_t ui16Tag, uint32_t ui32Config)
 
uint32_t EMACVLANRxConfigGet (uint32_t ui32Base, uint16_t *pui16Tag)
 
void EMACVLANTxConfigSet (uint32_t ui32Base, uint16_t ui16Tag, uint32_t ui32Config)
 
uint32_t EMACVLANTxConfigGet (uint32_t ui32Base, uint16_t *pui16Tag)
 
uint32_t EMACVLANHashFilterBitCalculate (uint16_t ui16Tag)
 
void EMACVLANHashFilterSet (uint32_t ui32Base, uint32_t ui32Hash)
 
uint32_t EMACVLANHashFilterGet (uint32_t ui32Base)
 
void EMACRemoteWakeUpFrameFilterSet (uint32_t ui32Base, const tEMACWakeUpFrameFilter *pFilter)
 
void EMACRemoteWakeUpFrameFilterGet (uint32_t ui32Base, tEMACWakeUpFrameFilter *pFilter)
 
void EMACPowerManagementControlSet (uint32_t ui32Base, uint32_t ui32Flags)
 
uint32_t EMACPowerManagementControlGet (uint32_t ui32Base)
 
uint32_t EMACPowerManagementStatusGet (uint32_t ui32Base)
 
void EMACWoLEnter (uint32_t ui32Base)
 
void EMACLPIConfig (uint32_t ui32Base, bool bLPIConfig, uint16_t ui16LPILSTimer, uint16_t ui16LPITWTimer)
 
void EMACLPIEnter (uint32_t ui32Base)
 
uint16_t EMACLPIStatus (uint32_t ui32Base)
 
void EMACLPILinkSet (uint32_t ui32Base)
 
void EMACLPILinkClear (uint32_t ui32Base)
 
void EMACPHYMMDWrite (uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr, uint16_t ui16Data)
 
uint16_t EMACPHYMMDRead (uint32_t ui32Base, uint8_t ui8PhyAddr, uint16_t ui16RegAddr)
 

Variable Documentation

§ ui32SysClockMax

uint32_t ui32SysClockMax

§ ui32Divisor

uint32_t ui32Divisor
Copyright 2017, Texas Instruments Incorporated