Commit 30974578 authored by Niclas Finne's avatar Niclas Finne
Browse files

Removed the remaining Contiki Interface declaration macros (CCIF/CLIF)

parent ef59ce13
......@@ -42,16 +42,6 @@
/*---------------------------------------------------------------------------*/
#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
*
......
......@@ -114,7 +114,7 @@ clock_init(void)
REG(GPT_0_BASE + GPTIMER_TAPR) = PRESCALER_VALUE;
}
/*---------------------------------------------------------------------------*/
CCIF clock_time_t
clock_time_t
clock_time(void)
{
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;
}
/*---------------------------------------------------------------------------*/
CCIF unsigned long
unsigned long
clock_seconds(void)
{
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);
}
/*---------------------------------------------------------------------------*/
CCIF clock_time_t
clock_time_t
clock_time(void)
{
update_clock_variable();
......@@ -142,7 +142,7 @@ clock_update(void)
}
}
/*---------------------------------------------------------------------------*/
CCIF unsigned long
unsigned long
clock_seconds(void)
{
bool interrupts_disabled;
......
......@@ -79,9 +79,6 @@ typedef long off_t;
/* Our clock resolution, this is the same as Unix HZ. */
#define CLOCK_CONF_SECOND 128UL
#define CCIF
#define CLIF
typedef int spl_t;
spl_t splhigh_(void);
......
......@@ -116,7 +116,7 @@ clock_init(void)
rtc_config();
}
/*---------------------------------------------------------------------------*/
CCIF clock_time_t
clock_time_t
clock_time(void)
{
return (clock_time_t)(ticks & 0xFFFFFFFF);
......@@ -131,7 +131,7 @@ clock_update(void)
}
}
/*---------------------------------------------------------------------------*/
CCIF unsigned long
unsigned long
clock_seconds(void)
{
return (unsigned long)ticks/CLOCK_CONF_SECOND;
......
......@@ -98,9 +98,6 @@
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline
#define CCIF
#define CLIF
/* These names are deprecated, use C99 names. */
#include <inttypes.h>
typedef uint8_t u8_t;
......
......@@ -217,9 +217,6 @@ typedef uint32_t rtimer_clock_t;
#define CC_CONF_VA_ARGS 1
#define CC_CONF_INLINE inline
#define CCIF
#define CLIF
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
......
......@@ -58,9 +58,6 @@ int select_set_callback(int fd, const struct select_callback *callback);
#define EEPROM_CONF_SIZE 1024
#endif
#define CCIF
#define CLIF
/* These names are deprecated, use C99 names. */
typedef uint8_t u8_t;
typedef uint16_t u16_t;
......
......@@ -55,7 +55,7 @@
/**
* 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 {
/** Hostname is fresh and usable. This response is cached and will eventually
......@@ -91,14 +91,14 @@ enum {
typedef uint8_t resolv_status_t;
/* 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
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
PROCESS_NAME(resolv_process);
......
......@@ -108,8 +108,7 @@ void tcpip_uipcall(void);
* process whenever an event occurs on the connection.
*
*/
CCIF void tcp_attach(struct uip_conn *conn,
void *appstate);
void tcp_attach(struct uip_conn *conn, void *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.
*
*/
CCIF void tcp_listen(uint16_t port);
void tcp_listen(uint16_t 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.
*
*/
CCIF void tcp_unlisten(uint16_t port);
void tcp_unlisten(uint16_t port);
/**
* Open a TCP connection to the specified IP address and port.
......@@ -165,8 +164,8 @@ CCIF void tcp_unlisten(uint16_t port);
* memory could not be allocated for the connection.
*
*/
CCIF struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port,
void *appstate);
struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port,
void *appstate);
/**
* Cause a specified TCP connection to be polled.
......@@ -226,8 +225,8 @@ void udp_attach(struct uip_udp_conn *conn,
* \return A pointer to the newly created connection, or NULL if
* memory could not be allocated for the connection.
*/
CCIF struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port,
void *appstate);
struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port,
void *appstate);
/**
* Create a new UDP broadcast connection.
......@@ -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.
*
*/
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.
*/
CCIF extern process_event_t tcpip_icmp6_event;
extern process_event_t tcpip_icmp6_event;
/**
* \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.
*/
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
* uip_len variable.
*/
CCIF void tcpip_input(void);
void tcpip_input(void);
/**
* \brief Output packet to layer 2
......
......@@ -500,7 +500,7 @@ typedef union {
uint8_t u8[UIP_BUFSIZE];
} 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 */
#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
*/
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)
......@@ -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.
*/
#ifndef uip_htons
CCIF uint16_t uip_htons(uint16_t val);
uint16_t uip_htons(uint16_t val);
#endif /* uip_htons */
#ifndef uip_ntohs
#define uip_ntohs uip_htons
#endif
#ifndef uip_htonl
CCIF uint32_t uip_htonl(uint32_t val);
uint32_t uip_htonl(uint32_t val);
#endif /* uip_htonl */
#ifndef uip_ntohl
#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
* 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
/* uint8_t *uip_urgdata:
......@@ -1295,7 +1295,7 @@ extern void *uip_urgdata;
* packet.
*
*/
CCIF extern uint16_t uip_len;
extern uint16_t uip_len;
/**
* The length of the extension headers
......@@ -1367,10 +1367,10 @@ struct uip_conn {
* connection.
*/
CCIF extern struct uip_conn *uip_conn;
extern struct uip_conn *uip_conn;
#if UIP_TCP
/* 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
/**
......@@ -1522,7 +1522,7 @@ struct uip_eth_hdr {
* that are defined in this file. Please read below for more
* information.
*/
CCIF extern uint8_t uip_flags;
extern uint8_t uip_flags;
/* The following flags may be set in the global variable uip_flags
before calling the application callback. The UIP_ACKDATA,
......@@ -1934,17 +1934,17 @@ struct uip_udp_hdr {
#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 */
CCIF extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
#endif /* UIP_FIXEDADDR */
CCIF extern const uip_ipaddr_t uip_broadcast_addr;
CCIF extern const uip_ipaddr_t uip_all_zeroes_addr;
extern const uip_ipaddr_t uip_broadcast_addr;
extern const uip_ipaddr_t uip_all_zeroes_addr;
#if UIP_FIXEDETHADDR
CCIF extern const uip_lladdr_t uip_lladdr;
extern const uip_lladdr_t uip_lladdr;
#else
CCIF extern uip_lladdr_t uip_lladdr;
extern uip_lladdr_t uip_lladdr;
#endif
......
......@@ -73,8 +73,8 @@
#define uiplib_ipaddrconv uiplib_ip4addrconv
#endif /* NETSTACK_CONF_WITH_IPV6 */
CCIF int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr);
CCIF int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr);
int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr);
int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr);
/** @} */
/**
......
......@@ -166,7 +166,7 @@ struct cfs_dirent {
* \sa cfs_close()
*/
#ifndef cfs_open
CCIF int cfs_open(const char *name, int flags);
int cfs_open(const char *name, int flags);
#endif
/**
......@@ -177,7 +177,7 @@ CCIF int cfs_open(const char *name, int flags);
* opened with cfs_open().
*/
#ifndef cfs_close
CCIF void cfs_close(int fd);
void cfs_close(int fd);
#endif
/**
......@@ -192,7 +192,7 @@ CCIF void cfs_close(int fd);
* cfs_open() and the CFS_READ flag.
*/
#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
/**
......@@ -207,7 +207,7 @@ CCIF int cfs_read(int fd, void *buf, unsigned int len);
* cfs_open() and the CFS_WRITE flag.
*/
#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
/**
......@@ -228,7 +228,7 @@ CCIF int cfs_write(int fd, const void *buf, unsigned int len);
* \sa CFS_SEEK_SET
*/
#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
/**
......@@ -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.
*/
#ifndef cfs_remove
CCIF int cfs_remove(const char *name);
int cfs_remove(const char *name);
#endif
/**
......@@ -251,7 +251,7 @@ CCIF int cfs_remove(const char *name);
* \sa cfs_closedir()
*/
#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
/**
......@@ -265,7 +265,7 @@ CCIF int cfs_opendir(struct cfs_dir *dirp, const char *name);
* \sa cfs_closedir()
*/
#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
/**
......@@ -276,7 +276,7 @@ CCIF int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent);
* \sa cfs_readdir()
*/
#ifndef cfs_closedir
CCIF void cfs_closedir(struct cfs_dir *dirp);
void cfs_closedir(struct cfs_dir *dirp);
#endif
#endif /* CFS_H_ */
......
......@@ -50,7 +50,7 @@ struct process * const autostart_processes[] = {__VA_ARGS__, NULL}
#error "C compiler must support __VA_ARGS__ macro"
#endif
CLIF extern struct process * const autostart_processes[];
extern struct process * const autostart_processes[];
void autostart_start(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.
*/
CCIF clock_time_t clock_time(void);
clock_time_t clock_time(void);
/**
* Get the current value of the platform seconds.
......@@ -108,7 +108,7 @@ CCIF clock_time_t clock_time(void);
*
* \return The value.
*/
CCIF unsigned long clock_seconds(void);
unsigned long clock_seconds(void);
/**
* Set the value of the platform seconds.
......
......@@ -94,7 +94,7 @@ struct etimer {
* 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
......@@ -111,7 +111,7 @@ CCIF void etimer_set(struct etimer *et, clock_time_t interval);
*
* \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.
......@@ -192,7 +192,7 @@ clock_time_t etimer_start_time(struct etimer *et);
* This function tests if an event timer has expired and
* 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.
......
......@@ -339,7 +339,7 @@ struct 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.
......@@ -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
* 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.
......@@ -374,8 +374,8 @@ 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
* with the event.
*/
CCIF void process_post_synch(struct process *p,
process_event_t ev, process_data_t data);
void process_post_synch(struct process *p,
process_event_t ev, process_data_t data);
/**
* \brief Cause a process to exit
......@@ -387,7 +387,7 @@ CCIF void process_post_synch(struct process *p,
*
* \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
*/
#define PROCESS_CURRENT() process_current
CCIF extern struct process *process_current;
extern struct process *process_current;
/**
* Switch context to another process
......@@ -450,7 +450,7 @@ process_current = p
* \note There currently is no way to deallocate an allocated event
* 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.
*/
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 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.
......@@ -521,7 +521,7 @@ int process_nevents(void);
/** @} */
CCIF extern struct process *process_list;
extern struct process *process_list;
#define PROCESS_LIST() process_list
......
......@@ -84,10 +84,10 @@ struct timer {
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_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);
......
#ifndef CONTIKI_CONF_H_
#define CONTIKI_CONF_H_
#include <stdint.h>
#define CCIF
#define CLIF
/* These names are deprecated, use C99 names. */
typedef uint8_t u8_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment