Exact match. Not showing close matches.
'[PIC] PIC-MAXI-WEB c-code syntax queries'
I have a PIC-MAXI-WEB device from olimex and want to tailor the demo code to
initially use NTP to update/set the RTC.
As NTP uses UDP I am trying to decipher some of the c code as follows:-
1. if(BUTTON0_IO == 0u)
#if defined(MPFS_USE_EEPROM) && defined(STACK_USE_MPFS)
// Invalidate the EEPROM contents if BUTTON0 is held down for more
than 4 seconds
*TICK StartTime = TickGet();*
while(BUTTON0_IO == 0u)
My assumption here is that StartTime is declared a type TICK and is
immediately initialised with the current Tick Time. So it would be the same
StartTime = TickGet();
Is this correct.
2. #define TCP_RX_FIFO_SIZE (*200ul)*
#define MAX_UDP_SOCKETS (*6ul*)
What is *6ul or 0u* as in 1. above.
3. Sadly after reading the manual for the 18f97j60 I discover that it is
only good for approx 100 flash updates. As I am in an aggressive
learning/development phase I will be making lots of mistakes. Any there any
tricks that can be used to increase this number of flash updates.
It seems in some ways to defeat the advantage of icsp as 'yes' you can make
changes very quickly, just dont make too many or you render the device
Any help greatly appreciated.
:: What is *6ul or 0u*
I'm not sure about the * as I can't see why it'd be a pointer, but the
ul means unsigned long and the u unsigned. It is used with constants
to ensure the compiler uses the correct amount of byte widths (so if
the compiler is playing with 32 bit systems a long might be a
different size to a 16 bit system) when it performs maths functions.
:: My assumption here is that StartTime is declared a type TICK and is
:: immediately initialised with the current Tick Time. So it would be
:: the same
:: TICK StartTime;
:: StartTime = TickGet();
Yes, it would be worthwhile looking in the header file to find out
exactly what a TICK type comprises. I assume the * is not part of the
cdb, btech-online.co.uk on 5/06/2009 colin
Web presence: http://www.btech-online.co.uk
Hosted by: http://www.1and1.co.uk/?k_id=7988359
Yes, you are correct, there are no * in my Gmail post, however I did
*bold*the sections where I think you now see *xxx*. I wont do that
TICK as it turns out is typedef unsigned long TICK;
2009/6/5 cdb <btech-online.co.uk> colin
More... (looser matching)
- Last day of these posts
- In 2009
, 2010 only
- New search...