Move MAX, MIN and ABS to sys/cc.h
This commit is contained in:
parent
c9324d133f
commit
0dab6926b3
33 changed files with 41 additions and 93 deletions
|
@ -36,6 +36,7 @@
|
|||
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
|
||||
*/
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
|
||||
*/
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "er-coap-separate.h"
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "contiki.h"
|
||||
#include "sys/cc.h"
|
||||
#include "contiki-net.h"
|
||||
|
||||
#include "er-coap.h"
|
||||
|
|
|
@ -79,10 +79,6 @@ enum { OPTION_MAP_SIZE = sizeof(uint8_t) * 8 };
|
|||
#define SET_OPTION(packet, opt) ((packet)->options[opt / OPTION_MAP_SIZE] |= 1 << (opt % OPTION_MAP_SIZE))
|
||||
#define IS_OPTION(packet, opt) ((packet)->options[opt / OPTION_MAP_SIZE] & (1 << (opt % OPTION_MAP_SIZE)))
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
/* parsed message struct */
|
||||
typedef struct {
|
||||
uint8_t *buffer; /* pointer to CoAP header / incoming packet buffer / memory to serialize packet */
|
||||
|
|
|
@ -57,13 +57,12 @@
|
|||
|
||||
#include "lib/assert.h"
|
||||
#include "lib/list.h"
|
||||
#include "sys/cc.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#define PRINTF(...) PRINTF(__VA_ARGS__)
|
||||
|
|
|
@ -62,10 +62,6 @@
|
|||
#define REST_MAX_CHUNK_SIZE 64
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
struct resource_s;
|
||||
struct periodic_resource_s;
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "sys/energest.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "sys/cc.h"
|
||||
|
||||
struct power_msg {
|
||||
uint16_t len;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "sys/cc.h"
|
||||
#include "shell-sky.h"
|
||||
|
||||
#include "dev/watchdog.h"
|
||||
|
@ -84,8 +85,6 @@ SHELL_COMMAND(rfchannel_command,
|
|||
"rfchannel <channel>: change CC2420 radio channel (11 - 26)",
|
||||
&shell_rfchannel_process);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define MAX(a, b) ((a) > (b)? (a): (b))
|
||||
#define MIN(a, b) ((a) < (b)? (a): (b))
|
||||
struct spectrum {
|
||||
int channel[16];
|
||||
};
|
||||
|
|
|
@ -36,13 +36,10 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "contiki.h"
|
||||
#include "sys/cc.h"
|
||||
#include "shell.h"
|
||||
#include "telnet.h"
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b)? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(shell_tcpsend_process, "tcpsend");
|
||||
SHELL_COMMAND(tcpsend_command,
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
#include "sys/cc.h"
|
||||
#include "shell-time.h"
|
||||
|
||||
#include "sys/clock.h"
|
||||
|
@ -51,11 +52,6 @@
|
|||
#define MAX_COMMANDLENGTH 64
|
||||
#define PERIOD_INTERVAL 60
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b)? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(shell_time_process, "time");
|
||||
SHELL_COMMAND(time_command,
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include "sys/cc.h"
|
||||
#include "contiki-lib.h"
|
||||
#include "contiki-net.h"
|
||||
#include "lib/petsciiconv.h"
|
||||
|
@ -103,7 +104,6 @@ static uint8_t connected;
|
|||
|
||||
#define MAX_SILENCE_TIME (CLOCK_SECOND * 30)
|
||||
|
||||
#define MIN(a, b) ((a) < (b)? (a): (b))
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
buf_init(struct telnetd_buf *buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue