A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: link/link.c
- Revision:
- 70:74c11fb71a15
- Parent:
- 67:b89a81c6ed99
- Child:
- 85:cd9fdd6ab7e3
--- a/link/link.c Wed Jan 31 19:35:34 2018 +0000 +++ b/link/link.c Fri Feb 16 17:31:52 2018 +0000 @@ -1,6 +1,6 @@ #include <stdbool.h> -#include "defs.h" +#include "gpio.h" #include "log.h" #include "eth.h" #include "action.h" @@ -9,9 +9,8 @@ #include "link.h" #include "nic.h" -#define phyLinkNeg_MASK 1UL << 25 //P1.25 input -#define phySpeedNeg_MASK 1UL << 26 //P1.26 input - +#define LINK_PIN FIO1PIN(25) +#define SPEED_PIN FIO1PIN(26) bool LinkTrace = false; @@ -22,8 +21,8 @@ void LinkMain() { //Flash lights - LinkPhyLink = !(LPC_GPIO1->FIOPIN & phyLinkNeg_MASK); - LinkPhySpeed = !(LPC_GPIO1->FIOPIN & phySpeedNeg_MASK); + LinkPhyLink = ! LINK_PIN; + LinkPhySpeed = !SPEED_PIN; if (!NicLinkIsUp()) return;