Move MAX, MIN and ABS to sys/cc.h

This commit is contained in:
Moritz 'Morty' Strübe 2014-12-01 13:58:34 +01:00
parent c9324d133f
commit 0dab6926b3
33 changed files with 41 additions and 93 deletions

View file

@ -65,6 +65,7 @@
#include "lpm.h"
#include "net-uart.h"
#include "httpd-simple.h"
#include "sys/cc.h"
#include "ti-lib.h"
@ -86,10 +87,6 @@
#define ADDRESS_CONVERSION_OK 1
#define ADDRESS_CONVERSION_ERROR 0
/*---------------------------------------------------------------------------*/
#ifndef MIN
#define MIN(n, m) (((n) < (m)) ? (n) : (m))
#endif
/*---------------------------------------------------------------------------*/
static struct uip_udp_conn *udp_conn = NULL;
static uint8_t buffer[MAX_MSG_SIZE];

View file

@ -37,6 +37,7 @@
*/
#include <string.h>
#include "sys/cc.h"
#include "rest-engine.h"
#include "er-coap.h"
#include "er-plugtest.h"

View file

@ -38,6 +38,7 @@
*/
#include "contiki.h"
#include "sys/cc.h"
#include "net/netstack.h"
#include "net/rime/rime.h"
#include "net/rime/collect.h"
@ -120,8 +121,6 @@ PROCESS_THREAD(depth_blink_process, ev, data)
PROCESS_END();
}
/*---------------------------------------------------------------------------*/
#define MAX(a, b) ((a) > (b)? (a): (b))
#define MIN(a, b) ((a) < (b)? (a): (b))
struct spectrum {
int channel[16];
};

View file

@ -30,6 +30,7 @@
*/
#include "contiki-net.h"
#include "sys/cc.h"
#include <stdio.h>
#include <stdlib.h>
@ -104,7 +105,6 @@ PROCESS_THREAD(tcp_server_process, ev, data)
while(bytes_to_send > 0) {
PROCESS_PAUSE();
int len, tosend;
#define MIN(a,b) ((a)<(b)?(a):(b))
tosend = MIN(bytes_to_send, sizeof(outputbuf));
len = tcp_socket_send(&socket, (uint8_t *)"", tosend);
bytes_to_send -= len;