Contiki-NG
arch
cpu
arm
arm-def.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017, George Oikonomou - http://www.spd.gr
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
* 3. Neither the name of the copyright holder nor the names of its
15
* contributors may be used to endorse or promote products derived
16
* from this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
* OF THE POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*---------------------------------------------------------------------------*/
32
/**
33
* \addtogroup arm
34
* @{
35
*
36
* \file
37
* Compiler and data type definitions for all ARM-based CPUs
38
*/
39
/*---------------------------------------------------------------------------*/
40
#ifndef ARM_DEF_
41
#define ARM_DEF_
42
/*---------------------------------------------------------------------------*/
43
#include <stdint.h>
44
/*---------------------------------------------------------------------------*/
45
/**
46
* \name Macros and typedefs
47
*
48
* Those values are not meant to be modified by the user
49
* @{
50
*/
51
#define CLOCK_CONF_SECOND 128
52
53
/* Clock (time) comparison macro */
54
#define CLOCK_LT(a, b) ((signed long)((a) - (b)) < 0)
55
56
/* Platform typedefs */
57
typedef
uint32_t clock_time_t;
58
typedef
uint32_t uip_stats_t;
59
60
/** @} */
61
62
/*
63
* The stdio.h that ships with the arm-gcc toolchain does this:
64
*
65
* int _EXFUN(putchar, (int));
66
* [...]
67
* #define putchar(x) putc(x, stdout)
68
*
69
* This causes us a lot of trouble: For platforms using this toolchain, every
70
* time we use putchar we need to first #undef putchar. What we do here is to
71
* #undef putchar across the board. The resulting code will cause the linker
72
* to search for a symbol named putchar and this allows us to use the
73
* implementation under os/lib/dbg-io.
74
*
75
* This will fail if stdio.h is included before contiki.h, but it is common
76
* practice to include contiki.h first
77
*/
78
#include <stdio.h>
79
#undef putchar
80
/*---------------------------------------------------------------------------*/
81
#endif
/* ARM_DEF_ */
82
/*---------------------------------------------------------------------------*/
83
/** @} */
Generated on Sat May 30 2020 18:06:28 for Contiki-NG by
1.8.13