Contiki-NG
Loading...
Searching...
No Matches
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_SIZE 4
52#define CLOCK_CONF_SECOND 128
53
54/* Platform typedefs */
55typedef uint32_t uip_stats_t;
56
57/** @} */
58
59/*
60 * The stdio.h that ships with the arm-gcc toolchain does this:
61 *
62 * int _EXFUN(putchar, (int));
63 * [...]
64 * #define putchar(x) putc(x, stdout)
65 *
66 * This causes us a lot of trouble: For platforms using this toolchain, every
67 * time we use putchar we need to first #undef putchar. What we do here is to
68 * #undef putchar across the board. The resulting code will cause the linker
69 * to search for a symbol named putchar and this allows us to use the
70 * implementation under os/lib/dbg-io.
71 *
72 * This will fail if stdio.h is included before contiki.h, but it is common
73 * practice to include contiki.h first
74 */
75#include <stdio.h>
76#undef putchar
77/*---------------------------------------------------------------------------*/
78#endif /* ARM_DEF_ */
79/*---------------------------------------------------------------------------*/
80/** @} */