os_core.h File Reference

#include <string.h>
#include "nip_types.h"
#include "avr/interrupt.h"

Include dependency graph for os_core.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define nip_time()   clock
 get time of day
#define nip_tickcount()   tickcount
 get system tickcount
#define nip_memcmp(s1, s2, n)   memcmp(s1, s2, n)
 compare memory areas
#define nip_memmove(dest, src, n)   memmove(dest, src, n)
#define nip_memset(start, b, n)   memset(start, b, n)
 fill memory with constant byte
#define nip_int_off()   cli()
 disable global interrupts
#define nip_int_on()   sei()
 enable global interrupts

Typedefs

typedef uint32_t nip_time_t

Functions

void nip_memcpy (void *dest, void *src, uint16_t size)
 copy memory area

Variables

uint32_t clock
 Time in seconds since 0 hours, 0 minutes, 0 seconds, January 1st, 1970, UTC.
uint32_t tickcount
 Time in seconds since system start.


Define Documentation

 
#define nip_int_off (  )     cli()

disable global interrupts

Definition at line 70 of file os_core.h.

 
#define nip_int_on (  )     sei()

enable global interrupts

Definition at line 73 of file os_core.h.

#define nip_memcmp ( s1,
s2,
 )     memcmp(s1, s2, n)

#define nip_memmove ( dest,
src,
 )     memmove(dest, src, n)

Definition at line 63 of file os_core.h.

Referenced by nip_mdns_notify(), and nip_tcp_accept().

#define nip_memset ( start,
b,
 )     memset(start, b, n)

fill memory with constant byte

Definition at line 67 of file os_core.h.

Referenced by nip_dhcp_disp_check(), and nip_tcp_create_conn().

 
#define nip_tickcount (  )     tickcount

get system tickcount

Returns:
seconds since system start. Use this value for timeout measurement as it will always be increased linearly.

Definition at line 55 of file os_core.h.

Referenced by nip_dhcp_disp_check(), nip_tcp_create_conn(), nip_tcp_disp_check(), nip_tcp_disp_receive(), and nip_tcp_disp_send().

 
#define nip_time (  )     clock

get time of day

Returns:
the value of time in seconds since 0 hours, 0 minutes, 0 seconds, January 1st, 1970, Coordinated Universal Time, without including leap seconds.

Definition at line 50 of file os_core.h.


Typedef Documentation

typedef uint32_t nip_time_t

Definition at line 38 of file os_core.h.


Function Documentation

void nip_memcpy ( void *  dest,
void *  src,
uint16_t  size 
)


Variable Documentation

uint32_t clock

Time in seconds since 0 hours, 0 minutes, 0 seconds, January 1st, 1970, UTC.

As the clock is being set it's value may be increased or decreased and is therefor not usable for linear time measurement. Use the below tickcount variable for that.

Definition at line 40 of file time.c.

uint32_t tickcount

Time in seconds since system start.

Use this value for timeout measurement as it will always be increased linearly.

Definition at line 47 of file time.c.


Generated on Thu Jul 10 01:09:53 2008 for NIP by  doxygen 1.5.5