16
µTasker general / Re: Looking for string to unsigned short code (ansi c).
« on: May 30, 2008, 09:47:23 AM »
Thanks, that worked out great.
JD
JD
Nov 2020: uTasker i.MX RT V1.4.12 is productive - with complete secure loading concept.
Follow uTasker updates at www.twitter.com/uTasker !!
Online Forum registration has now been disabled. Please send an email to an address at the bottom of the home page with your preferred user name and email address if you would like an account.
Return to uTasker main site: www.utasker.com
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#ifdef ETH_INTERFACE
#define LAN_REPORT_ACTIVITY // Transmissions/receptions and errors are reported to chosen task (for link LED control, etc)
#ifdef LAN_REPORT_ACTIVITY
#define ACTIVITY_LED_OFF() PTL |= ACTLED;
#define ACTIVITY_LED_ON() PTL &= ~ACTLED;
#define TURN_LINK_LED_ON() PTL &= ~LNKLED;
#define SPEED_LED_ON() PTL = ~SPDLED;
#define SPEED_LED_OFF() PTL |= SPDLED;
#define LINK_DOWN_LEDS() PTL |= (LNKLED | ACTLED); \
PTL = ~(COLLED | SPDLED | DUPLED);
#define TURN_COL_LED_ON() PTL &= ~COLLED;
#define TURN_COL_LED_OFF() PTL |= COLLED;
#define CONFIGURE_LAN_LEDS() DDRL |= (LNKLED | ACTLED | COLLED | SPDLED | DUPLED); \
LINK_DOWN_LEDS();
#endif
#endif
case ETHERNET_COLLISION:
TURN_COL_LED_ON();
uTaskerMonoTimer( OWN_TASK, (DELAY_LIMIT)(COLLISION_TIME), E_TIMEOUT ); // blink collision LED
ucEvent|=COL_LED_ON;
break;
and modified the timer event that turns off the led:case TIMER_EVENT:
if (E_TIMEOUT == ucInputMessage[ MSG_TIMER_EVENT ]) {
if(ucEvent & (TX_LED_OFF | RX_LED_OFF))
{
ACTIVITY_LED_OFF();
ucEvent &= ~(TX_LED_OFF | RX_LED_OFF);
}
if (ucEvent & COL_LED_ON)
{
TURN_COL_LED_OFF();
ucEvent &= ~(COL_LED_ON);
}
}
break;
typedef struct stNETWORK_PARAMETERS
{
unsigned short usNetworkOptions; // Options passed to the network device on configuration
unsigned char ucOurMAC[MAC_LENGTH]; // when no other value can be read from parameters this will be used
unsigned char ucOurIP[IPV4_LENGTH]; // our default IP address
unsigned char ucNetMask[IPV4_LENGTH]; // Our default network mask
unsigned char ucDefGW[IPV4_LENGTH]; // Our default gateway
unsigned char ucDNS_server[IPV4_LENGTH]; // Our default DNS server
unsigned char ucOurMulticastIP[IPV4_LENGTH]; // our default MulticastIP
} NETWORK_PARAMETERS;