Removed the remaining Contiki Interface declaration macros (CCIF/CLIF)
This commit is contained in:
parent
ef59ce132f
commit
309745780e
@ -42,16 +42,6 @@
|
|||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
|
||||||
* \name Compiler configuration
|
|
||||||
*
|
|
||||||
* Those values are not meant to be modified by the user
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
/** @} */
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
/**
|
/**
|
||||||
* \name Macros and typedefs
|
* \name Macros and typedefs
|
||||||
*
|
*
|
||||||
|
@ -114,7 +114,7 @@ clock_init(void)
|
|||||||
REG(GPT_0_BASE + GPTIMER_TAPR) = PRESCALER_VALUE;
|
REG(GPT_0_BASE + GPTIMER_TAPR) = PRESCALER_VALUE;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF clock_time_t
|
clock_time_t
|
||||||
clock_time(void)
|
clock_time(void)
|
||||||
{
|
{
|
||||||
return rt_ticks_startup / RTIMER_CLOCK_TICK_RATIO;
|
return rt_ticks_startup / RTIMER_CLOCK_TICK_RATIO;
|
||||||
@ -126,7 +126,7 @@ clock_set_seconds(unsigned long sec)
|
|||||||
rt_ticks_epoch = (uint64_t)sec * RTIMER_SECOND;
|
rt_ticks_epoch = (uint64_t)sec * RTIMER_SECOND;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF unsigned long
|
unsigned long
|
||||||
clock_seconds(void)
|
clock_seconds(void)
|
||||||
{
|
{
|
||||||
return rt_ticks_epoch / RTIMER_SECOND;
|
return rt_ticks_epoch / RTIMER_SECOND;
|
||||||
|
@ -124,7 +124,7 @@ update_clock_variable(void)
|
|||||||
count = (aon_rtc_secs_now * CLOCK_SECOND) + (aon_rtc_ticks_now >> 9);
|
count = (aon_rtc_secs_now * CLOCK_SECOND) + (aon_rtc_ticks_now >> 9);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF clock_time_t
|
clock_time_t
|
||||||
clock_time(void)
|
clock_time(void)
|
||||||
{
|
{
|
||||||
update_clock_variable();
|
update_clock_variable();
|
||||||
@ -142,7 +142,7 @@ clock_update(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF unsigned long
|
unsigned long
|
||||||
clock_seconds(void)
|
clock_seconds(void)
|
||||||
{
|
{
|
||||||
bool interrupts_disabled;
|
bool interrupts_disabled;
|
||||||
|
@ -79,9 +79,6 @@ typedef long off_t;
|
|||||||
/* Our clock resolution, this is the same as Unix HZ. */
|
/* Our clock resolution, this is the same as Unix HZ. */
|
||||||
#define CLOCK_CONF_SECOND 128UL
|
#define CLOCK_CONF_SECOND 128UL
|
||||||
|
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
|
|
||||||
typedef int spl_t;
|
typedef int spl_t;
|
||||||
spl_t splhigh_(void);
|
spl_t splhigh_(void);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ clock_init(void)
|
|||||||
rtc_config();
|
rtc_config();
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF clock_time_t
|
clock_time_t
|
||||||
clock_time(void)
|
clock_time(void)
|
||||||
{
|
{
|
||||||
return (clock_time_t)(ticks & 0xFFFFFFFF);
|
return (clock_time_t)(ticks & 0xFFFFFFFF);
|
||||||
@ -131,7 +131,7 @@ clock_update(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
CCIF unsigned long
|
unsigned long
|
||||||
clock_seconds(void)
|
clock_seconds(void)
|
||||||
{
|
{
|
||||||
return (unsigned long)ticks/CLOCK_CONF_SECOND;
|
return (unsigned long)ticks/CLOCK_CONF_SECOND;
|
||||||
|
@ -98,9 +98,6 @@
|
|||||||
#define CC_CONF_VA_ARGS 1
|
#define CC_CONF_VA_ARGS 1
|
||||||
#define CC_CONF_INLINE inline
|
#define CC_CONF_INLINE inline
|
||||||
|
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
|
|
||||||
/* These names are deprecated, use C99 names. */
|
/* These names are deprecated, use C99 names. */
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
typedef uint8_t u8_t;
|
typedef uint8_t u8_t;
|
||||||
|
@ -217,9 +217,6 @@ typedef uint32_t rtimer_clock_t;
|
|||||||
#define CC_CONF_VA_ARGS 1
|
#define CC_CONF_VA_ARGS 1
|
||||||
#define CC_CONF_INLINE inline
|
#define CC_CONF_INLINE inline
|
||||||
|
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
#else
|
||||||
|
@ -58,9 +58,6 @@ int select_set_callback(int fd, const struct select_callback *callback);
|
|||||||
#define EEPROM_CONF_SIZE 1024
|
#define EEPROM_CONF_SIZE 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
|
|
||||||
/* These names are deprecated, use C99 names. */
|
/* These names are deprecated, use C99 names. */
|
||||||
typedef uint8_t u8_t;
|
typedef uint8_t u8_t;
|
||||||
typedef uint16_t u16_t;
|
typedef uint16_t u16_t;
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
/**
|
/**
|
||||||
* Event that is broadcasted when a DNS name has been resolved.
|
* Event that is broadcasted when a DNS name has been resolved.
|
||||||
*/
|
*/
|
||||||
CCIF extern process_event_t resolv_event_found;
|
extern process_event_t resolv_event_found;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/** Hostname is fresh and usable. This response is cached and will eventually
|
/** Hostname is fresh and usable. This response is cached and will eventually
|
||||||
@ -91,14 +91,14 @@ enum {
|
|||||||
typedef uint8_t resolv_status_t;
|
typedef uint8_t resolv_status_t;
|
||||||
|
|
||||||
/* Functions. */
|
/* Functions. */
|
||||||
CCIF resolv_status_t resolv_lookup(const char *name, uip_ipaddr_t ** ipaddr);
|
resolv_status_t resolv_lookup(const char *name, uip_ipaddr_t ** ipaddr);
|
||||||
|
|
||||||
CCIF void resolv_query(const char *name);
|
void resolv_query(const char *name);
|
||||||
|
|
||||||
#if RESOLV_CONF_SUPPORTS_MDNS
|
#if RESOLV_CONF_SUPPORTS_MDNS
|
||||||
CCIF void resolv_set_hostname(const char *hostname);
|
void resolv_set_hostname(const char *hostname);
|
||||||
|
|
||||||
CCIF const char *resolv_get_hostname(void);
|
const char *resolv_get_hostname(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PROCESS_NAME(resolv_process);
|
PROCESS_NAME(resolv_process);
|
||||||
|
@ -108,8 +108,7 @@ void tcpip_uipcall(void);
|
|||||||
* process whenever an event occurs on the connection.
|
* process whenever an event occurs on the connection.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void tcp_attach(struct uip_conn *conn,
|
void tcp_attach(struct uip_conn *conn, void *appstate);
|
||||||
void *appstate);
|
|
||||||
#define tcp_markconn(conn, appstate) tcp_attach(conn, appstate)
|
#define tcp_markconn(conn, appstate) tcp_attach(conn, appstate)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,7 +125,7 @@ CCIF void tcp_attach(struct uip_conn *conn,
|
|||||||
* \param port The port number in network byte order.
|
* \param port The port number in network byte order.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void tcp_listen(uint16_t port);
|
void tcp_listen(uint16_t port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close a listening TCP port.
|
* Close a listening TCP port.
|
||||||
@ -140,7 +139,7 @@ CCIF void tcp_listen(uint16_t port);
|
|||||||
* \param port The port number in network byte order.
|
* \param port The port number in network byte order.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void tcp_unlisten(uint16_t port);
|
void tcp_unlisten(uint16_t port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a TCP connection to the specified IP address and port.
|
* Open a TCP connection to the specified IP address and port.
|
||||||
@ -165,7 +164,7 @@ CCIF void tcp_unlisten(uint16_t port);
|
|||||||
* memory could not be allocated for the connection.
|
* memory could not be allocated for the connection.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port,
|
struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port,
|
||||||
void *appstate);
|
void *appstate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -226,7 +225,7 @@ void udp_attach(struct uip_udp_conn *conn,
|
|||||||
* \return A pointer to the newly created connection, or NULL if
|
* \return A pointer to the newly created connection, or NULL if
|
||||||
* memory could not be allocated for the connection.
|
* memory could not be allocated for the connection.
|
||||||
*/
|
*/
|
||||||
CCIF struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port,
|
struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port,
|
||||||
void *appstate);
|
void *appstate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -272,7 +271,7 @@ struct uip_udp_conn *udp_broadcast_new(uint16_t port, void *appstate);
|
|||||||
* \param conn A pointer to the UDP connection that should be polled.
|
* \param conn A pointer to the UDP connection that should be polled.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void tcpip_poll_udp(struct uip_udp_conn *conn);
|
void tcpip_poll_udp(struct uip_udp_conn *conn);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@ -288,7 +287,7 @@ CCIF void tcpip_poll_udp(struct uip_udp_conn *conn);
|
|||||||
*
|
*
|
||||||
* This event is posted to a process whenever a uIP ICMP event has occurred.
|
* This event is posted to a process whenever a uIP ICMP event has occurred.
|
||||||
*/
|
*/
|
||||||
CCIF extern process_event_t tcpip_icmp6_event;
|
extern process_event_t tcpip_icmp6_event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief register an ICMPv6 callback
|
* \brief register an ICMPv6 callback
|
||||||
@ -318,7 +317,7 @@ void tcpip_icmp6_call(uint8_t type);
|
|||||||
*
|
*
|
||||||
* This event is posted to a process whenever a uIP event has occurred.
|
* This event is posted to a process whenever a uIP event has occurred.
|
||||||
*/
|
*/
|
||||||
CCIF extern process_event_t tcpip_event;
|
extern process_event_t tcpip_event;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -335,7 +334,7 @@ CCIF extern process_event_t tcpip_event;
|
|||||||
* and the length of the packet must be in the global
|
* and the length of the packet must be in the global
|
||||||
* uip_len variable.
|
* uip_len variable.
|
||||||
*/
|
*/
|
||||||
CCIF void tcpip_input(void);
|
void tcpip_input(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Output packet to layer 2
|
* \brief Output packet to layer 2
|
||||||
|
@ -500,7 +500,7 @@ typedef union {
|
|||||||
uint8_t u8[UIP_BUFSIZE];
|
uint8_t u8[UIP_BUFSIZE];
|
||||||
} uip_buf_t;
|
} uip_buf_t;
|
||||||
|
|
||||||
CCIF extern uip_buf_t uip_aligned_buf;
|
extern uip_buf_t uip_aligned_buf;
|
||||||
|
|
||||||
/** Macro to access uip_aligned_buf as an array of bytes */
|
/** Macro to access uip_aligned_buf as an array of bytes */
|
||||||
#define uip_buf (uip_aligned_buf.u8)
|
#define uip_buf (uip_aligned_buf.u8)
|
||||||
@ -620,7 +620,7 @@ struct uip_conn *uip_connect(const uip_ipaddr_t *ripaddr, uint16_t port);
|
|||||||
*
|
*
|
||||||
* \hideinitializer
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
CCIF void uip_send(const void *data, int len);
|
void uip_send(const void *data, int len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The length of any incoming data that is currently available (if available)
|
* The length of any incoming data that is currently available (if available)
|
||||||
@ -1238,14 +1238,14 @@ struct uip_udp_conn *uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport);
|
|||||||
* network byte order, use the UIP_HTONS() macro instead.
|
* network byte order, use the UIP_HTONS() macro instead.
|
||||||
*/
|
*/
|
||||||
#ifndef uip_htons
|
#ifndef uip_htons
|
||||||
CCIF uint16_t uip_htons(uint16_t val);
|
uint16_t uip_htons(uint16_t val);
|
||||||
#endif /* uip_htons */
|
#endif /* uip_htons */
|
||||||
#ifndef uip_ntohs
|
#ifndef uip_ntohs
|
||||||
#define uip_ntohs uip_htons
|
#define uip_ntohs uip_htons
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef uip_htonl
|
#ifndef uip_htonl
|
||||||
CCIF uint32_t uip_htonl(uint32_t val);
|
uint32_t uip_htonl(uint32_t val);
|
||||||
#endif /* uip_htonl */
|
#endif /* uip_htonl */
|
||||||
#ifndef uip_ntohl
|
#ifndef uip_ntohl
|
||||||
#define uip_ntohl uip_htonl
|
#define uip_ntohl uip_htonl
|
||||||
@ -1260,7 +1260,7 @@ CCIF uint32_t uip_htonl(uint32_t val);
|
|||||||
* called. If the application wishes to send data, the application may
|
* called. If the application wishes to send data, the application may
|
||||||
* use this space to write the data into before calling uip_send().
|
* use this space to write the data into before calling uip_send().
|
||||||
*/
|
*/
|
||||||
CCIF extern void *uip_appdata;
|
extern void *uip_appdata;
|
||||||
|
|
||||||
#if UIP_URGDATA > 0
|
#if UIP_URGDATA > 0
|
||||||
/* uint8_t *uip_urgdata:
|
/* uint8_t *uip_urgdata:
|
||||||
@ -1295,7 +1295,7 @@ extern void *uip_urgdata;
|
|||||||
* packet.
|
* packet.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF extern uint16_t uip_len;
|
extern uint16_t uip_len;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The length of the extension headers
|
* The length of the extension headers
|
||||||
@ -1367,10 +1367,10 @@ struct uip_conn {
|
|||||||
* connection.
|
* connection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CCIF extern struct uip_conn *uip_conn;
|
extern struct uip_conn *uip_conn;
|
||||||
#if UIP_TCP
|
#if UIP_TCP
|
||||||
/* The array containing all uIP connections. */
|
/* The array containing all uIP connections. */
|
||||||
CCIF extern struct uip_conn uip_conns[UIP_TCP_CONNS];
|
extern struct uip_conn uip_conns[UIP_TCP_CONNS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1522,7 +1522,7 @@ struct uip_eth_hdr {
|
|||||||
* that are defined in this file. Please read below for more
|
* that are defined in this file. Please read below for more
|
||||||
* information.
|
* information.
|
||||||
*/
|
*/
|
||||||
CCIF extern uint8_t uip_flags;
|
extern uint8_t uip_flags;
|
||||||
|
|
||||||
/* The following flags may be set in the global variable uip_flags
|
/* The following flags may be set in the global variable uip_flags
|
||||||
before calling the application callback. The UIP_ACKDATA,
|
before calling the application callback. The UIP_ACKDATA,
|
||||||
@ -1934,17 +1934,17 @@ struct uip_udp_hdr {
|
|||||||
|
|
||||||
|
|
||||||
#if UIP_FIXEDADDR
|
#if UIP_FIXEDADDR
|
||||||
CCIF extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
||||||
#else /* UIP_FIXEDADDR */
|
#else /* UIP_FIXEDADDR */
|
||||||
CCIF extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
|
||||||
#endif /* UIP_FIXEDADDR */
|
#endif /* UIP_FIXEDADDR */
|
||||||
CCIF extern const uip_ipaddr_t uip_broadcast_addr;
|
extern const uip_ipaddr_t uip_broadcast_addr;
|
||||||
CCIF extern const uip_ipaddr_t uip_all_zeroes_addr;
|
extern const uip_ipaddr_t uip_all_zeroes_addr;
|
||||||
|
|
||||||
#if UIP_FIXEDETHADDR
|
#if UIP_FIXEDETHADDR
|
||||||
CCIF extern const uip_lladdr_t uip_lladdr;
|
extern const uip_lladdr_t uip_lladdr;
|
||||||
#else
|
#else
|
||||||
CCIF extern uip_lladdr_t uip_lladdr;
|
extern uip_lladdr_t uip_lladdr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@
|
|||||||
#define uiplib_ipaddrconv uiplib_ip4addrconv
|
#define uiplib_ipaddrconv uiplib_ip4addrconv
|
||||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||||
|
|
||||||
CCIF int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr);
|
int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr);
|
||||||
CCIF int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr);
|
int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr);
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,7 @@ struct cfs_dirent {
|
|||||||
* \sa cfs_close()
|
* \sa cfs_close()
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_open
|
#ifndef cfs_open
|
||||||
CCIF int cfs_open(const char *name, int flags);
|
int cfs_open(const char *name, int flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,7 +177,7 @@ CCIF int cfs_open(const char *name, int flags);
|
|||||||
* opened with cfs_open().
|
* opened with cfs_open().
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_close
|
#ifndef cfs_close
|
||||||
CCIF void cfs_close(int fd);
|
void cfs_close(int fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,7 +192,7 @@ CCIF void cfs_close(int fd);
|
|||||||
* cfs_open() and the CFS_READ flag.
|
* cfs_open() and the CFS_READ flag.
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_read
|
#ifndef cfs_read
|
||||||
CCIF int cfs_read(int fd, void *buf, unsigned int len);
|
int cfs_read(int fd, void *buf, unsigned int len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -207,7 +207,7 @@ CCIF int cfs_read(int fd, void *buf, unsigned int len);
|
|||||||
* cfs_open() and the CFS_WRITE flag.
|
* cfs_open() and the CFS_WRITE flag.
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_write
|
#ifndef cfs_write
|
||||||
CCIF int cfs_write(int fd, const void *buf, unsigned int len);
|
int cfs_write(int fd, const void *buf, unsigned int len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -228,7 +228,7 @@ CCIF int cfs_write(int fd, const void *buf, unsigned int len);
|
|||||||
* \sa CFS_SEEK_SET
|
* \sa CFS_SEEK_SET
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_seek
|
#ifndef cfs_seek
|
||||||
CCIF cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence);
|
cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -238,7 +238,7 @@ CCIF cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence);
|
|||||||
* \return -1 If the file could not be removed or if it doesn't exist.
|
* \return -1 If the file could not be removed or if it doesn't exist.
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_remove
|
#ifndef cfs_remove
|
||||||
CCIF int cfs_remove(const char *name);
|
int cfs_remove(const char *name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -251,7 +251,7 @@ CCIF int cfs_remove(const char *name);
|
|||||||
* \sa cfs_closedir()
|
* \sa cfs_closedir()
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_opendir
|
#ifndef cfs_opendir
|
||||||
CCIF int cfs_opendir(struct cfs_dir *dirp, const char *name);
|
int cfs_opendir(struct cfs_dir *dirp, const char *name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -265,7 +265,7 @@ CCIF int cfs_opendir(struct cfs_dir *dirp, const char *name);
|
|||||||
* \sa cfs_closedir()
|
* \sa cfs_closedir()
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_readdir
|
#ifndef cfs_readdir
|
||||||
CCIF int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent);
|
int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -276,7 +276,7 @@ CCIF int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent);
|
|||||||
* \sa cfs_readdir()
|
* \sa cfs_readdir()
|
||||||
*/
|
*/
|
||||||
#ifndef cfs_closedir
|
#ifndef cfs_closedir
|
||||||
CCIF void cfs_closedir(struct cfs_dir *dirp);
|
void cfs_closedir(struct cfs_dir *dirp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CFS_H_ */
|
#endif /* CFS_H_ */
|
||||||
|
@ -50,7 +50,7 @@ struct process * const autostart_processes[] = {__VA_ARGS__, NULL}
|
|||||||
#error "C compiler must support __VA_ARGS__ macro"
|
#error "C compiler must support __VA_ARGS__ macro"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CLIF extern struct process * const autostart_processes[];
|
extern struct process * const autostart_processes[];
|
||||||
|
|
||||||
void autostart_start(struct process * const processes[]);
|
void autostart_start(struct process * const processes[]);
|
||||||
void autostart_exit(struct process * const processes[]);
|
void autostart_exit(struct process * const processes[]);
|
||||||
|
@ -98,7 +98,7 @@ void clock_init(void);
|
|||||||
*
|
*
|
||||||
* \return The current clock time, measured in system ticks.
|
* \return The current clock time, measured in system ticks.
|
||||||
*/
|
*/
|
||||||
CCIF clock_time_t clock_time(void);
|
clock_time_t clock_time(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current value of the platform seconds.
|
* Get the current value of the platform seconds.
|
||||||
@ -108,7 +108,7 @@ CCIF clock_time_t clock_time(void);
|
|||||||
*
|
*
|
||||||
* \return The value.
|
* \return The value.
|
||||||
*/
|
*/
|
||||||
CCIF unsigned long clock_seconds(void);
|
unsigned long clock_seconds(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of the platform seconds.
|
* Set the value of the platform seconds.
|
||||||
|
@ -94,7 +94,7 @@ struct etimer {
|
|||||||
* process that called the etimer_set() function.
|
* process that called the etimer_set() function.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void etimer_set(struct etimer *et, clock_time_t interval);
|
void etimer_set(struct etimer *et, clock_time_t interval);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Reset an event timer with the same interval as was
|
* \brief Reset an event timer with the same interval as was
|
||||||
@ -111,7 +111,7 @@ CCIF void etimer_set(struct etimer *et, clock_time_t interval);
|
|||||||
*
|
*
|
||||||
* \sa etimer_restart()
|
* \sa etimer_restart()
|
||||||
*/
|
*/
|
||||||
CCIF void etimer_reset(struct etimer *et);
|
void etimer_reset(struct etimer *et);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Reset an event timer with a new interval.
|
* \brief Reset an event timer with a new interval.
|
||||||
@ -192,7 +192,7 @@ clock_time_t etimer_start_time(struct etimer *et);
|
|||||||
* This function tests if an event timer has expired and
|
* This function tests if an event timer has expired and
|
||||||
* returns true or false depending on its status.
|
* returns true or false depending on its status.
|
||||||
*/
|
*/
|
||||||
CCIF int etimer_expired(struct etimer *et);
|
int etimer_expired(struct etimer *et);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Stop a pending event timer.
|
* \brief Stop a pending event timer.
|
||||||
|
@ -339,7 +339,7 @@ struct process {
|
|||||||
* process
|
* process
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CCIF void process_start(struct process *p, process_data_t data);
|
void process_start(struct process *p, process_data_t data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post an asynchronous event.
|
* Post an asynchronous event.
|
||||||
@ -362,7 +362,7 @@ CCIF void process_start(struct process *p, process_data_t data);
|
|||||||
* \retval PROCESS_ERR_FULL The event queue was full and the event could
|
* \retval PROCESS_ERR_FULL The event queue was full and the event could
|
||||||
* not be posted.
|
* not be posted.
|
||||||
*/
|
*/
|
||||||
CCIF int process_post(struct process *p, process_event_t ev, process_data_t data);
|
int process_post(struct process *p, process_event_t ev, process_data_t data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post a synchronous event to a process.
|
* Post a synchronous event to a process.
|
||||||
@ -374,7 +374,7 @@ CCIF int process_post(struct process *p, process_event_t ev, process_data_t data
|
|||||||
* \param data A pointer to additional data that is posted together
|
* \param data A pointer to additional data that is posted together
|
||||||
* with the event.
|
* with the event.
|
||||||
*/
|
*/
|
||||||
CCIF void process_post_synch(struct process *p,
|
void process_post_synch(struct process *p,
|
||||||
process_event_t ev, process_data_t data);
|
process_event_t ev, process_data_t data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -387,7 +387,7 @@ CCIF void process_post_synch(struct process *p,
|
|||||||
*
|
*
|
||||||
* \sa PROCESS_CURRENT()
|
* \sa PROCESS_CURRENT()
|
||||||
*/
|
*/
|
||||||
CCIF void process_exit(struct process *p);
|
void process_exit(struct process *p);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -400,7 +400,7 @@ CCIF void process_exit(struct process *p);
|
|||||||
* \hideinitializer
|
* \hideinitializer
|
||||||
*/
|
*/
|
||||||
#define PROCESS_CURRENT() process_current
|
#define PROCESS_CURRENT() process_current
|
||||||
CCIF extern struct process *process_current;
|
extern struct process *process_current;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch context to another process
|
* Switch context to another process
|
||||||
@ -450,7 +450,7 @@ process_current = p
|
|||||||
* \note There currently is no way to deallocate an allocated event
|
* \note There currently is no way to deallocate an allocated event
|
||||||
* number.
|
* number.
|
||||||
*/
|
*/
|
||||||
CCIF process_event_t process_alloc_event(void);
|
process_event_t process_alloc_event(void);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ CCIF process_event_t process_alloc_event(void);
|
|||||||
*
|
*
|
||||||
* \param p A pointer to the process' process structure.
|
* \param p A pointer to the process' process structure.
|
||||||
*/
|
*/
|
||||||
CCIF void process_poll(struct process *p);
|
void process_poll(struct process *p);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@ -509,7 +509,7 @@ int process_run(void);
|
|||||||
* \retval Non-zero if the process is running.
|
* \retval Non-zero if the process is running.
|
||||||
* \retval Zero if the process is not running.
|
* \retval Zero if the process is not running.
|
||||||
*/
|
*/
|
||||||
CCIF int process_is_running(struct process *p);
|
int process_is_running(struct process *p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of events waiting to be processed.
|
* Number of events waiting to be processed.
|
||||||
@ -521,7 +521,7 @@ int process_nevents(void);
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
CCIF extern struct process *process_list;
|
extern struct process *process_list;
|
||||||
|
|
||||||
#define PROCESS_LIST() process_list
|
#define PROCESS_LIST() process_list
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@ struct timer {
|
|||||||
clock_time_t interval;
|
clock_time_t interval;
|
||||||
};
|
};
|
||||||
|
|
||||||
CCIF void timer_set(struct timer *t, clock_time_t interval);
|
void timer_set(struct timer *t, clock_time_t interval);
|
||||||
void timer_reset(struct timer *t);
|
void timer_reset(struct timer *t);
|
||||||
void timer_restart(struct timer *t);
|
void timer_restart(struct timer *t);
|
||||||
CCIF int timer_expired(struct timer *t);
|
int timer_expired(struct timer *t);
|
||||||
clock_time_t timer_remaining(struct timer *t);
|
clock_time_t timer_remaining(struct timer *t);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#ifndef CONTIKI_CONF_H_
|
#ifndef CONTIKI_CONF_H_
|
||||||
#define CONTIKI_CONF_H_
|
#define CONTIKI_CONF_H_
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#define CCIF
|
|
||||||
#define CLIF
|
|
||||||
|
|
||||||
/* These names are deprecated, use C99 names. */
|
/* These names are deprecated, use C99 names. */
|
||||||
typedef uint8_t u8_t;
|
typedef uint8_t u8_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user